Commit Graph

1280 Commits

Author SHA1 Message Date
Carlos Florêncio 4f852b7a5c feat: add PR link to CI status popover header (#1200) 2026-05-31 18:43:43 +01:00
Carlos Florêncio d76836d740 fix(web): stop changes panel flicker and restore planning chat streaming (#1197) 2026-05-31 18:43:17 +01:00
Carlos Florêncio 530915e2d4 feat(web): bubble subtask state to parent in sidebar state sort (#1194) 2026-05-31 18:43:05 +01:00
Carlos Florêncio c6b3b77c3e fix(mcp): disambiguate message_task task-not-found vs no-session error (#1186) 2026-05-31 18:42:47 +01:00
Carlos Florêncio 151bf54dec feat(health): add OS inotify resource limits health check (#1195) 2026-05-31 17:54:49 +01:00
Carlos Florêncio d1c73d2f2c feat: surface subagent task tool calls as cards in task chat (#1132) 2026-05-31 17:53:21 +01:00
Carlos Florêncio 036aee6e19 fix(agents): add Cursor auto-approve and always-allow permission UI (#1198) 2026-05-31 17:13:00 +01:00
Carlos Florêncio 700ff4199c fix(agentctl): write ACP debug logs under KANDEV_HOME_DIR (#1196) 2026-05-31 17:10:08 +01:00
Carlos Florêncio 644d428ccb fix(backend): prevent nested subtask creation for kanban tasks (depth > 1) (#1192) 2026-05-31 16:29:41 +01:00
Carlos Florêncio 0511ef3028 fix: deliver session broadcasts to focused clients during resume (#1193) 2026-05-31 14:39:15 +01:00
Carlos Florêncio af3b26b6d9 fix: track OS PIDs and clean up shells on task archive/delete (#1191) 2026-05-31 14:38:52 +01:00
Carlos Florêncio 86f756e280 feat(workflow): add set_session_mode action and preserve mode across reset (#1188) 2026-05-31 14:36:12 +01:00
Carlos Florêncio f7f4a965a1 fix(web): portal inline-code tooltip to body to prevent clipping (#1187) 2026-05-31 14:35:30 +01:00
Carlos Florêncio dea04b2bed fix(backend): close clarification overlay after agent MCP timeout and dedup retried questions (#1185) 2026-05-31 12:36:13 +01:00
Carlos Florêncio a10e81c0d7 fix: preserve whitespace in acp message chunks (#1190) 2026-05-31 12:31:56 +01:00
Carlos Florêncio d3129194d3 feat(mcp): expose task delete and archive tools to kanban agents (#1178) 2026-05-31 12:00:22 +01:00
José Almeida 36b5c682a9 fix(github): detect fork PRs by branch (#1182)
* fix(github): detect fork PRs by branch

* fix(github): align fork branch detection paths

* fix(github): skip duplicate branch PR matches

* test(github): remove stale branch owner fixtures

* test(github): remove stale PAT branch owner fixture

* fix(github): surface branch decode errors
2026-05-31 11:59:15 +01:00
José Almeida 137336de86 fix: manually drain queued chat messages after cancel (#1166)
* fix: drain queued chat messages after cancel

* fix: address queue drain review feedback

* fix: keep queued messages parked after cancel

* fix: stabilize queue drain errors

* fix: keep queue parked during cancel events

* fix: wait for lifecycle stream goroutines

* fix: address lifecycle stream review feedback
2026-05-31 11:58:01 +01:00
Carlos Florêncio 8e1f55a0ac fix: keep env prep out of partial tool history (#1189) 2026-05-31 11:48:21 +01:00
Carlos Florêncio 5e4fc9c1dd fix(workflow): exclude office workflows from settings export (#1184) 2026-05-31 11:47:25 +01:00
Carlos Florêncio 50496fd07d feat(mcp): expose workflow import tool (#1177) 2026-05-31 11:14:42 +01:00
Carlos Florêncio dcde3da74c feat: surface an inline notice when an agent turn produces no output (#1179) 2026-05-31 11:14:23 +01:00
Carlos Florêncio b16b27b3e3 fix(cli): generate brew-upgrade-resilient systemd unit (#1180) 2026-05-31 11:14:01 +01:00
Carlos Florêncio 1fa0c340d8 refactor: move workspace policy params from MCP to agentctl CLI (#1181) 2026-05-31 11:12:36 +01:00
Nicolas Lenepveu 4b05e9755d feat: throttle issue-watcher task fan-out (per-watcher cap) (#1113) 2026-05-30 23:03:27 +01:00
Nicolas Lenepveu c148282b98 fix(web): show CLI-passthrough profiles in watcher dialogs (closes #1107) (#1108) 2026-05-30 23:03:18 +01:00
Carlos Florêncio e708a76701 docs: document portable workflow import/export YAML format (#1176) 2026-05-30 22:53:57 +01:00
Carlos Florêncio 623044a8d4 feat(web): confirm session delete when closing multi-session agent tab (#1174) 2026-05-30 22:53:49 +01:00
Carlos Florêncio 0966b71f1c fix(cli): add ~/.bun/bin to service PATH (#1175) 2026-05-30 19:17:19 +01:00
Carlos Florêncio ec289c799b feat: retry transient provider 529 errors with visible backoff (#1173) 2026-05-30 19:16:49 +01:00
Carlos Florêncio d35f36ae73 fix(web): make left sidebar width global + steady monitor-switch settling (#1140) 2026-05-30 19:16:26 +01:00
Carlos Florêncio 11f5be3f84 test(e2e): add managed runner script + skill/flake-triage docs (#1170) 2026-05-30 19:16:15 +01:00
Carlos Florêncio 4da076c43e feat(backend): per-session ACP debug logs with rotation and retention (#1172) 2026-05-30 19:10:09 +01:00
irium 3fbd1280d2 fix(lifecycle): forward profile env vars on lazy-recovery createExecution (#1138) 2026-05-30 19:00:12 +01:00
Carlos Florêncio 9f9b5c3f72 feat(web): auto-expand the first group in the changes panel (#1169) 2026-05-30 18:07:36 +01:00
Carlos Florêncio 55ed674a15 fix: dockview/editor restore races, office rebroadcast, and flaky tests (#1171) 2026-05-30 18:02:15 +01:00
Carlos Florêncio d66d9e6f67 feat: remote tab in task-create dialog — multi-row GitHub repo picker (#1116) 2026-05-30 15:47:02 +01:00
Carlos Florêncio d288bd6a6d feat: annotate debug logs with task_id for per-task filtering (#1168) 2026-05-30 15:33:32 +01:00
Carlos Florêncio 9bb9644684 fix(backend): make repository setup script failures non-fatal (#1153)
* fix(backend): make repository setup script failures non-fatal

A failing repository setup script aborted environment preparation and
stopped the agent ("Environment setup failed"), and Resume / Start-fresh
couldn't recover because each relaunch re-ran the same failing script.

runWorktreeSetupScript (run inside worktree creation) treated a non-zero
exit as fatal: it deleted the worktree and returned an error, which
cascaded to EnvPrepareResult{Success: false} and aborted the launch. This
contradicted the already-non-fatal task/profile-level setup script path.

The repo-level script is now non-fatal too: on failure it logs a warning,
records SetupScriptWarning on the worktree, keeps the worktree, and lets
the launch proceed. The env preparer surfaces it on the "Create worktree"
step so the panel shows completed_with_warnings instead of failed. The
full script output still streams to the script_execution chat message.

Adds backend regression tests and an e2e test (verified red before / green
after) asserting the agent still launches when the repo setup script fails.

* fix(backend): preserve base-branch warning when setup script also fails

Addresses review feedback: the post-Create block surfacing SetupScriptWarning
on the "Create worktree" step unconditionally overwrote BaseBranchFallbackWarning
when both occurred, silently dropping the "wrong branch" notice. Append instead
of replace so both survive.

Also updates TestWorktreePreparer_SetupScriptFailure_KeepsCreateWorktreeStepCompleted
to the non-fatal contract: a failed setup script now yields a successful prepare
with a warning on the step, not a failed prepare.
2026-05-30 14:16:48 +01:00
Carlos Florêncio 7738a1db65 fix(web): send confirm_name when deleting a workspace from settings (#1154) 2026-05-30 14:08:43 +01:00
Carlos Florêncio 43977ca570 fix(web): keep markdown table headers readable on narrow content (#1122) 2026-05-30 13:38:21 +01:00
Carlos Florêncio 72441fb69a feat(web): add PR closed banner and hide CI chip on terminal state (#1161) 2026-05-30 12:54:32 +01:00
Carlos Florêncio 956e0a551d feat(web): collapse mobile task search into a topbar icon (#1157) 2026-05-30 12:54:05 +01:00
Carlos Florêncio 5cab91238b feat(web): showcase merge conflicts in the PR panel (#1151) 2026-05-30 12:44:35 +01:00
João Salavisa 450c89285e fix(orchestrator): stop duplicating workflow auto-start prompt on boot-ready drain (#1160)
* fix(orchestrator): stop duplicating workflow auto-start prompt on boot-ready drain

When a workflow auto-start prompt failed transiently and was queued by the
retry branches in autoStartStepPrompt, the boot_ready drain later re-inserted
the same user message because executeQueuedMessage always called
CreateUserMessage — producing the two identical Merge prompts observed when
an ACP session resumed after going idle.

Tag the queued message with user_message_recorded when recordAutoStartMessage
has already run before the queue, and have executeQueuedMessage skip its
chat-history insert when the flag is set. The early-busy queue path
(queueAutoStartPromptIfRunning) still queues without the flag so the drain
side keeps owning the record for that path.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(orchestrator): propagate recordAutoStartMessage result and tighten else-if guard

recordAutoStartMessage now returns bool (true = chat row successfully
inserted). Both queueAutoStartPrompt call sites in autoStartStepPrompt
pass the return value instead of hardcoded true, so user_message_recorded
is only stamped true when CreateUserMessage actually succeeded. A silently
swallowed DB write failure no longer stamps the flag, letting
executeQueuedMessage fall back to inserting the message on drain.

Also scope the debug-log else-if to s.messageCreator != nil so it only
fires when a CreateUserMessage attempt would otherwise have been made.

---------

Co-authored-by: Kandev Agent <agent@kandev.dev>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 20:13:49 +01:00
João Salavisa cab7b28ed9 chore: round 4 dead-code cleanup (transport helpers, detect, orphan methods) (#1156)
* chore(agentctl): delete duplicate procattr files in adapter package

setProcGroup and killProcessGroup are defined in both
agentctl/server/adapter/ and agentctl/server/process/. The process/
copies are the live ones (called by process/runner.go, manager.go,
vscode.go); the adapter/ copies have zero callers and are removed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore(agentctl): remove orphan helpers from transport/shared

Left over from the ACP refactor. All had zero callers:
- DebugEnabled(): internal debugMode var is checked directly by
  LogRawEvent/LogNormalizedEvent — the exported wrapper was unused.
- GetBool, GetMap, GetSlice: only GetString/GetInt are called in acp/normalize.go.
- NormalizeShellResult, NormalizeReadResult, NormalizeCodeSearchResult,
  NormalizeModifyResult: normalization moved to acp/normalize.go.
- TruncateIfNeeded, MaxContentLength, MaxFileCount: only used by the
  four Normalize* helpers above; removed transitively.
- TraceControlMessage: zero callers in the adapter transport layer.

GenerateUnifiedDiff, SplitLines, DetectLanguage, Tracer, ShutdownTracing,
TraceProtocolEvent, TraceProtocolRequest are alive and kept.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore(agentctl): remove unused tool_payload constructors

NewHttpRequest, NewCreateTask, NewSubagentTask, NewShowPlan,
NewManageTodos, and NewMisc have zero callers — ACP normalization
builds NormalizedPayload via struct literals and JSON unmarshaling,
not these factory functions. NewReadFile, NewModifyFile, NewShellExec,
NewCodeSearch, and NewGeneric are kept (live callers in acp/normalize.go).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore(agents/detect): remove dead fluent options and OSPaths type

WithFileExists, WithCommandOutput, WithEnvVar, expandHomePath (their
transitive helper), and OSPaths (struct + Resolve + Expanded) have
zero callers. Only WithCommand and WithNpxRunnable are used by agent
IsInstalled implementations. Imports trimmed to context and os/exec.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore(office): remove dead channel methods superseded by service/

ListComments, DeleteComment, and UpdateChannelStatus on ChannelService
have zero callers — the live implementations live in
internal/office/service/comments.go and service/channels.go.
CreateComment is kept: it is called by HandleChannelInbound.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore: remove scattered orphan helpers

Remove dead single-symbol exports verified to have zero callers:
- ParseCronExpression (office/shared/cron.go): NextCronTime covers
  all live usages; the validator wrapper was unused.
- IsValidPathComponent, MustJSON (office/shared/helpers.go): zero
  callers; GenerateSlug is kept.
- DiscoverUserSkillsAt (office/skills/userhome_discovery.go): exported
  wrapper over the private discoverUserSkillsAt; only the internal
  DiscoverUserSkills method is wired up.
- Manager.Get (agent/loginpty/manager.go): zero callers; GetByID and
  Stop are kept (Stop is tested in manager_test.go).
- DetachedWithValues (common/appctx/appctx.go): zero callers; Detached
  is kept.
- Repository.Close no-ops (task/share, terminal/repository): both are
  documented no-ops with zero callers.
- TaskBranchName (worktree/config.go): zero callers; the deterministic
  TaskBranchNameWithSuffix is kept.

Note: dialect.Now was initially targeted but is tested in
dialect_test.go (same-package call — missed by package-qualified grep).
It remains unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore(share): remove stale Close reference from provider.go comment

Repository.Close() was removed as a no-op in the round-4 cleanup.
The comment in provider.go still referenced it by name; updated to
reflect that the repo simply doesn't own its DB connections.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore(office/shared): delete helpers.go — GenerateSlug had zero callers

The triage step mistakenly identified skills/service.go as a caller,
but that package defines its own local GenerateSlug (different regex,
adds TrimSpace and a 'skill' fallback default). shared.GenerateSlug
was never called anywhere. helpers.go is now empty; delete the file.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore(worktree): fix stale TaskBranchName reference in TaskBranchNameWithSuffix doc

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Kandev Agent <agent@kandev.dev>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 18:18:10 +01:00
João Salavisa a34ea719df feat(web): allow custom prompts in task creation input (#1155)
* refactor(web): extract measureCaretRect into shared util

Move the textarea caret-position measurement helper out of
rich-text-input.tsx into apps/web/lib/utils/caret-position.ts so the
task-create dialog's autocomplete wiring can reuse it without depending
on the chat-only RichTextInput component.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* feat(web): allow custom prompts in task creation input

Add an @-mention autocomplete to the task-create dialog's prompt
textarea so users can quickly insert one of their saved custom prompts
(built-in + user-created) by typing @<name>.

- Extend useInlineMention with a promptInsertMode option. The default
  "context" mode preserves chat behavior (attach the prompt to the
  context store). The new "inline" mode replaces the @query text with
  the prompt's full content, requiring no backend changes -- the
  resolved text just becomes part of the task description on submit.
- Wire the hook into TaskFormInputs via a small useTaskCreatePromptMention
  helper that adapts the existing textarea ref to the RichTextInputHandle
  surface the hook expects (focus / selection / caret-rect / value).
- Reuse the existing MentionMenu popup component for parity with chat.
- Cover the new branches with unit tests for makePromptItem /
  detectMentionTrigger / filterItems, and an E2E spec exercising
  the menu open / inline-insertion / Enter-doesn't-submit /
  trigger-inside-word paths.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(web): make mention popup clickable inside Radix Dialog

Radix Dialog sets pointer-events: none on document.body to enforce
modal isolation. The mention/slash menu portals to document.body and
inherits the disabled pointer events when opened from inside a Dialog
(the task-create flow). The popup was visible but unclickable: keyboard
select worked, mouse clicks were swallowed by the Dialog body.

Restore pointerEvents: auto on the popup container so it stays
clickable when invoked from within a modal. Bump z-index to 60 so the
popup also wins the visual stacking race against the Dialog (overlay +
content are both z-50). Chat continues to work unchanged since z-60 and
pointer-events: auto are no-ops outside a modal.

Add an adversarial QA spec covering mouse-click select, ArrowDown +
Enter on the 2nd item, Escape close, multi-line content auto-grow,
backspace-over-@ close, space-after-@ close, no-arrow-cursor-shift,
and end-to-end submit. The mouse-click case is the one this fix
unblocks; the rest pin behavior for future regressions.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(web): address PR review feedback

- caret-position.ts: wrap DOM measurement in try/finally so the mirror
  element is always removed even if getBoundingClientRect throws
- useTextareaHandlers: destructure stable fn refs from mention before
  useCallback so deps are specific properties, not the whole object —
  avoids defeating memoization on every keystroke
- QA spec: consolidate inline cleanupPrompts calls into a shared
  test.afterEach so cleanup always runs even when a test throws; update
  submit test comment to accurately reflect what is asserted

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(web): tighten ArrowDown selection assertion in QA E2E spec

Equal filter scores sort by insertion order (stable), so qa-arr-1 lands
at index 0 and qa-arr-2 at index 1. After one ArrowDown from the default
the selected item is "SECOND" — assert that directly instead of accepting
either value, matching the test title "selects the second prompt".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Kandev Agent <agent@kandev.dev>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 15:52:39 +01:00
José Almeida b109c84e4e fix(backend): pass HTTP MCP servers to ACP agents via AssumeMcpHttp (#1152)
* fix(backend): pass HTTP MCP servers to ACP agents via AssumeMcpHttp

* test(backend): cover AssumeMcpHttp override path with effectiveMcpCapabilities helper
2026-05-29 12:58:51 +01:00
Carlos Florêncio 96057e25f4 fix(github): throttle PR branch-detection probes to stop log flood (#1135) 2026-05-29 11:09:36 +01:00
Carlos Florêncio cf2cd1bd2f feat(web): unify panel loading states with grid spinner (#1142) 2026-05-29 11:08:42 +01:00