Skip to content

fix(btw): discard temporary side threads and save durable forks - #3277

Merged
GCWing merged 2 commits into
mainfrom
gcwing/dev
Oct 4, 2026
Merged

GCWing merged 2 commits into
mainfrom
gcwing/dev

Conversation

@GCWing

@GCWing GCWing commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

New /btw side conversations now stay in memory instead of entering persisted session history. Explicit tab closure asks for confirmation, waits for submitted requests, stops the runtime, and discards the session and drafts. Tab switching, pane collapse, and surface switching preserve the conversation.

The confirmation also offers Save as fork for submitted content. This saves a durable session through the existing fork operation before deleting the temporary source; failures preserve the source tab, and cleanup retries reuse the saved fork. Forks retain settled turns and the context at the selected boundary, including after compression.

Type and Areas

Bug fix and UI/UX: Rust Core session lifecycle/persistence, Web UI tabs and FlowChat, shared ConfirmDialog, locales, and owning module documentation.

Motivation / Impact

The behavior now matches the side conversation's “Not saved” promise, while giving users an explicit way to retain useful content. Legacy persisted BTW sessions remain readable until explicitly closed. Review and subagent tabs retain their existing lifetimes.

The shared ConfirmDialog adds optional secondaryActionPlacement="start" for the save action, and temporary side threads display a localized status hint. The navigation menu also places update actions before Settings.

Verification

All local checks passed:

  • pnpm run fmt:rs
  • pnpm run check:web (type checking, Appearance, typography, theme color audit across all surfaces, and theme governance)
  • pnpm run i18n:audit (zero warnings)
  • Changed production Web UI files: ESLint, zero errors
  • Shared dialog contracts: 10 passed
  • Focused Web UI suite: 188 passed across 13 files
  • Rust BTW, session-fork and ephemeral-session tests with the minimal agent-runtime,git feature set
  • git diff --check, git merge-tree --write-tree origin/main HEAD, and node scripts/check-git-object-sizes.mjs --base origin/main --head HEAD

Focused commands:

node --test design-system/packages/ui/tests/confirm-dialog.test.mjs design-system/packages/ui/tests/dialog.test.mjs
pnpm --dir src/web-ui run test:run src/flow_chat/services/BtwThreadService.test.ts src/flow_chat/services/BtwSessionLifecycle.test.ts src/flow_chat/components/ModelSelectorExternal.test.tsx src/app/components/panels/content-canvas/hooks/useTabLifecycle.btw.test.tsx src/app/components/panels/content-canvas/stores/canvasStore.terminal.test.ts src/flow_chat/services/flow-chat-manager/EventHandlerModule.test.ts src/infrastructure/confirm-dialog/ConfirmDialogRenderer.test.tsx src/infrastructure/appearance/registry/AppearanceRegistry.test.ts src/app/services/sessionSceneLifecycle.test.ts src/flow_chat/services/sessionActivation.test.ts src/flow_chat/services/storeSync.test.ts src/app/stores/sceneStore.test.ts
pnpm --dir src/web-ui exec vitest run --maxWorkers=50% src/app/components/NavPanel/unifiedSessionCreation.test.ts
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib btw_
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib session_fork_
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib ephemeral_child_session_is_kept_in_memory_without_persisting

Reviewer Notes

AI-assisted; verified with focused automated tests. No browser automation or mock screenshots were used as visual evidence. Native WebView visuals and live remote workspace, remote control, Peer Device Mode, and Detached Dispatch behavior were not exercised. Remote workspace identity and controller surface changes have source/contract coverage only.

Checklist

  • Focused implementation, tests, locales, and durable module guidance; no temporary artifacts.
  • Relevant verification and unexercised scenarios are recorded.
  • User-facing strings and owning documentation are updated.

@GCWing
GCWing merged commit 18aa544 into main Oct 4, 2026
13 checks passed
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