Repository navigation
feat(cli-rs): navigate to sessions by ID in the native TUI - #67918
Conversation
There was a problem hiding this comment.
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.
dde2272 to
06695d4
Compare
There was a problem hiding this comment.
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.
Issue for this PR
N/A (port of #67779)
Type of change
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?
E.11a/palette-session-idandE.11a/session-list-currentagainst the TypeScript TUI, and P-PTYD131/palette.sessions,session_links,metadataandtui_droptests;cargo fmt --check,clippy -D warnings,check:drift.4b1670d132, which stacks three backports; P-TUIE.8/navigatefailed 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