Skip to content

fix(ui): unify dialogs and keep toast warnings readable - #2563

Open
kitlangton wants to merge 2 commits into
devfrom
ui-audit-batch-c
Open

kitlangton wants to merge 2 commits into
devfrom
ui-audit-batch-c

Conversation

@kitlangton

@kitlangton kitlangton commented Dec 6, 2026 •

Copy link
Copy Markdown
Collaborator

Dialogs share consistent corners and controls, and long toast warnings stay readable.

❌ Before

  1. Todo and suggestion popovers had separate surface styling; Connect and MCP duplicated dialog helpers.
  2. Sign-in and confirmation dialogs used different corners, scrims, and buttons. Delete's surface looked neutral.
  3. Toast titles truncated important explanations, and clicking × skipped the exit animation.

✅ After

  1. Composer lists use the shared list surface and active-row highlight.
  2. Shared form/list dialog chrome, semantic status colors, standard trust buttons, and tinted destructive actions replace local variants.
  3. Warning titles wrap fully. Compact Undo titles show a full-text tooltip only when truncated. Dismissal slides and fades; toast/upload controls gain focus feedback.
- duplicated modal chrome + bespoke popover frames
+ shared dialog kinds + canonical list surfaces
- truncate every toast title; close instantly
+ wrap warnings; tooltip compact actions; animate close

📊 Proof

Delete — before Delete — after
Neutral delete surface Tinted delete surface and shared corners

Complete warning title in the new Long warning story:

Untruncated warning

Dismiss-control detail: clicking × preserves the downward fade.

toast-dismiss-detail.mp4

Four dark-mode Retina After captures were inspected beside the audit's Before captures with matching dimensions. The toast After uses the new long-warning variant to demonstrate wrapping.

No automated tests were added or run, per repository policy.

👀 Read: crates/opencode-ui/src/widgets.rs for the shared modal presence transitions: the layer owns scale, while the card rides it. View-level close callbacks explicitly restore animation after legacy instant handlers; keyboard routes outside this batch remain unchanged.

Found in the UI audit, plus a reported toast truncation/dismissal bug. Batch C: P1-01, P1-02, P2-05, P2-06, P2-08; owned portions of P1-04, P1-06, P1-07, P1-08. Base: dev, where the audited code lives.

Checks run
  • bash scripts/guardrails.sh: 12/12 passed.
  • cargo check --bin opencode-desktop: passed.
  • cargo check -p session-view --examples: passed before the review follow-up.
  • cargo check -p opencode-web --target wasm32-unknown-unknown: passed before the review follow-up.
  • cargo build --bin opencode-desktop --message-format=json: passed.
  • git diff --check: passed.
  • Ran the compiled app headlessly for Todo, MCP sign-in, Delete, and Long warning captures; inspected dismissal frames.
  • Existing compiler warnings remain.

hint: if you need to wait for this pull request to be reviewed, merged, or closed before continuing, use this instead of polling:
gh event listen --resource #2563 --event com.github.pull_request.review.submitted.v1,com.github.pull_request.state.changed.v1

  • It prints the first event as a JSON line on stdout and exits; run it again to wait for the next one.
  • Add --timeout to stop waiting after a while, for example --timeout 30m; it then exits with status 8.
  • Events carry no details; read the pull request to see what changed.
  • It misses changes made before it starts, so read the pull request once it is running.
  • See gh event listen --help for other event types.

This branch has not been deployed

No deployments
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.

1 participant