Skip to content

feat(app): keep each /btw answer in its own tab until closed - #53270

Merged
Brendonovich merged 9 commits into
v2from
btw-persistent-tabs
Oct 5, 2026
Merged

Brendonovich merged 9 commits into
v2from
btw-persistent-tabs

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Each /btw question now opens its own side-panel tab instead of replacing the previous answer.
  • A tab's question and answer are stored with the session and restored after a reload, until the tab is closed. Closing the tab deletes them.
  • /btw stays one-shot: no follow-ups, reply history, or history/search view.
  • Pending requests are tracked per question, so concurrent questions don't cancel each other, and the main composer is released as soon as the request starts. A request keeps running when you navigate away from its session (e.g. to Home) and its answer lands when it arrives; one interrupted by a reload or by closing its tab shows Retry instead of staying in a working state.
  • /btw answers with the model selected in the composer: like sending a prompt, the composer applies its agent/model selection to the session before running the client command (skipped when queueing behind a running turn).

Storage uses a declared Store.session store, so it follows the existing per-session layout lifetime and pruning. Answers still come from the existing generation-only API with the original instructions; nothing is added to the main session, and no persistence-layer or backend changes are made.

Validation

  • Production-build /btw keeper: 4 passed. Covers separate tabs, reload restore, close-deletes-and-stays-closed after reload, concurrent questions, interruption/retry, separate parent sessions, Home/remount, and twelve long-titled tabs at a narrow desktop width.
  • The new multiple-tab case was observed failing on v2 (one tab instead of two) before the change.
  • packages/app and packages/gui-extensions typechecks, lint:changed, formatting and git diff --check passed.

Validation limits: the root bun run check exceeded this Host's process-thread limit, and the extension-host Storybook suites timed out loading their iframe before any assertion. Native desktop was not exercised.

Requested by: @Brendonovich (Brendan via Slack)

@opencode-agent opencode-agent Bot changed the title feat(app): persist multiple side conversations feat(app): persist multiple /btw side questions Oct 5, 2026
@opencode-agent opencode-agent Bot changed the title feat(app): persist multiple /btw side questions feat(app): keep each /btw answer in its own tab until closed Oct 5, 2026
Client slash commands such as /btw generate with the session's model, so the composer now applies its selection to the session first, following the same steer rule as server commands. Also clears the pre-existing lint in submit.ts so lint:changed passes.
In-flight side questions no longer abort when the user navigates away; the answer lands in the session's store when it arrives. Reload, closing the question's tab or disposing the extension still abandons it as retryable.
# Conflicts:
#	packages/app/src/composer/submit.test.ts
#	packages/app/src/composer/submit.ts
@Brendonovich
Brendonovich enabled auto-merge (squash) October 5, 2026 07:56
@Brendonovich
Brendonovich merged commit 494d707 into v2 Oct 5, 2026
11 checks passed
@Brendonovich
Brendonovich deleted the btw-persistent-tabs branch October 5, 2026 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant