Repository navigation
Description
Follow-up from the review of #248 (#189 group caret, merged as c12aa60b). Both items were outside that PR's scope. Line numbers refer to master c12aa60b.
1. Node page "Affinity Debug" toggle cannot open, and its carets are reversed
public/nodes.js:920: the <h4> heading of the #node-affinity-debug card has an inline onclick. That onclick is a double-quoted attribute, but it contains the Phosphor sprite markup with its own double quotes (class="ph-icon", aria-hidden="true"). The browser therefore cuts the attribute off at the first inner ". The handler that remains is not valid JavaScript (reported as "Invalid or unexpected token"), so clicking the heading does nothing, and the debug body stays hidden.
The break came with the emoji-to-Phosphor migration (30627454, upstream #1648 M2), the same change that caused #189.
The carets also contradict the convention #248 chose (collapsed = caret-right, expanded = caret-down): the toggle shows caret-down while collapsed and caret-up while open.
The card is only shown when debugAffinity is enabled (client config or the local-storage flag), which is probably why nobody noticed.
Expected:
- the heading toggles the debug body;
- collapsed shows
caret-rightand expanded showscaret-down; - the toggle is a delegated handler instead of an inline
onclickwith nested markup; - ideally the heading is a
<button>witharia-expanded, or follows the same pattern as the packets group rows.
Tests:
- a unit test that renders the card and asserts that the toggle opens and closes and the caret follows;
- a mutant check: put the old inline markup back and the test must fail.
2. Packets group rows announce aria-expanded on mobile, but activation selects instead
public/packets.js:2444 (from #248) sets aria-expanded on multi-observation group rows. On mobile, public/mobile-page-actions.js (upstream #1461 #7) rewrites data-action="toggle-select" to select-hash on click, and the expand column is hidden. A screen-reader user therefore hears "collapsed" on a row that opens the detail pane instead of expanding.
This is a minor a11y issue and not a blocker. Options:
- drop
aria-expanded(or render the row withselect-hash) under the mobile breakpoint, so the announced state matches what activation does; - or keep the attribute and document why.
Tests: a narrow-viewport E2E (or a unit test with isMobile() stubbed) asserting that the row has no aria-expanded when activation selects.
Not in scope
- The other caret uses that the fix(packets): collapsed groups show a right caret, expanded a down caret (#189) #248 review checked. They are sort arrows, move up/down, side-panel collapse, a dropdown trigger and the labelled "Show all / Show fewer" buttons, and they are correct as they are.
Evidence
- Item 1 was checked statically on
c12aa60b. The fix(packets): collapsed groups show a right caret, expanded a down caret (#189) #248 review also parsed the line in Chromium; the attribute ends after 234 characters, and the handler then throws. - Item 2 was checked statically (
mobile-page-actions.js:94-105,packets.js:2444) and has not been tested at mobile width.
Activity
Merge pull request #255 from dborup/codex/issue-254-affinity-toggle-m…
dborup commentedon Oct 5, 2026
Fixed by #255 (merged as
3bb2cb89).test(packets): make the mobile "does not expand" assertions bite (#259)
Merge branch 'master' into codex/issue-259-followups-255