Skip to content

feat(btw): persist side threads with opt-in memory generation - #1733

Merged
wsp1911 merged 1 commit into
GCWing:mainfrom
wsp1911:dev
Jul 24, 2026
Merged

feat(btw): persist side threads with opt-in memory generation#1733
wsp1911 merged 1 commit into
GCWing:mainfrom
wsp1911:dev

Conversation

@wsp1911

@wsp1911 wsp1911 commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Persist /btw side threads as structured child sessions and add an explicit, default-off memory-generation setting for them.

Fixes #

Type and Areas

Type:

Feature / regression fix / UI/UX / docs / test.

Areas:

Rust core, desktop/Tauri, web UI, remote workspace routing, memory settings.

Motivation / Impact

/btw conversations can now survive app restart and continue as normal persistent sessions. Child sessions retain their parent relationship and initial fork anchor, including in remote workspaces.

Memory generation from newly created BTW sessions remains disabled by default. Users can opt in through Memory settings; existing memory injection behavior is unchanged.

Verification

  • pnpm --dir src/web-ui run test:run src/flow_chat/services/BtwThreadService.test.ts (7 passed)
  • pnpm run type-check:web
  • pnpm run i18n:audit
  • pnpm run fmt:rs
  • cargo test -p bitfun-core btw_session --lib -j 1
  • git diff --check upstream/main...HEAD
  • Manual: reopened an existing persisted remote session and verified /btw restores the parent coordinator session, keeps the child session visible, and starts execution.

Reviewer Notes

  • New BTW sessions use durable Standard storage with relationship.kind = Btw; they are no longer transient sessions.
  • The implementation is forward-only. Legacy BTW-shaped records are not migrated or reconstructed into structured child relationships.
  • BTW memory eligibility is persisted at child-session creation, so changing the setting does not retroactively enroll existing BTW transcripts.
  • btw_ask_stream and btw_cancel are now explicitly remote-routed.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, including the incomplete local Rust test.
  • User-facing settings copy and locales are updated.

- create BTW children as durable standard sessions with typed parent anchors
- restore and group persistent BTW sessions, including remote workspace routing
- resume parent coordinator state before forking a BTW conversation
- add a default-off setting for BTW transcripts to generate memories
- remove legacy BTW hiding and document the forward-only rollout
@wsp1911
wsp1911 marked this pull request as ready for review July 24, 2026 06:49
@wsp1911
wsp1911 merged commit 4714e0c into GCWing:main Jul 24, 2026
5 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