webviews: new page code passes ui-rules and tooltip-rules (base red)
ui-rules ("migrated page code has no raw roles, tab indexes, key handlers or portals") and tooltip-rules ("no element whose text shows on screen also has a tooltip") are red on feat-cmux-next for lines added since they last passed.
ui-rules (6 lines). Each is a deliberate exception of a kind the code already marks with ui-allow: (WidthField, FloatingChat, imeKeys), so each gets the note and its reason. No markup or behavior changes.
DensityCard(bc4dce8300d5): the tiles are buttons in the ARIA radio pattern; native radios would change their keys and look.AppearanceBar(1789a0a35b9b):role="toolbar"names the floating Undo, Redo and Reset row.NumberListEditor(1d627878a9cb): the token field's own editing keys.EnvironmentPicker(b0fa7941918a): the ⌥⌘1–9 shortcut.pageKey.ts(2cb4edc0fccd): a key press only marks the page key.
tooltip-rules (8 lines). The rule (#20375) allows a tooltip only on a control with no text of its own, or one that carries a shortcut.
- Removed: MobileCard's Remove button ("Removes this phone", e29f59c89cfc), the background-task note's and summary row's "Show output" (e774d5374b91), and the subagents prototype's timeline-lane title.
- Kept with a
tooltip-allow:reason: Composer Stop (585b68985e01), which is icon-only and, once armed, shows only the Esc key; AgentPairNote's raw error (8bd7fcd1b888), which shows nowhere else; the prototype's HarnessMark (an initial standing in for a mark) and its Steps toggle (carries ⌥⌘T).
Verification (Linux, bun 1.3.14, at feat-cmux-next 2cd6ae166f69)
$ bun test test/ui-rules.test.ts test/tooltip-rules.test.ts
base: 2 fail (6 and 8 findings)
head: 5 pass, 0 fail
$ bun test src/pages/settings/mobileCard.test.tsx test/agent-pane-agent-pair.test.tsx test/agent-pane-agent-pair-row.test.tsx
20 pass
$ vp check
pass (format, lint, types)
Changelog
none
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes the red ui-rules and tooltip-rules checks on feat-cmux-next without changing markup or behavior.
For ui-rules, six deliberate exceptions now carry ui-allow: comments with reasons, matching the pattern already used in the codebase: button tiles in an ARIA radio pattern, AppearanceBar's toolbar role, NumberListEditor's field-local editing keys, EnvironmentPicker's ⌥⌘1–9 shortcut, and a pageKey key press that only marks the page key.
For tooltip-rules, removes tooltips that duplicated visible text (the Remove phone button, both "Show output" links, and the subagents timeline lane) and marks with tooltip-allow: the four justified ones: the icon-only Composer Stop, AgentPairNote's raw error (visible nowhere else), the HarnessMark initial, and the Steps toggle that carries ⌥⌘T.