Skip to content

fix(sidebar): style /cmd-settings like the host's list dialogs - #21

Merged
JeffreyJYZ merged 1 commit into
mainfrom
fix/dialog-colours
Nov 14, 2026
Merged

JeffreyJYZ merged 1 commit into
mainfrom
fix/dialog-colours

Conversation

@jyzbot

@jyzbot jyzbot commented Nov 14, 2026

Copy link
Copy Markdown
Collaborator

What

Restyles the /cmd-settings dialog to match opencode's own list dialogs.

Why

The first version read every token from the dialog surface and drew both the title and the value of the focused row in the accent colour, over an accent band, with a fallback band made from the accent at 25 percent alpha. That reads as one saturated block, and it is not how the host draws a selected row.

ui/dialog-select.tsx in the host, which is what every native picker uses, draws a selected row as a primary-coloured title with a secondary-coloured value over background.action.primary.focused, at insets of five and six cells with a one-cell gap.

Changes

  • Active row: title in text.action.primary.focused, value in text.action.secondary.focused, band from background.action.primary.focused, falling back to background.raised.base instead of a tinted accent.
  • Insets and gap now match DIALOG_LIST_INSET: five left, six right, one-cell gap.
  • dialog.set({ size: "large" }) on mount, which is what native list dialogs do; the default size wrapped the description into a ragged block.
  • Behaviour is unchanged: same rows, same cycling, same persistence.

Verification

bun check clean, bun test 263 pass, bun run build clean, and dist/tui.js carries the new dialog.

The focused row drew title and value in the same accent over a tinted
band. Native pickers use a primary title with a secondary value over
background.action.primary.focused, so match that, along with the list
insets and the large dialog size.
@vercel

vercel Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cmdcode-tools-site Ready Ready Preview Nov 14, 2026 10:55am UTC

@JeffreyJYZ
JeffreyJYZ merged commit 123943f into main Nov 14, 2026
10 checks passed
@JeffreyJYZ
JeffreyJYZ deleted the fix/dialog-colours branch November 14, 2026 10:55

This branch was successfully deployed

1 active deployment
Preview — 69c09b31 Deployed Nov 14, 2026 by vercel[bot]
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.

2 participants