Skip to content

fix(native): side chat and subagent review fixes from #45 - #48

Merged
rynfar merged 5 commits into
nativefrom
nw/w11-fixes
Nov 2, 2026
Merged

rynfar merged 5 commits into
nativefrom
nw/w11-fixes

Conversation

@rynfar

@rynfar rynfar commented Nov 2, 2026

Copy link
Copy Markdown
Owner

A review of #45 (side chats and lineage) found Stop, shortcut and cleanup paths that acted on the open thread instead of the side chat or subagent being shown, plus state that outlived its tab or environment. This fixes each finding against the web behavior it ports.

Fixes

  • [P1] Side chat background Stop stopped the open thread. It now stops the thread the view displays (useThreadLifecycle.tsx). The other status-line and banner actions were checked and already use the displayed thread.
  • [P2] App-owned subagent Stop always sent thread.stop for the child, which older servers reject. It now goes through the same capability check as every other Stop and falls back to run.interrupt on the child's active run (interruptThreadTurn).
  • [P2] Side chat shortcuts (model picker, permissions) went to the open thread's composer. Each composer now handles its own. The side chat pane also swallows the open thread's chat shortcuts (find, settle, pin, copy reference), as the web's isInSideChatPane does.
  • [P2] Resumed subagent children lost Stop. Subagent::current ports currentSubagent, so a finished task whose child runs again uses that run.
  • [P2] Deleted side chats stayed subscribed. A side chat missing from the merged shell gets no stream, and the subscriptions are re-checked when family and page rows mount.
  • [P3] Effort labels now show an explicit choice before what the provider reported, ignore reports for a different model, and no longer turn an unknown value into the catalog default (formatModelSelectionEffort).
  • [Risk] Environment isolation. Side subscriptions and a pending side chat start (with its timeout) clear on disconnect or switch. Right panel tabs, diff selections and base refs are saved per environment (scopedThreadKey). Diff layout and the file tree stay shared.
  • [Risk] Closed panes dropped only on the next render of a side chat. Panes now drop as soon as their tab closes or the selection changes.
  • [Risk] Provider bar sized itself by the window. It now measures its own column and uses ProviderSubagentBar's 560/640/320px breakpoints.

Evidence

  • Failing tests first for the logic: stop_target shell fallback, Subagent::current / can_stop(child), effort label precedence (crates/core).
  • cargo test --workspace, cargo clippy --workspace --all-targets -- -D warnings, gen-theme --check, parity/sync.test.ts all pass.
  • Probe against the smoke server (devReplay): workflows: handoff=true compacting=false stop=Thread stop_without_thread_stop=Nothing.

Not verified at runtime

The smoke server has no subagents and no live side chats, so the provider bar breakpoints, subagent Stop and side chat pane cleanup are covered only by unit tests and review. Panel state saved by earlier builds under the shared key is not migrated, so saved tabs reset once.

Ledger rows TV-SIDECHAT and TV-LINEAGE stay partial.

Claude Opus 5.5, Claude Code (W11b, resumed by W11b-resume)

…s on older servers

A side chat's background Stop stopped the open thread instead of the side chat.
App-owned subagent Stop always sent thread.stop for the child, which older
servers reject; it now falls back to run.interrupt on the child's active run.
A finished task whose child thread runs again keeps its Stop, as the web's
currentSubagent reads the child's live run.
…ses a default

The label read the provider's report before the selection, took reports for a
different model, and normalized an unknown value to the catalog default.
It now follows formatModelSelectionEffort.
Composer chords (model picker, permissions) went to the open thread's composer.
Each composer now handles its own, and the open thread's chat shortcuts ignore
keys from a side chat pane, as the web's isInSideChatPane does.
A docked right panel narrows the chat column on a wide window. The bar now
measures itself and uses ProviderSubagentBar's composer-surface breakpoints.
…ther environments

A deleted side chat whose tab stayed saved kept its stream; a closed tab kept
its pane with caches and subscriptions; switching environments kept side
subscriptions and a pending start. Right panel tabs are now saved per
environment, as the web keys them by scopedThreadKey.
@rynfar
rynfar merged commit 2be96fe into native Nov 2, 2026
This was referenced Nov 2, 2026
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