Skip to content

fix(ui): unify find bars, settings spacing, viewer toolbars, and focus rings - #2565

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

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

Conversation

@kitlangton

Copy link
Copy Markdown
Collaborator

Pressing ⌘F now opens the same compact search bar in sessions, terminals, and file viewers, while settings cards, viewer toolbars, browser prompts, and keyboard focus rings follow shared tokens.
Terminal search previously lacked previous/next step buttons and code search used a taller dark-grey bar with an always-visible 0/0 counter. Search behaviour, shortcuts, and file editing are unchanged.

❌ Before

  1. Pressing ⌘F showed three different bars: 240×28 in sessions (× announced as "Find in session"), 220×28 without step buttons in terminals, and 32 pt #121212 showing 0/0 when empty in files and diffs.
  2. Settings jumped its rail and content margin by 28 pt at 1008 pt, paired a 16 pt-padded Server Connection card above 20 pt-padded Preferences cards, and pulled row descriptions upward with negative margins.
  3. File viewer toolbar buttons (25×25, 13 pt icons), browser install actions, and top-bar dismiss buttons (20 vs 28 pt) mixed sizes and omitted standard keyboard focus rings or press states.

✅ After

  1. Session, terminal, and file/diff search share the 240×28 pt bg_base bar (13 pt input, 11 pt tabular match count hidden when empty, 20×20 4 pt-radius step and close buttons with ⌘G/⇧⌘G/Esc tooltips, and an outer focus ring that never shifts inner text).
  2. Settings interpolates its column gutter smoothly across 800–1008 pt, aligns Server cards on 20 pt horizontal padding with an 11 pt micro-badge, and spaces row descriptions with explicit 18 pt line height and 4 pt gap.
  3. File viewer actions (28×28, 16 pt icons, visible image metadata), browser empty/retry/dismiss controls, plugin inspector chrome (12 pt corners, 0.5 pt dividers, 440/530 weights), terminal paste/link confirmation modals, and remote folder picker menus share concentric popover geometry and forced-color-aware focus rings.
- session find (240×28, border swap) | terminal find (220×28, no step btns) | code find (32pt #121212, "0/0")
+ unified 240×28 bg_base bar -> 13pt input + hidden-when-empty 11pt count + 20×20 r4 prev/next/close + outer focus ring

- settings width < 1008 -> 0pt margin, >= 1008 -> 28pt jump; server card px(16); bespoke focus_ring / button shells
+ smooth 800..1008 interpolation; server card px(20); FocusExt + popover::MENU + 28×28 r6 toolbar grid

📊 Proof

Surface Before After
Terminal ⌘F bar ❌ 220×28 pt, no Prev/Next buttons, 2 pt close radius ✅ 240×28 pt, 20×20 r4 Prev/Next/Close + ⌘G/⇧⌘G/Esc tooltips
Code & diff ⌘F bar ❌ 32 pt height, #121212/#f8f8f8, shows 0/0 when empty ✅ 240×28 pt bg_base + floating, count hidden when empty
File viewer toolbar ❌ 25×25 pt (13 pt icon), no press/focus, hover-hidden image meta ✅ 28×28 pt (16 pt icon) with press/focus, image meta visible at rest
Settings › Server & rail ❌ 28 pt snap at 1008 pt, 16 pt vs 20 pt card spine, 9 pt badge ✅ Smooth 800–1008 pt ramp, aligned 20 pt cards, 11 pt badge
Browser, picker & inspector ❌ Unreactive Download CTA, 20/28 pt dismiss, 6 pt inspector corners ✅ Shared widgets::button, 24×24 dismiss, 12 pt inspector + FocusExt
Terminal ⌘F — Before Terminal ⌘F — After
Terminal find before Terminal find after
Files ⌘F & toolbar — Before Files ⌘F & toolbar — After
Files find before Files find after

👀 Read: crates/opencode-code-view/src/find_bar.rs and features/terminal-surface/src/find.rs, where clicking Previous/Next steps the match while keeping keyboard focus on the search input, and features/settings/src/shell.rs for the 800..=1008 pt rail/gutter ramp. The rest is routine.

🔍 Found in a UI audit · no user reports · verified against 2× headless renders

Checks run
  • cargo check --bin opencode-desktop: pass
  • cargo check -p session-view --examples: pass
  • cargo check -p opencode-web --target wasm32-unknown-unknown: pass
  • cargo build --bin opencode-desktop: pass (0 warnings in touched files)
  • bash scripts/guardrails.sh: 12/12 pass

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