fix(packets): collapsed groups show a right caret, expanded a down caret (#189) - #248
Conversation
…atches it (#189) The collapsed-group case was a knownBug('#189'); it is now a plain test and fails on master (caret-up). New tests pin the expanded caret, aria-expanded on the group toggle row, and no state on a single-observation row. public/packets.js only gains a test hook, _setExpanded, so the unit sandbox can expand a group. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Against the fixture's seeded 3-observation group: right caret and aria-expanded=false when collapsed, down caret and true when expanded, one caret and no CSS triangle in each state. Red on master (caret-up, no aria-expanded, plus the ::before triangle). Registered after the Kpa-clawbot#1122 Details-clamp step so it does not move that time-dependent step (#244). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ret (#189) The Kpa-clawbot#1648 M2 migration mapped the collapsed ▶ to #ph-caret-up, so a collapsed group pointed up. Collapsed is now caret-right and expanded caret-down, the disclosure convention channels.js, network-digest.js, analytics.js and route-view.js already use. The group toggle row gets aria-expanded. style.css drew a second ▶/▼ through .group-header td:first-child::before (it dates from the initial commit, when the cell held no glyph of its own), so the row showed the CSS triangle next to the caret. The two rules are removed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Rapport — CS-MacBook PR#248 #189 caret — head 9959d7aStatus: The collapsed-group caret is fixed on a draft PR, tests and a mutant check are done locally, and CI is pending (not polled by me); the PR stays a draft. Evidence tags: [T] test or run output, [A] assessment or inference, [K] checked in code, diff, git or CI. Branch
Convention chosen: caret-right when collapsed, caret-down when expandedI listed every fold-like glyph in
Four disclosures already use right/down, and it is what the packet group had before the migration, so it needs the least change: two glyph names in one place. Change
Tests and mutants
All four are killed. [T]
CIPending: the run for head Remainder: other carets that are inconsistent with right/down
Not verified
|
Review — CS-Minimax PR#248 group-caret — head 9959d7aDom: APPROVE med nits Independent read-only review of the head above, rebased in scratch onto Findings
No blocking findings. 1. ConventionCollapsed = caret-right, expanded = caret-down is coherent, and the rationale holds [A]. From my own
2. Behaviour
3. Test
4. No other behaviour change
5. Rules
CIRun 37291274005 on this head, attempt 1, conclusion success [T]:
Neither known flake (#244 Details clamp, #250 Tests run (merged tree; Go server built from it; fixture freshened, CI seed SQL,
|
| Suite | Result |
|---|---|
sh test-all.sh |
218 files, 0 failed |
node test-frontend-helpers.js |
707 passed |
node test-packets.js |
132 passed, 0 failed, 0 known bugs |
test-issue-189-group-caret-e2e.js |
3/3 (master frontend: 0/3) |
Packets E2Es from deploy.yml: #96, #147, #180, #1122 filter UX + Details clamp, #1128 layout + multi-viewport, #1147, #1486, #1522, #1657, #1692, #1758, #1180 MQL, filter UX, packet-trace alignment, #1056 slide-over |
all green |
| Own scenario (live update / sort / filter / keyboard) | 11/11 |
test-e2e-playwright.js |
fails at "Version info lives on Perf dashboard" (#navStats wait). It fails identically against master's frontend on the same local server, so it is environmental here and not this PR |
The local servers were stopped by their pid files, and the ports were verified free.
Mutants (own) [T]
| Mutant | test-packets.js |
#189 E2E |
|---|---|---|
A collapsed caret back to caret-up |
killed (1) | killed (2/3) |
B aria-expanded always "false" |
killed (1) | killed (1/3) |
C aria-expanded also on single-observation rows |
killed (1) | survives |
D aria-expanded from !!p._children instead of the expanded state (stale after collapse) |
killed (1) | killed (1/3) |
E CSS ::before ▼ restored for .expanded only |
survives | killed (1/3) |
All five are killed by at least one layer.
Not verified
- Mobile and narrow widths, where the expand column is hidden (F2).
- Firefox and Safari.
- Screen-reader output for
aria-expandedon a table row. - A filter that removes and restores the group (blocked by the hash pin, see 2).
- No staging or production checks, by design.
Relates to #189
A collapsed packet group in the grouped packets view showed an up-pointing caret (
#ph-caret-up). Before the emoji-to-Phosphor migration (30627454, Kpa-clawbot#1648 M2) it showed ▶; the migration mapped ▶ tocaret-up. This is the last open part of #189: theknownBug('#189')case intest-packets.jsis now a plain assertion.Convention
Collapsed is
caret-right, expanded iscaret-down. Disclosures elsewhere in the front end already use this:channels.jssection headernetwork-digest.jsanalytics.js#ptOverviewChevronph-caret-rightroute-view.jspaths chevronph-caret-down, rotated −90° (right)nodes.jsuses up and down differently: "Show all N neighbors" has a down caret and "Show fewer" an up caret. Those are labelled buttons that name an action, not a fold state, so they stay as they are. Right/down needs the smallest change here (two glyph names, in one place) and matches the glyphs the packet group had before.Change
public/packets.js(buildGroupRowHtml): the expand cell rendersph-caret-rightwhen collapsed andph-caret-downwhen expanded. The group row, which is the toggle (tabindex="0",data-action="toggle-select"), getsaria-expanded="false|true"to match. A single-observation row cannot expand, so it has neither a caret noraria-expanded.public/style.css: removes.group-header td:first-child::before(▶/▼). It dates from the initial commit and still applied, because that first cell is now the expand cell, so a collapsed group showed the CSS ▶ next to the sprite (▸ and ^ in the screenshot taken before the fix). Left in, the fix would have shown two right carets.public/packets.jsalso gains a test hook,_setExpanded, next to_setPacketsand_setFilter, so the unit sandbox can expand a group.Tests
test-packets.js: the collapsed-group case is now a plaintest()and fails on master. New cases: an expanded group showscaret-down(not right, not up); the group toggle row reportsaria-expandedfalsethentrue; a single-observation row has no caret and noaria-expanded. 132 passed, 0 failed (128 passed and 1 known bug before).test-issue-189-group-caret-e2e.js(Playwright, registered indeploy.yml) on the seeded 3-observation group, in the grouped view: collapsed (right caret,aria-expanded="false"), expand (down caret,"true"), collapse (right caret,"false"). In each state the cell holds exactly one caret and no CSS::beforetriangle. Red on master (caret-up, noaria-expanded,::before▶/▼), 3 of 3 green on the branch. It is registered after the bug(packets): filter UX disaster — help panel overlaps table, toolbar chaotic, path chips spill rows Kpa-clawbot/CoreScope#1122 Details-clamp step so it does not move that time-dependent step (test: Details-clamp E2E 'advert links in Details stay visible and clickable' is time-dependent and flaky #244).up(killed by both);aria-expandedrenamed (both); the CSS triangle restored (E2E only); right and down swapped (both).sh test-all.sh218/218 files;node test-frontend-helpers.js707 passed, 0 failed;scripts/check-xss-sinks.sh --diff origin/masterexit 0.#96,#147,#180,#966filter UX,#1122filter UX and Details clamp,#1128layout and multi-viewport,#1486,#1657,#1692,#1758, packet-trace alignment,#1056slide-over) pass against a local Go server on a copy ofe2e-fixture.db, migrated as in CI.Not changed
deploy.ymlotherwise unchanged; the fork guards stay at 9 and 1.🤖 Generated with Claude Code