Skip to content

Stay on the current thread when starting a suggested-work chip - #1415

Merged
currentbits merged 1 commit into
mainfrom
coder/suggestion-chip-stay
Oct 3, 2026
Merged

currentbits merged 1 commit into
mainfrom
coder/suggestion-chip-stay

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Clicking a suggested-work chip ("Start a thread") forked the thread and switched the view to the new agent. The user should stay on the thread they clicked it from.

Change

  • useCoder.forkThread takes an optional select (default true). Card Fork and hand-off keep switching to the new thread, as before.
  • The chip handler (App.tsx handleStartSuggestion) forks with select: false. The worker still gets its own worktree and starts its run in the background, the chip resolves as started, and the new thread appears in the sidebar.
  • startRun already targets the fork explicitly and refreshes the visible detail only when that thread is selected, so the source view is untouched.
  • The main process sends thread:select only on notification clicks, never on fork, so nothing else pulls focus.

Verification

  • test/suggestedWorkChips.test.tsx now asserts the source card stays active and the started thread is in the sidebar. It failed before the fix (actual: 't-fork-…') and passes after.
  • tsc --noEmit clean. Renderer suite 2671/2671. vite build ok.

🤖 Generated with Claude Code

Clicking a suggestion chip forked the thread and selected the fork, so
the view jumped to the new agent. The chip now forks with select: false:
the worker starts in the background and appears in the sidebar, and the
user stays on the thread they clicked from.

forkThread gains an optional `select` (default true), so card Fork and
hand-off still switch to the new thread.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@currentbits
currentbits merged commit 951e834 into main Oct 3, 2026
6 checks passed
currentbits added a commit that referenced this pull request Oct 3, 2026
…n Working (#1421)

* Sidebar: nest plain forks under their source and file families as one

A fork (handoffFrom without orchWorker) now groups under the thread that
started it, like an orchestration worker. A family sits on the Working
shelf while any member is quietly working, unless a member needs the
user, so a lead that finished its turn no longer reads done while its
fork runs. orchWorker keeps its backend meaning.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Sidebar: keep a nested fork's Fork: title; expand families in fork tests

A plain fork is titled "Fork: <lead title>". Nested rows strip that
prefix for orchWorkers, which made a nested fork read as a copy of its
lead. Only strip it for orchWorkers. Tests that click a fork card now
expand the lead's family first, since forks start collapsed like workers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Suggested-work chip: expect the started fork nested under its source

#1415 asserts the chip-started thread is visible in the sidebar. With
plain forks now nested (collapsed) under their source, the test expands
the source's family first; the comments in handleStartSuggestion say
where the worker shows up.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Willem <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
@currentbits
currentbits deleted the coder/suggestion-chip-stay branch October 3, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant