fix(tui): open sessions by exact ID - #41180
Merged
Merged
Conversation
kitlangton
force-pushed
the
session-id-search
branch
from
August 8, 2026 02:28
079a732 to
a256277
Compare
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.
What
Allow the TUI Open dialog to find a session by its complete session ID, including sessions outside the dialog's initial 50-session fetch.
Before / After
Before: Pasting a valid
ses_...ID could showNo matcheswhen that session was not already in the local/recent session set. The user could not open it from this dialog.After: A complete canonical session ID triggers a direct session lookup. An exact returned ID is added to the results and can be opened normally, preserving its location.
How
packages/tui/src/component/dialog-open.tsxrecognizes complete canonical session IDs and resolves them throughsession.get.packages/tui/test/cli/tui/dialog-open.test.tsxcovers a session absent from the recent list and verifies both navigation and location preservation.Scope
This keeps existing title/project fuzzy search unchanged. It does not add partial remote ID search.
Testing
bun run test test/cli/tui/dialog-open.test.tsxbun typecheckfrompackages/tuiDemo
The recording creates a real isolated session, enters its generated session ID in the Open dialog, shows the matching row, and opens it.
recording-38d4cd29-91d9-4dc6-816e-a0cf51a7d6b3.mp4
Flow
flowchart LR A[Enter complete session ID] --> B[Direct session.get] B --> C{Returned ID is exact match?} C -- yes --> D[Add session option] C -- no or missing --> E[Show no matches] D --> F[Open session and preserve location]