fix(next): webviews check gate passes text-focus and lint (base red)

Closed
TE
16d ago
+32-2

web / react-apps-check shard 1 runs bun run check in webviews (the "Check webviews (Oxlint, Oxfmt, type check)" gate). On feat-cmux-next it stops at check:text-focus, and the vp check after it fails on lint warnings (config/vite-plus/check.ts sets denyWarnings). Every web PR inherits that gate failure.

text-focus (3 Swift hits)

  • WorkspaceTodoPageView.swift:13, WorkspaceTodoRow.swift:21: the TextFields get .focusEffectDisabled(), as every other CmuxNext text field has.
  • AddressBarView.swift:104: a false positive. field is an AddressField, a ChromeTextField, whose init sets focusRingType = .none. The line gets a text-focus-allow: note with that reason.
  • WorkspaceTodoRow's done mark used Color.accentColor. Since this PR touches the file, the PR-scoped check-system-blue test would own that finding, so it now uses Color(nsColor: Palette.accent), the theme token the checker asks for.

lint warnings (10, all on base)
Line-level oxlint-disable-next-line notes with reasons, no markup or behavior change:

  • ChatDisplaySettings.tsx (4) and DensityCard.tsx (2): control-has-associated-label on inputs that already sit inside a <label> with their text, and a datalist <option> whose value is its text.
  • NowPlayingPlayer.tsx, NewTabScreen.tsx, DensityCard.tsx: prefer-tag-over-role. In NewTabScreen the existing note sat on <span and no longer covered role="group" two lines down, so it now sits on the role line.
  • ThreadMinimap.tsx: exhaustive-deps on the layout effect that runs after every commit on purpose (added is measured in render and guards its setState). It's an oxlint- note, not an eslint- one, so the React Compiler doesn't skip the component.

Still needed for a green gate: #22490 (5 unformatted settings files and the 10 TS2345 errors on import.meta.hot.on). With both PRs, check:text-focus passes and vp check --no-fmt reports 0 warnings, leaving only the 10 type errors #22490 removes.

Verification (Huge Blue, Linux, bun 1.4.2, at feat-cmux-next b4bb0931ac0d)

$ python3 scripts/cmux-next/check-text-focus-rings.py
check-text-focus-rings: no focus ring on a text field
$ cd webviews && vp check --no-fmt
Found 10 errors and 0 warnings   # base: 10 errors and 10 warnings; the errors are #22490's
$ vp fmt --check <touched tsx files>
All matched files use the correct format.

With CMUX_PR_CHANGED_FILES set to this PR's files, these pass: check-system-blue, ui-rules, tooltip-rules, theme-colors, hairline-rims, agent-pane-chat-display, new-tab-now-playing and the four thread-minimap tests. gallery-coverage's "every cover names a component or page that exists" timed out at 5 s on the loaded box, and it does the same on the base.

Swift was not built here (no Mac builds on these hosts). The changes are one modifier on two TextFields, a comment, and a Color(nsColor:) wrapper of Palette.accent in a file that now imports CmuxNextDesign, which CmuxNextApp already depends on.

Risk

Low. Lint comments, one focus-effect modifier pair, one theme color.

Changelog

none

๐Ÿค– Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes the webviews check gate on feat-cmux-next so check:text-focus, vp check, and check-layers pass, unblocking every web PR that inherited the failure.

  • Adds a focus-effect modifier to two Swift TextFields and a text-focus-allow note for a false positive (the field's init sets focusRingType = .none).
  • Switches the done mark to Palette.accent and adds line-level oxlint-disable-next-line suppressions with reasons for 10 lint warnings โ€” no behavior change.
  • Gives the Liquid Glass find pill a reduced-transparency fallback (prefers-reduced-transparency and data-reduce-transparency) that turns off the backdrop-filter.

Still red

  • A fully green gate also needs #22490, which fixes 5 unformatted settings files and the 10 TS2345 errors on import.meta.hot.on.