Repository navigation
fix(ui): a glass pane does not change on focus - #14992
Conversation
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Verify the maintainer's disposition comment exists on this head — the caret-only accessibility trade-off rests entirely on that recorded authorization. Suggestions
[DESIGN-REVIEWED] 95ba9ef Description read[DESCRIPTION-READ] ef5f676e2d254580584c9816674d5ce160ad7426821abb7eb0cde7627f14363e That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
GPT 5.6 Review — ✅ no blocking findingsGPT 5.6 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
First Principles Review (Fable 5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Verify the maintainer disposition ("两边都改成完全无区别") is actually recorded on this head — the deleted WCAG 2.4.7 focus-cue pin rests entirely on it. Not justified as shipped
What this change shipsInventory (9 items) — 7 justifiedIntent: FIX — a Liquid Glass pane must look identical whether or not a control inside it has focus, per the quoted maintainer decision following #14887.
Deleted pins (the focus-step tests, the WCAG 2.4.7 comment) are reversed openly: the description names the reversal, quotes the decision, and accepts the accessibility trade-off explicitly; the new negative pins fail on base. Grep of [FIRST-PRINCIPLES-REVIEWED] 95ba9ef Description read[DESCRIPTION-READ] 6f96ee1b1b75dd555fc2fa5d26209d04f3cefa447c93751a735dc5b90af58c93 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Fable 5) — ✅ PASSUX-level review of UX-Verdict: PASS Blind reader could barely tell focused panes from resting ones — "if I looked away I couldn't tell which state I was in" — confirm that glance cost is the accepted decision's full extent. [UX-REVIEWED] 95ba9ef Description read[DESCRIPTION-READ] e259f182fff357a3672312871cf69b3cd00656c909b92ff4ec05f14e4364dd45 That sha256 names everything this verdict read: the PR description, plus the 17 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
361df84 to
e10dbf6
Compare
#14887 left one focus step on the Liquid Glass panes: while a control inside a `.glass-shadow` pane had focus, the side lines swapped to --glass-edge-focus (dark 14% -> 55% white, light 24% -> 60% black) and the shadow deepened (6% -> 14%, dark 30% -> 55%). The maintainer read that step, like the brighter focus tint before it, as a second, whiter box sitting on the transcript, and decided a focused pane is the same glass as a resting one -- in glass mode and in the solidified modes alike. The --glass-edge-focus token and every `.glass-shadow:focus-within` rule are removed; `.glass-shadow.approval-glow` keeps the pending glow in the shadow slot. The composer's focus indicator is the caret; a glass chip that is itself a button keeps the app's :focus-visible ring; the desktop Settings search bar is a boxed input and keeps its neutral ring. The focus-cue-ok comments on the composer textarea and the mobile Settings input now state that decision instead of a cue, the Glass contract docblock and the theming contract follow, the CSS pins assert that no `.glass-shadow` rule matches :focus-within and no token has a focus form, and the capture harness asserts the pane is byte-identical before and after focus (with and without a pending approval, and on the Settings capsule).
e10dbf6 to
95ba9ef
Compare
|
|
|
|
Read-only review note. The change does what it says (the three .glass-shadow:focus-within rules and --glass-edge-focus are removed; check_focus_cue.py logic is untouched). Flagging for a human decision rather than a bot approval: after this the composer textarea (ChatInput.tsx:4457), the list search (SearchFilterBar.tsx:61) and the mobile Settings capsule (SettingsSearch.tsx:184) show only the caret on focus. A caret blinks, is hard to see at high zoom or low vision, and disappears while text is selected, so whether it satisfies WCAG 2.4.7 is arguable and it does not meet the 2.4.11/2.4.13 focus-appearance intent. Glass buttons keep their :focus-visible ring. The PR body accepts the trade-off knowingly; a maintainer should record that acceptance explicitly, or keep a subtle non-glass ring (e.g. outline on :focus-visible only) on these three inputs. |
bolichen97
left a comment
There was a problem hiding this comment.
Reviewed on behalf of the maintainers (sweep 2026-09-29): readiness passed, required checks green on 95ba9ef, no blocking review threads, security posture unchanged. Recording explicitly, per @iamwhatever's note: the caret-only focus cue on glass panes is the accepted product decision from the #14887 follow-up; approving and merging.
Problem / Motivation
Goal: A Liquid Glass pane looks the same whether or not a control inside it has focus -- every pane: the composer dock, the mobile Settings search capsule, and the session-list / crew-roster search fields (
SearchFilterBar, #14896). #14887 removed the composer's accent halo and the brighter focus fill but left one focus step: the side lines darkened and the shadow deepened while the textarea (or the mobile Settings search field) had focus. The maintainer, looking at the shipped frames, read that step as the same fault in a smaller size -- a second, whiter box on the transcript -- and decided the pane does not change on focus at all: "两边都改成完全无区别".Before this change, on a
.glass-shadowpane holding focus:--glass-edgeswapped to--glass-edge-focus(dark#ffffff24->#ffffff8c, light#0000003d->#0009);rgba(0,0,0,.06)->.14, dark.30->.55).Why it matters
The composer is the most-focused element in the product. Every focus rendering it carries is what the whole material is judged by; a pane that gets crisper edges and a darker halo when tapped reads as a state change on the box, when the state change the user made is "I am typing here" -- which the caret already shows.
Not a goal
--borderoutline: all as landed in fix(ui): fade the context shelf onto page colour; drop the composer's accent focus #14887.focus-ringfrom fix(ui): fade the context shelf onto page colour; drop the composer's accent focus #14887.What changed (motivation → approach → change)
The focus step is gone
Symptom: focusing the composer darkened the pane's side lines and deepened its shadow. Cause:
.glass-shadow:focus-within(three rules inindex.css) and the--glass-edge-focustoken. Change: all four removed..glass-shadowis one rest shadow per polarity plus theapproval-glowswap; no rule on it matches:focus-within, and no glass token has a focus form.rgba(0,0,0,.30) 0 0 18px#ffffff24#1e1e2266rgba(0,0,0,.06) 0 0 18px#0000003d#f0f0f073--borderoutlineMeasured on the built page (
capture-liquid-glass.mjs): dock shadow, side line, tint and wrapper border are equal before and after the textarea takes focus, in both polarities, with a pending approval (the glow stays in the shadow slot), and on the mobile Settings capsule.The same rule reaches every other
.glass-shadowpane, which is the point: the session-list and crew-roster search fields (SearchFilterBar.tsx, landed in #14896 as glass panes with a transparentoutline-hiddeninput) lose the same step and show only their caret on focus. No component code changes there; theirfocus-cue-okcomment and the module docblock now record the decision instead of claiming the step.Comments say the decision, not a cue
The
focus-cue-okcomments on the composer textarea (ChatInput.tsx), the mobile Settings search input (SettingsSearch.tsx) and the list search input (SearchFilterBar.tsx) claimed the pane's focus step as their cue, and two moreChatInput.tsxcomments (the dockGlassand the clip wrapper) said "the focus step stays" under an approval glow. They now state the maintainer decision: the pane does not change on focus, the caret is the indicator. TheGlass.tsxcontract docblock, theSidePanelLayoutcapsule comment, theindex.csstoken, shadow, Settings-search-ring and solid-fallback comments (including the dangling one at the end of the contrast block that described the deleted rule) andwebsite/docs/theming-contract.md(the polarity-fixed variable list) say the same.scripts/check_focus_cue.pykeeps its window and is green; its one comment describing the composer's cue is reworded to the decision.grep -riE 'glass-shadow:focus-within|focus step|edge focus' website/src scripts/check_focus_cue.py(tests excluded) returns nothing.Backwards compatibility
CSS only: one token and three rules removed, none with a consumer outside
index.css. No API, config or stored data changes.Tests
ChatInput.liquidGlass.test.tsx: the token pins drop--glass-edge-focus; the shadow test pins the two rest shadows and theapproval-glowswap, and asserts that no.glass-shadowrule matches:focus-withinand that neither--glass-edge-focusnor--glass-tint-focusexists.capture-liquid-glass.mjs: the composer, approval and mobile-Settings scenes now assert the pane is unchanged by focus (shadow, side line, tint, wrapper border) instead of asserting a delta, and photograph the focused states with the caret drawn (a frame with no caret caught fails the run).capture-glass-search-dock.mjs: the sessions scene focuses the search input, asserts the glass field's shadow, side line and tint are unchanged, and photographs the focused state.Manual verification
tsc,eslint(touched files),i18n-check,check_focus_cue.py: green.capture-liquid-glass.mjson the built SPA: 100 frames (shelf-r18), every focus assertion above passing; the composer and Settings frames below come from that run.capture-glass-search-dock.mjsagainst a loopback vite of this head: the sessions search field frames below, focus assertions passing in both polarities.Screenshots / video
Rest / focused, dark and light: the pane is identical by design -- it does not change when the textarea takes focus; the caret in the focused frames is the indicator. (Playwright hides the caret in screenshots by default, so the harnesses now take the focused frame with the caret left alone and keep the take in which it is drawn --
scripts/lib/screenshot-with-caret.mjs, shared by both capture scripts; the on/off probe reads the focused input alone, never a region with motion of its own such as the pulsing approval glow.)Approval pending, focused: the glow stays; the glass is unchanged.
Mobile Settings capsule up close, rest then focused, dark and light: the pane is identical; the caret is the only difference.
Session-list search field (
SearchFilterBar, the glass pane from #14896), rest then focused, dark and light: identical too.capture-glass-search-dock.mjsreads the pane's shadow, side line and tint before and after the input takes focus and asserts they are equal (the only pixels that differ between the two frames are the two pulsing "running" dots in the list).Related Issues
Follow-up to #14887 (the focus step it left) and #14568.
Pattern harvest
Rule candidate: review-prompt
Pattern: when a maintainer says a state must look "the same", check the computed style for EVERY property the state could touch (shadow, edge, tint, border), not just the one that was changed last; a "no change" claim is a set of equalities, and the harness should assert all of them.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)