feat(tui): add session history rail - #49665
Open
14tuanluongk46 wants to merge 3 commits into
Open
14tuanluongk46 wants to merge 3 commits into
14tuanluongk46 wants to merge 3 commits into
Conversation
Contributor
|
The following comment was made by an LLM, it may be inaccurate: The search results show that PR #49665 is the current PR being checked. The other PRs found are related to sidebar/rail features but appear to be distinct:
No duplicate PRs found |
sync.session.query() is a plain function, so the rail's browse resource never refetches on its own; sessions created after mount did not appear until the rail was remounted. Subscribe to session.created and refetch.
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





Issue for this PR
Closes #
Type of change
What does this PR do?
Adds a fixed, always-visible session history rail on the left side of the TUI, present on every route (home, session, plugin). It lists the current project's root sessions grouped by recency (Today / Yesterday / 7 days / Older), newest first, and supports both mouse (click a row to open it) and keyboard interaction: focus the rail with `j`, move with the existing dialog navigation keys, `/` to search, `ctrl+r` to rename, `ctrl+d` to delete with a two-press confirmation. Subagent and archived sessions are hidden, titles truncate on narrow terminals, and the existing right sidebar is unchanged.
The rail reuses the already-exported `createDialogSessionListQuery` / `loadDialogSessionList` helpers from `component/dialog-session-list.tsx`, so the rail and the existing session picker share one data path; the picker dialog itself is untouched. When focused, the rail pushes a `session_rail` mode onto the mode stack and blurs the editor so its keybinds can't leak into the session view. New keybind definitions live in `config/keybind.ts` (`session_rail_focus`, `session_rail_search`, `session_rail_unfocus`, `session_rail_delete`, `session_rail_rename`).
How did you verify your code works?
`bun typecheck` passes across all 30 packages in the monorepo, and the full TUI test suite passes (195 tests, 0 failures) including a new unit test for the recency grouping helper in `test/component/session-rail.test.ts`.
Screenshots / recordings
Demo recording and screenshots are attached in the comments below. Visually it is a 30-column panel with a panel background on the left edge, group headers in muted text, current session highlighted.
Checklist