Follow-ups from the review of #255 (#254, merged as 3bb2cb89). Items 1 and 2 are pre-existing behaviour that #255 did not cause. Items 3 and 4 are test gaps in #255's own tests. Line references are to master 3bb2cb89.
1. An expanded packet group has no collapse path after crossing to mobile width
At 1400 px, expand a multi-observation group in the grouped packets view, then resize to ≤ 600 px. The row re-renders as select-hash without aria-expanded, as #255 intends. It keeps class="expanded", though, and its child rows stay visible. The expand column is hidden at that width, so nothing can collapse the group.
Before #255 the same row announced a stale aria-expanded="true", so this is not a regression. It is the dead end that upstream #1461 #7 describes.
Expected: a group expanded on desktop does not leave visible children on mobile without a way back. For example:
- clear the hash from
expandedHashes when the layout mode flips to mobile; or
- keep the state but omit the child rows from the visible slice while in mobile mode, so they come back on desktop.
Test: an E2E that expands a group at 1400 px, resizes to 390 px and asserts that no child rows are visible, or that the group can be collapsed. Add a mutant without the fix.
2. nodes.js adds a document keydown listener (nodesEsc) on every node-page init
init() adds the listener on each visit, and it is only removed when Escape is pressed. Navigating between nodes A → B → C stacks three listeners, and Escape then sets the same hash three times. That is harmless today, but the listeners leak.
Expected: at most one listener. Remove it in the page's destroy(), or register it once. Add a test that counts the listeners, or the hash writes, after repeated navigation.
3. Test gap: the unit test does not prove that the node page uses the new renderer
test-issue-254-affinity-debug-toggle.js exercises renderAffinityDebugCard() in isolation. A mutant that puts the old inline onclick card back into the loadFullNode template, and leaves the renderer exported but unused, passes the unit test 9/9; only the E2E catches it. The "no inline event handler anywhere in the card" case is also green on master, because it scans an empty string there.
Expected: a fast-layer assertion that the loadFullNode template uses renderAffinityDebugCard(), or that nodes.js has no onclick= in the #node-affinity-debug card.
4. Test gap: Space on a mobile group row
The #254 E2E presses Enter on a 390 px group row but not Space. The handler treats both keys the same, and the review checked Space by hand: the detail sheet opens and the group does not expand. Add Space to the E2E.
Evidence
Follow-ups from the review of #255 (#254, merged as
3bb2cb89). Items 1 and 2 are pre-existing behaviour that #255 did not cause. Items 3 and 4 are test gaps in #255's own tests. Line references are to master3bb2cb89.1. An expanded packet group has no collapse path after crossing to mobile width
At 1400 px, expand a multi-observation group in the grouped packets view, then resize to ≤ 600 px. The row re-renders as
select-hashwithoutaria-expanded, as #255 intends. It keepsclass="expanded", though, and its child rows stay visible. The expand column is hidden at that width, so nothing can collapse the group.Before #255 the same row announced a stale
aria-expanded="true", so this is not a regression. It is the dead end that upstream#1461#7 describes.Expected: a group expanded on desktop does not leave visible children on mobile without a way back. For example:
expandedHasheswhen the layout mode flips to mobile; orTest: an E2E that expands a group at 1400 px, resizes to 390 px and asserts that no child rows are visible, or that the group can be collapsed. Add a mutant without the fix.
2.
nodes.jsadds a documentkeydownlistener (nodesEsc) on every node-page initinit()adds the listener on each visit, and it is only removed when Escape is pressed. Navigating between nodes A → B → C stacks three listeners, and Escape then sets the same hash three times. That is harmless today, but the listeners leak.Expected: at most one listener. Remove it in the page's
destroy(), or register it once. Add a test that counts the listeners, or the hash writes, after repeated navigation.3. Test gap: the unit test does not prove that the node page uses the new renderer
test-issue-254-affinity-debug-toggle.jsexercisesrenderAffinityDebugCard()in isolation. A mutant that puts the old inlineonclickcard back into theloadFullNodetemplate, and leaves the renderer exported but unused, passes the unit test 9/9; only the E2E catches it. The "no inline event handler anywhere in the card" case is also green on master, because it scans an empty string there.Expected: a fast-layer assertion that the
loadFullNodetemplate usesrenderAffinityDebugCard(), or thatnodes.jshas noonclick=in the#node-affinity-debugcard.4. Test gap: Space on a mobile group row
The #254 E2E presses Enter on a 390 px group row but not Space. The handler treats both keys the same, and the review checked Space by hand: the detail sheet opens and the group does not expand. Add Space to the E2E.
Evidence
3bb2cb89.