Repository navigation
improve(ui): standardize the segmented control - #190395
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. What this changesThis PR standardizes segmented-control sizing, selection colors, corner radii, and narrow-screen label wrapping. Example: Advanced settings at a 390px viewport.
Review scores
ProductKind: Preference · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep open: this maintainer-authored PR provides useful visual consistency, but introduces a forced-colors keyboard-focus regression in plugin settings tabs. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherControl UI pages pass choices and callbacks to shared Solid controls; shared CSS determines their appearance while existing page owners handle selection changes. flowchart TD
A[Settings and Usage pages] --> B[SettingsSegmented]
C[Plugin settings] --> D[HubTabs]
B --> E[Shared control styles]
D --> E
B --> F[Existing selection callbacks]
D --> F
Technical reviewBest possible solution: Retain the shared presentation change and restore a winning forced-colors focus outline for plugin settings tabs. Do we have a high-confidence way to reproduce the issue? The supplied screenshots demonstrate the original visual inconsistency; source inspection establishes the introduced focus-outline failure without executing target code. Is this the best way to solve the issue? Reusing the existing controls and deleting redundant variants is appropriately small; the new tab focus styling needs the existing forced-colors safeguard. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 47cb40a3b3f0. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource -44, Tests +32. Total -12 across 12 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 1, 2026, 9:29 AM ET / 14:29 UTC. |
Consolidate segmented control variants on the shared neutral surface, preserving full-word labels and native selection, busy and disabled behavior. Keep current main responsive help controls and CRT status colors. Validated with 21 focused tests, UI and UI-test typechecks and touched-file checks. Original approved visual evidence retained.
What Problem This Solves
The same control rendered four ways. Segmented controls measured 32px, 38px, 38.6px and 42px on desktop, and 38px, 42px, 50px and 57px on phone. Selected segments were a neutral lift, a terracotta tint or a terracotta fill depending on the page. On phone,
overflow-wrap: anywherecould split a label mid-word, as in "For/m" on Advanced.User Impact
Segmented controls look and behave the same across Usage, Activity, Skill workshop, Sessions filters, Plugins and Settings:
--radius-mdwith a concentric inner corner, so square themes stay square and no radius shrinks.No capability or copy changes.
Why This Change Was Made
Each instance was judged in its page; the differences that changed were accidents.
variant="accent"andvariant="primary"are removed fromSettingsSegmented.settings-segmented--compactstays as the one deliberate second size, for the composer model menu. Plugin settings tabs keep tab semantics and take the same surface. The fake one-button segmented control behind Usage's Reset becomes a plain small button.Left alone on purpose: hub tabs and skill workshop detail tabs (navigation, not segmented), theme, text-scale, background, secret-mode and sharing option cards (they carry previews or descriptions), command palette and workspace filter chips, the avatar picker (moving it would shrink its 20px radius), the session menu communication picker (its selected state isn't reachable in the mock, so it wasn't changed unseen), and the phone chat header switch (its own sliding thumb).
Overlap: this also resolves the "For/m" wrap on Advanced, which another PR covers. Page images show today's top bar until the header PR lands.
Evidence
Captured from the mock data layer with real navigation. Absolutely light and dark, CRT, and 390px.
Usage, Absolutely light
Advanced at 390px, Absolutely dark
Advanced, CRT (square stays square)
Plugin settings tabs, not pictured: 42px with 11px text becomes the same surface at 32px on desktop and 44px on phone, with 12px text.
Real Safari (After), default theme
Reached by navigation only, so no OS clicks. Safari shows the mock's default theme, not Absolutely, and the 580px window uses the narrow layout, so desktop-width Safari isn't covered.
Mid-word check at 320px and 390px across Usage, Activity, Skill workshop, Advanced, Talk, Skills, Models, Appearance, Plugins and Security: no label split and no overflow. A new browser test covers this, and fails when the old
overflow-wraprule is restored.Empty-track check on these pages and the other settings pages at 320px and 390px: none, against 11 instances at 390px before this fix. A second browser test covers this, and fails without the rule.
Desktop width check at 1280px, 27 controls on 13 pages: the spare-width rule changes none. Against main, only four differ, all from removing the variants: the two Usage card toggles and Form/Raw by about 1px, and the plugin tabs by 19px from the larger text.
Local checks: oxfmt, stylelint, oxlint,
tsgo:ui,ui:check-performance:base, and the settings, usage, config, sidebar filter, session menu and skill workshop unit and browser tests pass.presentation-primitives.e2ehit agototimeout twice on a heavily loaded machine, then passed.Not verified:
Cannot read properties of undefined (reading 'length'), on unmodified main too.