Summary
Two pre-existing URL/state bugs on the packets page. The independent review of PR #167 (fix for #147) found both. Neither is caused by #167. Line numbers refer to #167's head d0a9f28e; the same behaviour exists on master 84c637ea.
Relates to #147, #167.
1. Leaving the page with the SlideOver open overwrites the new page's URL
Where: viewport 641–1023 px, where the packet detail opens in a SlideOver.
Steps:
- Open a packet so the SlideOver shows.
- Navigate to another page (for example Nodes) without closing the SlideOver.
Result: the Nodes page renders, but the address bar is rewritten to the packets route:
A reload or a copied link opens Packets, not the page being shown. The likely cause is the SlideOver close / onClose handler (public/packets.js ~3184), which writes the packets hash during teardown even after the route has changed.
Fix: when the SlideOver (or detail) closes because the page is being left, do not write the hash. Only write it while the current route is still #/packets. Compare the current route before writing, or tear the SlideOver down from destroy() without the hash write.
Test: an E2E at about 800 px: open the SlideOver, navigate to #/nodes, and assert that the address bar is #/nodes…. Repeat after a reload.
2. Clear Filters on a detail URL leaves the subpath, so a reload re-applies the hash filter
Steps:
- Open
#/packets/<hash>?… with filters, so the list shows 1 row.
- Press Clear Filters. The list shows all rows (36 in the fixture), and the Clear button hides.
- Reload.
Result: filters.hash is set from the <hash> subpath again, the list goes back to 1 row, and the Clear button reappears. The URL after Clear (#/packets/<hash>?obs=…) still means "filtered to this hash" on load, so it does not describe what Clear showed.
Fix (decide and document):
- Either Clear Filters also drops the detail subpath, closing the detail and going to
#/packets;
- or a cold load of a detail subpath selects the packet without forcing
filters.hash.
Keep #121/#132's Clear Filters behaviour intact otherwise.
Test: unit and/or E2E covering detail URL → Clear Filters → reload, asserting that the list and the Clear button match what was shown before the reload.
Acceptance criteria
Summary
Two pre-existing URL/state bugs on the packets page. The independent review of PR #167 (fix for #147) found both. Neither is caused by #167. Line numbers refer to #167's head
d0a9f28e; the same behaviour exists on master84c637ea.Relates to #147, #167.
1. Leaving the page with the SlideOver open overwrites the new page's URL
Where: viewport 641–1023 px, where the packet detail opens in a SlideOver.
Steps:
Result: the Nodes page renders, but the address bar is rewritten to the packets route:
#/packets;#/packets?timeWindow=…®ion=…&sort=….A reload or a copied link opens Packets, not the page being shown. The likely cause is the SlideOver close /
onClosehandler (public/packets.js~3184), which writes the packets hash during teardown even after the route has changed.Fix: when the SlideOver (or detail) closes because the page is being left, do not write the hash. Only write it while the current route is still
#/packets. Compare the current route before writing, or tear the SlideOver down fromdestroy()without the hash write.Test: an E2E at about 800 px: open the SlideOver, navigate to
#/nodes, and assert that the address bar is#/nodes…. Repeat after a reload.2. Clear Filters on a detail URL leaves the subpath, so a reload re-applies the hash filter
Steps:
#/packets/<hash>?…with filters, so the list shows 1 row.Result:
filters.hashis set from the<hash>subpath again, the list goes back to 1 row, and the Clear button reappears. The URL after Clear (#/packets/<hash>?obs=…) still means "filtered to this hash" on load, so it does not describe what Clear showed.Fix (decide and document):
#/packets;filters.hash.Keep #121/#132's Clear Filters behaviour intact otherwise.
Test: unit and/or E2E covering detail URL → Clear Filters → reload, asserting that the list and the Clear button match what was shown before the reload.
Acceptance criteria
buildPacketsQuery()output for non-hash callers.public/packets.js).