feat(tui): add global session picker toggle#33450
Conversation
|
The following comment was made by an LLM, it may be inaccurate: I found a potentially related PR: PR #32750: This PR appears to address a very similar feature - a global session list scope toggle. This could be a duplicate or closely related work addressing the same underlying issue (#31932). You should check if #32750 is still open and what its current status is to avoid overlapping changes. |
Summary Adds an explicit global mode to the TUI session picker so users can discover and resume sessions from other projects without changing the default scoped picker behavior. Addresses anomalyco#31932. Key changes - Added a session.toggle.global_list command and session_toggle_global_list keybind config to switch the picker between scoped and global listing. - Routed picker browsing and search through a scoped/global list path that uses /experimental/session for global rows while leaving sync.session.refresh() and --continue scoped. - Rendered project/path context for global rows and added spacing for multi-line select details so cross-project sessions are distinguishable. - Covered scoped refresh, global root filtering, hydrated global session cleanup, and pinned global session behavior with TUI tests.
b284411 to
cb795ac
Compare
I had not seen #32750 because it was not linked from #31932 when I started working on this. The two PRs are related, but I do not think they are equivalent. From the current #32750 diff, the “global” mode still appears to call This PR takes a different approach:
The larger diff here is mostly tests and fixture support. The production change is intentionally small, but the tests cover the edge cases that make this easy to regress: accidental scoping via SDK directory injection, global rows leaking into scoped mode, and pinned/global session behavior after hydration. |
Issue for this PR
Addresses #31932
Type of change
What does this PR do?
Adds an explicit global mode to the TUI session picker so users can discover and resume sessions from other projects without changing the default scoped picker behavior.
Key changes:
session.toggle.global_listcommand andsession_toggle_global_listkeybind config/sessionsbehavior scoped to the current project/directory/experimental/sessionfor global picker rowssync.session.refresh(),--continue, and normal scoped sync behavior unchangedHow did you verify your code works?
Ran:
bun test test/cli/cmd/tui/sync.test.tsx test/cli/cmd/tui/dialog-session-list.test.tsx test/config.test.tsxbun typecheckgit diff --check origin/dev..HEADThe pre-push hook also ran full repo typecheck successfully.
Screenshots / recordings
Default scoped mode:

Sessions outside the current working directory are not shown:

Global mode enabled:

Cross-project sessions are discoverable with project and path context:

Checklist