Repository navigation
fix(tui): use buttons and single-row gaps in prompt and export dialogs - #64944
Conversation
User decisions: - The gap above the dialog footer should be one row, not two - Connect dialogs should have one row between the title and the input
There was a problem hiding this comment.
Looks good. I ran the rename-session and export-options dialogs from source with new designs on, on the base and with this PR. The extra blank row above the footer is gone and spacing now matches the other dialogs (screenshots below). The integration form field now leaves out its empty description box. With new designs off, footerGap is ignored, so nothing changes there. tsc -b and the dialog prompt, integration and export tests pass.
Public API is unchanged (internal TUI layout only).
User decisions: - Dialogs with an enter action use buttons like the update dialog instead of the footer band - Extra keybindings move to the bottom left
User decisions: - Remove Cancel buttons unless a dialog clearly needs one
User decisions: - Export session keeps its footer instead of buttons
User decisions: - Session exported keeps its footer instead of a Close button
There was a problem hiding this comment.
The new commits work under new designs. I ran Rename session from source on the base and with this PR: it now ends in a Submit button with a single blank row above it, and pressing Enter still renames the session. Export session keeps its footer with one blank row. tsc -b and the dialog prompt, integration, export and update tests pass. I didn't run a prompt with extra key actions (OAuth copy) to see the new hints on the left.
Public API is unchanged (internal TUI components only; DialogButtons gains an optional hints prop).
One small regression: the busy state (inline comment).
| }} | ||
| buttons={ | ||
| newDesigns() ? ( | ||
| <DialogButtons buttons={[{ label: "Submit", run: confirm }]} active={0} hints={extraActions()} /> |
There was a problem hiding this comment.
The old footer marked submit as disabled: props.busy. This button stays highlighted while the prompt is busy, for example while an API key is validated, even though confirm ignores clicks then. Could the button look disabled or inactive while props.busy is set, as the footer did?






What does this PR do?
Cleans up the text prompt and export dialogs under new designs:
/btw, worktree names, connect forms, API key, …) now ends in a Submit button like the update dialog. Enter runs it. Export session and Session exported keep their footers.DialogButtonstakes an optionalhintslist for this.footerGap={2}is gone), including the Export session and Session exported footers.With new designs off
Two changes are not behind the flag:
DialogButtons(ui/dialog.tsx) gained optional left-sidehintsand a wrapper box around its buttons. The update dialog and the plugin confirm dialog use it in both designs; neither passes hints, and they render identically (pixel-for-pixel in Drive).component/dialog-integration.tsx) also applies to the old design: forms built from integration form fields (Azure resource name, Cloudflare account IDs) lose the same empty row between the title and the input.I captured 11 dialogs before/after with the flag off in the opencode theme. Only the three connect forms changed; rename,
/btw, worktree names, export, export result and update are unchanged apart from timing text.Flag off, Connect: Azure resource name
Flag off, Connect: Cloudflare account ID
Flag off, update dialog after this PR (unchanged)
Screenshots / recordings
OpenCode Drive, opencode2 dark, new designs on. Before (
dev), then after (this PR).Rename session
Connect: Azure resource name
Export session
Session exported
How did you verify your code works?
Captured every affected dialog before and after in OpenCode Drive;
typecheck:tscpasses; tests via CI.