Skip to content

feat(cli-rs): navigate to sessions by ID in the native TUI - #67918

Merged
simonklee merged 1 commit into
devfrom
session-id-nav
Dec 3, 2026
Merged

simonklee merged 1 commit into
devfrom
session-id-nav

Conversation

@simonklee

Copy link
Copy Markdown
Member

Issue for this PR

N/A (port of #67779)

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

#67779 lets the TypeScript TUI open a session by typing its ID into the command palette, the session list and the open dialog. This brings the same navigation, text and matching to the native TUI. No feature flag: it follows shipped TypeScript behaviour.

How did you verify your code works?

  • P-APP E.11a/palette-session-id and E.11a/session-list-current against the TypeScript TUI, and P-PTY D131/palette.
  • The sessions, session_links, metadata and tui_drop tests; cargo fmt --check, clippy -D warnings, check:drift.
  • The merge lane's gate and full suites passed on 4b1670d132, which stacks three backports; P-TUI E.8/navigate failed once on a startup notice and passed 3 of 3 alone (a known flake).

Screenshots / recordings

N/A: the P-APP scenario compares the native TUI's screen cell by cell with the TypeScript TUI's.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't run this: the review environment has no Rust toolchain, and the drive harness only runs the TypeScript TUI. Instead I compared the diff line by line with #67779. ID parsing, the palette session row and its "Searching session…" message, the open dialog's exact-ID lookup and the session list's ID search all match the TypeScript behaviour, including setting the location before navigating.

Public API: unchanged (internal to the native TUI's dialogs).

One structural concern, noted inline: dialogs/palette.rs copies the palette setup and the suggested/filtered command ordering from opencode_ui::palette. After this change the app no longer uses opencode_ui::palette::palette/show, but the UI crate's tests still test them, so the two copies will drift apart.

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The palette duplication is fixed: the native palette now plugs its session lookup into the shared opencode_ui::palette::palette through Lookup, and the UI tests use that same palette. I found nothing new in this commit. As before, I couldn't build or run the native TUI here because there's no Rust toolchain; this is a code reading only. The public API is unchanged.

@simonklee
simonklee merged commit e0fa6f6 into dev Dec 3, 2026
9 checks passed
@simonklee
simonklee deleted the session-id-nav branch December 3, 2026 08:00
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