Commit Graph

1651 Commits

Author SHA1 Message Date
João Salavisa abe4147d07 fix: stop task renames from wiping task repositories (#1705)
* fix: stop task renames from wiping task repositories

A title-only PATCH (or WS task.update) converted the absent repositories
field into a non-nil empty slice, which Service.UpdateTask treats as an
explicit replace-with-nothing — deleting every task_repositories row and
dropping the task out of repo-filtered sidebar views. Map "field absent"
to nil at both update handlers so partial updates leave repositories
untouched, while an explicitly empty list still clears them.

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

* test: assert update-task responses reflect repository state

Address cubic review feedback: make the repo fake stateful so the
explicit-clear test can assert the response body returns no
repositories, and unmarshal the WS payload to confirm the preserved
repository is present, matching the HTTP test's coverage.

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

---------

Co-authored-by: Kandev Agent <agent@kandev.dev>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-15 12:48:51 +01:00
José Almeida 55960e7555 docs: add curated public documentation (#1701)
* docs: add curated public documentation

* docs: correct public API and deployment guidance

* docs: fix workflow trigger anchor

* docs: harden deployment and websocket examples
2026-07-15 12:06:06 +01:00
Carlos Florêncio dd1b811930 fix(web): silence Vitest network noise (#1700) 2026-07-15 11:33:37 +01:00
João Salavisa ef635276f9 feat: rename task inline from the top bar via double-click (#1702)
* feat: rename task inline from the top bar via double-click

Double-clicking the task title in the desktop top bar swaps it for an
inline input; Enter commits the rename through the existing task update
path, Escape or blur cancels. Archived tasks stay read-only.

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

* test: fix vi.fn generics in agent usage test for vitest 4

vi.fn dropped the two-type-argument form in the Vitest 4 upgrade; the
old signature made mockResolvedValue infer never and fail typecheck.

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

* fix: ignore Enter during IME composition in topbar rename input

Review follow-up: without the guard, the Enter that confirms an IME
candidate committed the rename mid-typing. Mirrors the quick-chat tab
rename input and the dialog default-action convention.

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

* fix: harden topbar rename commit path against IME 229 and mid-edit archive

Independent-review follow-up:
- also treat keyCode 229 as IME composition, matching the documented
  convention in dialog-default-action (some IMEs report the accepting
  Enter after isComposing flips false)
- re-check isArchived on Enter so a task archived while the inline
  editor is open cannot be renamed from it

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

* fix: make topbar rename title keyboard-operable

Addresses PR #1702 review: the renameable title exposed role="link" with
aria-disabled="false" but only a double-click handler. Add tabIndex, Enter
to open the rename input, and focus restoration on keyboard exits.

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

---------

Co-authored-by: Kandev Agent <agent@kandev.dev>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-15 10:48:56 +01:00
João Salavisa c81b60a06d feat(web): add opt-in notification sound for waiting-for-input (#1689)
* feat(web): add opt-in notification sound for waiting-for-input

Play a configurable per-device sound when a session starts waiting for
user input. Sounds are synthesized with the Web Audio API (no binary
assets), follow the same suppression rules as desktop notifications,
and work independently of the browser Notification permission.

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

* fix(web): drop stale sound plays when AudioContext resume is delayed

Scheduling notes on a suspended context queued every pending alert and
played them stacked once the user finally interacted. Schedule only
after resume() fulfills and drop plays older than 2s.

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

* fix(web): harden notification sound playback edge cases

Catch AudioContext construction failures so a broken audio stack cannot
abort the WS handler before the desktop notification is shown, route
interrupted (iOS) contexts through the resume path, and coalesce plays
queued while the context is not running so only one pending cue fires.

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

* fix(web): make sound test stubs constructible and refine resume queue

vi.fn with an arrow implementation is not constructible, so the
AudioContext stubs silently misbehaved on CI's Node runtime. Also keep
the newest pending play instead of dropping later requests, recheck the
preference before a resumed waiting-for-input cue fires, and validate
picker values with the existing type guard.

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

---------

Co-authored-by: Kandev Agent <agent@kandev.dev>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-15 10:27:23 +01:00
Carlos Florêncio 1a1ece3a8d feat: add repository context to quick chats (#1679) 2026-07-15 09:13:52 +01:00
João Salavisa 55c8b461be feat: surface agent subscription usage in settings and chat tooltip (#1697)
* feat: surface agent subscription usage in settings and chat tooltip

Adds live subscription rate-limit visibility for Claude Code and Codex:

- GET /api/v1/agents/usage lists per-agent utilization windows (plan, percent,
  reset time) for host agents with subscription credentials; ?fresh=true
  bypasses the 5-minute cache with a 15s per-provider clamp.
- Fixes both existing usage clients: Claude parsed float utilization as int
  (decode failure) and now reads the richer limits[] array incl. per-model
  weekly windows; Codex read a nonexistent auth.json field and response
  headers - now reads tokens.access_token, parses the body windows, and
  refreshes OAuth tokens on 401. Token refresh persists without dropping
  unknown credential fields.
- Settings > Agents gains a Subscription Usage section; the chat context
  doughnut tooltip shows the session agent's windows, fetched fresh on hover.
- Shared UsageWindowRows component (bars, Good/High/Critical status,
  reset countdowns) keeps settings, tooltip, and office surfaces consistent.

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

* fix: recompute agent billing type on every read

Subscription billing detection for Claude and Codex was cached with
sync.OnceValue for the process lifetime, so logging in with OAuth after
the backend started never flipped billing badges or office usage checks
until restart. Detection now re-reads the credential files on each call
and reuses the usage clients' HasSubscriptionCredentials checks. Also
adds a regression assertion that fractional-second resets_at timestamps
parse under the RFC3339 layout.

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

* fix: address subscription usage review feedback

- serialize empty utilization windows as arrays, not null
- sanitize per-agent usage errors in the API (raw provider errors are
  logged server-side; they can carry credential paths/response bodies)
- persist refreshed CLI credentials via atomic temp-file rename
- keep previous settings usage on transient refresh failure; drop stale
  tooltip usage (and its memo) when a fresh fetch fails
- add controller tests for SubscriptionUsage mapping and fresh propagation

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

* fix: coalesce concurrent usage fetches and guard codex token refresh

- serialize usage-cache fetches per key with a double-checked lock so
  concurrent fresh requests make one provider call instead of a burst
- reject codex refresh responses with an empty access_token instead of
  persisting them and wiping working credentials
- pin the usage-rows reset fixture 30s under the day boundary so the
  formatted value is deterministic on fast runners

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

* fix: coalesce failed usage fetches with short negative caching

Concurrent lookups after a fetch error each retried the provider once
the per-key lock rotated. Failures are now cached for 15 seconds (never
longer than the caller's staleness bound), so bursts share one error
result and the provider gets a breather before the next retry.

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

* fix: keep stale usage through failed refreshes and skip caching cancellations

Track the last success and last failure independently in the usage
cache: a failed fresh refresh no longer evicts a still-valid success
(non-fresh callers keep the stale value while fresh callers share the
recent error), and a caller-cancelled context no longer records a
negative entry that would penalize other callers.

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

* test: synchronize concurrent usage-cache tests with a channel barrier

Replaces the sleep-widened race window in the coalescing tests with a
started/release barrier per the backend testing guidelines, and dedupes
the two concurrent-caller tests into one helper.

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

---------

Co-authored-by: Kandev Agent <agent@kandev.dev>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-15 08:50:21 +01:00
Carlos Florêncio 8b265d9b82 perf(web): upgrade Vitest and cap local workers (#1696) 2026-07-15 07:50:49 +01:00
João Salavisa 3746a30126 fix: enforce origin validation on websocket upgrades (#1698)
* fix: enforce origin validation on websocket upgrades

The gateway /ws upgrader hardcoded CheckOrigin to true, so any web page
could open a socket to the local backend and drive session/shell actions
(cross-site WebSocket hijacking → RCE on the host).

Both upgraders now share checkWebSocketOrigin: no Origin header is
allowed (non-browser clients), same-hostname and loopback↔loopback
origins are allowed, everything else is rejected. Replaces the terminal
handler's prefix-based check, which accepted origins like
http://localhost.attacker.tld.

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

* refactor: share origin trust policy between cors and websocket checks

Review feedback on #1698: the CORS middleware and the WebSocket upgrader
carried two copies of the same origin policy, which could silently
diverge. Both now delegate to httpmw.AllowedOrigin, which also rejects
URL components that never appear in a browser Origin header (userinfo,
path, query, fragment, opaque data).

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

---------

Co-authored-by: Kandev Agent <agent@kandev.dev>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-15 01:13:46 +01:00
Carlos Florêncio ac2eef8de8 fix(web): keep chat readable after right-pane resize (#1682) (#1691) 2026-07-15 00:17:10 +01:00
Carlos Florêncio 30373ea40c fix: promote commandless workspace executions (#1692) 2026-07-14 23:14:37 +01:00
Carlos Florêncio 0cb8f38464 fix(web): align topbar metrics heights (#1694) 2026-07-14 23:13:56 +01:00
Carlos Florêncio 32b390c617 fix: repair grok docker auth and archived task control (#1693) 2026-07-14 22:02:43 +01:00
zensi-dev 7a90408086 feat(agent): add Grok ACP agent (#1688) 2026-07-14 20:05:38 +01:00
Carlos Florêncio 8be7212589 fix(web): soften deferred clarification notice (#1690) 2026-07-14 19:57:25 +01:00
Carlos Florêncio 1d1d6ef0f8 feat: show ACP shell command output in chat (#1684) 2026-07-14 19:17:36 +01:00
João Salavisa 7bcb10bfef feat: unarchive tasks with worktree branch recovery (#1687)
* feat: unarchive tasks with worktree branch recovery

Archived tasks can now be restored. Unarchive works for manual/legacy
archives (empty cascade id, root-only) and cascade archives. Archive
deletes the local branch, so worktree recreate now falls back to
fetching the branch from origin, and unarchive writes the old branch
back as checkout_branch so a fresh session resumes the prior work.
Unrecoverable branches (never pushed) surface a warning. WS archive now
routes through the handoff cascade so it stays stamped and reversible.
UI: unarchive action on /tasks archived rows and the task top bar.

* fix: address PR review feedback on unarchive recovery

Forward PRNumber to the recreate fetch so fork-PR heads (only reachable
via pull/<N>/head) are recoverable, publish task.updated per task in the
cascade unarchive loop so the UI restores without a reload, and
re-publish task.updated after a checkout_branch restore since the
unarchive event goes out with the pre-restore repository rows.

* fix: harden unarchive recovery per review feedback

Propagate branch-probe errors instead of misreporting recoverable work
as gone, and reserve ErrBranchUnrecoverable for a confirmed-missing
remote ref (transient fetch failures keep their own error). Validate
the archive root exists so WS/HTTP archive no longer reports success
for unknown task IDs, CAS-guard manual unarchive on an empty cascade
stamp, detach branch recovery from the request context, and skip
checkout_branch restore for multi-branch repos. UI: in-flight guard on
the list unarchive button, pluralized unrecoverable-branch toast.

* docs: document CAS guard on UnarchiveTask interface contract

---------

Co-authored-by: Kandev Agent <agent@kandev.dev>
2026-07-14 19:15:51 +01:00
João Salavisa 79f280679a fix(deps): bump @playwright/test to ^1.61.1 to fix install hang on Node 26 (#1685)
* fix(deps): bump @playwright/test to ^1.61.1 to fix install hang on Node 26

* ci: bump CI base Playwright image to v1.61.1-noble to match @playwright/test
2026-07-14 18:06:15 +01:00
Carlos Florêncio 6831b80878 docs: improve harness and issue templates (#1681) 2026-07-14 17:58:21 +01:00
Carlos Florêncio 39ee058f0c fix: resolve two cancel/clarification deadlocks that wedge sessions in RUNNING (#1680) 2026-07-14 16:21:00 +01:00
Carlos Florêncio 3e68fd3da6 fix: prevent stale ready events from completing replacement turns (#1678) 2026-07-14 13:20:52 +01:00
Alassane 6259d58c94 fix(web): make clipboard fallback work in Radix dialogs (#1671) 2026-07-14 10:27:21 +01:00
Clément Fiere 84e40ee4c8 feat: interrupt busy child task turn on parent message_task_kandev (#1653) 2026-07-14 09:07:58 +01:00
Carlos Florêncio 0f266c319d feat: link GitHub issues to tasks (#1672) (#1676) 2026-07-13 19:19:23 +01:00
github-actions[bot] 3eaa0e6702 release: 0.78.0 v0.78.0 2026-07-13 15:35:03 +00:00
Carlos Florêncio c4dd45f9ac fix: use long press for mobile task actions (#1673) 2026-07-13 13:56:55 +01:00
Carlos Florêncio 892ce9bf09 fix(worktree): preserve colon paths in copy files (#1674) 2026-07-13 13:56:40 +01:00
Carlos Florêncio 248e8bf48e feat: add workflow WIP pull system (#1613) 2026-07-13 12:18:57 +01:00
Jérémy Coatelen fd7c7a2b0f feat(worktree): add per-file copy/symlink materialization per repository (#1650) 2026-07-13 10:54:23 +01:00
Carlos Florêncio b1f0cbc022 fix: prune orphaned task worktree repositories (#1667) 2026-07-13 10:37:23 +01:00
Carlos Florêncio 9094659a74 fix: clarify plan mode workflow guidance (#1666) 2026-07-11 14:06:04 +01:00
Carlos Florêncio 8a2404251d fix: guard agent profile orphan cleanup (#1659) 2026-07-11 12:31:21 +01:00
Clément Fiere fe392e60f5 feat: support multiple concurrent Sentry instances (#1469) 2026-07-10 23:32:18 +01:00
Carlos Florêncio 05b550e122 fix: show pending task input before messages load (#1663) 2026-07-10 23:29:40 +01:00
Carlos Florêncio 49e2e2e27f fix(office): stop unstable use(params) promise from hiding office tree (#1664) 2026-07-10 17:52:09 +01:00
José Almeida 1971f850e2 fix: use maintained codex acp bridge (#1656) 2026-07-10 16:09:21 +01:00
Clément Fiere 319b49cf8f fix: wrap Utility Agents sub-sections in bounded cards (#1654) 2026-07-10 16:05:40 +01:00
José Almeida b277dcdcdf fix: simplify walkthrough prompt requests (#1660)
* fix: simplify walkthrough prompt requests

* fix: address walkthrough review feedback
2026-07-10 16:04:12 +01:00
Carlos Florêncio 78d1339413 fix: show implement button whenever plan mode is active (#1646) 2026-07-10 14:04:31 +01:00
José Almeida 12ed7123ab fix: support markdown preview comments (#1648)
* fix: support markdown preview comments

* fix: address markdown preview review feedback

* fix: address markdown preview comment scope

* fix: address markdown preview follow-up feedback

* fix: preserve markdown preview run action in file tabs

* fix: ignore svg clicks in markdown preview controls

* fix: ignore svg markdown preview selection targets
2026-07-10 14:03:32 +01:00
Carlos Florêncio 3cb965d0fd feat: add durable plan implement action (#1645) 2026-07-10 12:56:05 +01:00
José Almeida 61723934b9 fix: isolate saved layouts from stale sessions (#1649)
* fix: isolate saved layouts from stale sessions

* fix: preserve session tabs in saved layouts

* fix: handle materialized saved layout visibility

* fix: preserve sibling sessions on env switch

* fix: load task sessions before saved layouts

* fix: preserve sibling tabs on layout fast paths

* test: cover layout session id deduplication
2026-07-10 11:18:36 +01:00
github-actions[bot] ec9004e0bc release: 0.77.0 v0.77.0 2026-07-10 10:09:26 +00:00
Carlos Florêncio d55a89a4a0 fix: add mobile workspace switcher (#1640) 2026-07-10 10:57:54 +01:00
José Almeida 3e237e177a feat: add agent-authored code walkthroughs (#1647)
* feat: add code-walkthrough backend (MCP tool, service, persistence, WS events)

* feat: render agent code walkthroughs as line-anchored cards + editor window

* test: add code-walkthrough re-emit mock-agent scenario

* fix: rework code-walkthrough UX (floating card, line reveal, minimize, clickable file)

* fix: improve code walkthrough editor UX

* fix: backfill walkthrough launcher after websocket connect

* fix: improve walkthrough requests and editor anchors

* fix: clear walkthrough highlights on close

* feat: add walkthrough discard and prompt customization

* fix: send walkthrough requests through saved prompt

* fix: support postgres built-in prompt seeding

* fix: address walkthrough review feedback

* fix: address walkthrough review follow-ups

* fix: harden walkthrough lifecycle races

* fix: reuse walkthrough notification cleanup

* fix: guard stale walkthrough file opens

* fix: abort stale file opens before paint

* fix: stabilize github settings e2e readiness

* fix: use stable github settings e2e selector
2026-07-10 08:34:57 +01:00
José Almeida 4eae00964d feat: move integration links into task menus (#1644)
* feat: move integration links into task menus

* fix: address integration link review feedback

* fix: preserve archived task title when linking

* fix: address integration link review issues

* fix: remove ignored swimlane availability prop
2026-07-09 23:43:35 +01:00
Carlos Florêncio 500068c961 feat(settings): improve workspace sidebar navigation (#1643) 2026-07-09 23:20:48 +01:00
Carlos Florêncio 65ee3cac15 fix: repair GitHub repository scope filters (#1641) 2026-07-09 23:19:06 +01:00
José Almeida f236c90416 fix: inherit parent scope for mcp subtasks (#1638)
* fix: inherit parent scope for mcp subtasks

* fix: clarify mcp subtask parent shorthand

* fix: simplify mcp subtask scope fallback

* fix: ignore subtask workflow step overrides

* fix: add mcp subtask workspace mode

* fix: simplify mcp task scope defaults

* fix: clarify mcp workflow defaulting

* fix: forward mcp subtask workspace mode

* fix: sanitize mcp workflow validation
2026-07-09 23:15:20 +01:00
Carlos Florêncio e5e427b13a docs: add pr fixup conflict guidance (#1642) 2026-07-09 21:44:48 +01:00