Skip to content

fix(tui): use buttons and single-row gaps in prompt and export dialogs - #64944

Merged
jlongster merged 5 commits into
devfrom
dialog-footer-gap
Nov 19, 2026
Merged

jlongster merged 5 commits into
devfrom
dialog-footer-gap

Conversation

@jlongster

@jlongster jlongster commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Cleans up the text prompt and export dialogs under new designs:

  • Buttons instead of the footer band. The text prompt (rename session, /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.
  • Extra keys on the bottom left. Prompt actions such as OAuth copy sit on the left of the button row. DialogButtons takes an optional hints list for this.
  • One blank row above the actions, instead of two (footerGap={2} is gone), including the Export session and Session exported footers.
  • One blank row between title and input in connect forms built from integration form fields (e.g. Azure resource name, Cloudflare account IDs). The field always rendered an empty description box, which took a row in the prompt's gap; it now renders only with a description or an error.

With new designs off

Two changes are not behind the flag:

  • DialogButtons (ui/dialog.tsx) gained optional left-side hints and 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).
  • The connect-form description fix (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

before after

Flag off, Connect: Cloudflare account ID

before after

Flag off, update dialog after this PR (unchanged)

after

Screenshots / recordings

OpenCode Drive, opencode2 dark, new designs on. Before (dev), then after (this PR).

Rename session

before after

Connect: Azure resource name

before after

Export session

before after

Session exported

before after

How did you verify your code works?

Captured every affected dialog before and after in OpenCode Drive; typecheck:tsc passes; tests via CI.

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

@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.

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).

Before

After

Before

After

@jlongster jlongster changed the title fix(tui): use a single blank row around dialog prompt inputs fix(tui): use buttons and single-row gaps in prompt and export dialogs Nov 19, 2026
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

@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 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).

Before

After

}}
buttons={
newDesigns() ? (
<DialogButtons buttons={[{ label: "Submit", run: confirm }]} active={0} hints={extraActions()} />

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 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?

@jlongster
jlongster enabled auto-merge (squash) November 19, 2026 19:14
@jlongster
jlongster merged commit 668a4f4 into dev Nov 19, 2026
14 checks passed
@jlongster
jlongster deleted the dialog-footer-gap branch November 19, 2026 19:14
@amrkmn amrkmn mentioned this pull request Nov 23, 2026
1 task
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