Generalize TUI inline menu routing#13668
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
| // ── Layout sizing ──────────────────────────────────────────────────────────── | ||
|
|
||
| /// Returns the result rows available after reserving border and header chrome. | ||
| pub(crate) const fn result_row_capacity( |
There was a problem hiding this comment.
this is just fixing an issue I noticed further up the stack where there were some selection issues b/c the row capacity wasn't being correctly calculated w/ a title
9c73d34 to
067fd30
Compare
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR generalizes the TUI inline-menu plumbing from a single slash-command menu into an ordered collection, reusing shared menu sizing and rendering the first open inline menu. No approved or repository spec context was provided, and I did not find security-sensitive changes in the diff.
Concerns
- The change touches the TUI inline-menu render/routing path, but the PR body does not include accepted TUI visual evidence. For this user-facing TUI change, please attach a terminal transcript,
render_to_lines/TuiBuffer::to_linessnapshot, or a./script/run-tui/./script/runcapture demonstrating the slash-command menu still works end to end.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
Co-Authored-By: Oz <oz-agent@warp.dev>
067fd30 to
053d02e
Compare

Description
Before this PR, the TUI input owned one optional
TuiInlineMenu, and routing was tied to the concrete slash-command model through an enum and per-operation matches. Adding another inline surface meant expanding that routing enum while also replacing the one menu threaded through session construction. Visible-row capacity was separately split between a hard-coded slash-command limit and renderer-side chrome accounting.This PR makes inline menus an ordered collection of cloneable, type-erased handles instead.
TuiInlineMenuHandledefines the shared lifecycle, navigation, acceptance, and snapshot operations; the slash-command model is the first implementation. Input routing and rendering delegate directly to the first open handle without model-specific matches, and shared sizing derives visible result rows from the allocated height, border, title, and tabs. The slash-command menu remains the only registered menu in this PR, so behavior is unchanged while additional menus can implement the same interface upstack.Testing
./script/runScreenshots / Videos
No behavior changes for this PR. Just setting things up for PRs up the stack
Agent Mode
Co-Authored-By: Oz oz-agent@warp.dev