Skip to content

fix(tui): open sessions by exact ID - #41180

Merged
kitlangton merged 1 commit into
v2from
session-id-search
Aug 8, 2026
Merged

fix(tui): open sessions by exact ID#41180
kitlangton merged 1 commit into
v2from
session-id-search

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

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 show No matches when 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.tsx recognizes complete canonical session IDs and resolves them through session.get.
  • Session options include the ID as searchable text, so the exact query remains visible after resolution.
  • packages/tui/test/cli/tui/dialog-open.test.tsx covers 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.tsx
  • bun typecheck from packages/tui
  • Repository pre-push typecheck across 38 packages
  • OpenCode Drive end-to-end run against this branch

Demo

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]
Loading

@kitlangton
kitlangton changed the base branch from v2-migration to v2 August 8, 2026 02:28
@kitlangton
kitlangton merged commit fd09760 into v2 Aug 8, 2026
5 checks passed
@kitlangton
kitlangton deleted the session-id-search branch August 8, 2026 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant