You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
updatePacketsUrl() in public/packets.js rebuilds the hash from buildPacketsQuery(), which only writes filter params. Every call therefore drops packet-detail params it does not own, obs (selected observation) and viewPath (shareable View Path modal), from #/packets/<hash>?obs=…&viewPath=1. The pane keeps showing the selected observation, but the address bar no longer describes it, so a second refresh or a link copied from the address bar loses it.
#132 stopped the type menu from doing this (it now only refreshes the Clear button via updateClearFiltersVisibility()), but the other call sites remain. Found by the independent re-review of #132.
Where it happens (master 5f493f1d)
Cold load:init() calls updatePacketsUrl() to show the Clear button when the page loads with URL filters (around line 1984). Opening #/packets/<hash>?obs=123 directly rewrites it to #/packets/<hash> immediately; ?obs was already parsed (around line 1102), so the first render is right, but the URL is not.
Observer menu and the other filter handlers (region/area onChange, hash/node/channel/filter inputs, time window, sort; around lines 1681–2269).
viewPath is fork-specific (?viewPath=1, around line 1134); obs also exists upstream (reported there as Kpa-clawbot/CoreScope#2091).
Proposed fix
Make updatePacketsUrl() preserve the detail params it does not own when it rebuilds the query, e.g. read obs and viewPath from the current hash and re-append them after buildPacketsQuery(...). One place, fixes every caller, including init().
Keep buildPacketsQuery() itself filter-only (it is also used for API/other URLs). Consider whether viewPath should survive filter changes or be consumed once (it opens a modal on load); decide and test explicitly.
Acceptance criteria
Cold load of #/packets/<hash>?obs=123 and …?obs=123&viewPath=1 keeps those params in the address bar.
Changing observer, region/area, hash/node/channel/filter, time window or sort keeps obs (and viewPath per the decision above) while updating the filter params.
Summary
updatePacketsUrl()inpublic/packets.jsrebuilds the hash frombuildPacketsQuery(), which only writes filter params. Every call therefore drops packet-detail params it does not own,obs(selected observation) andviewPath(shareable View Path modal), from#/packets/<hash>?obs=…&viewPath=1. The pane keeps showing the selected observation, but the address bar no longer describes it, so a second refresh or a link copied from the address bar loses it.#132 stopped the type menu from doing this (it now only refreshes the Clear button via
updateClearFiltersVisibility()), but the other call sites remain. Found by the independent re-review of #132.Where it happens (master
5f493f1d)init()callsupdatePacketsUrl()to show the Clear button when the page loads with URL filters (around line 1984). Opening#/packets/<hash>?obs=123directly rewrites it to#/packets/<hash>immediately;?obswas already parsed (around line 1102), so the first render is right, but the URL is not.onChange, hash/node/channel/filter inputs, time window, sort; around lines 1681–2269).viewPathis fork-specific (?viewPath=1, around line 1134);obsalso exists upstream (reported there asKpa-clawbot/CoreScope#2091).Proposed fix
Make
updatePacketsUrl()preserve the detail params it does not own when it rebuilds the query, e.g. readobsandviewPathfrom the current hash and re-append them afterbuildPacketsQuery(...). One place, fixes every caller, includinginit().Keep
buildPacketsQuery()itself filter-only (it is also used for API/other URLs). Consider whetherviewPathshould survive filter changes or be consumed once (it opens a modal on load); decide and test explicitly.Acceptance criteria
#/packets/<hash>?obs=123and…?obs=123&viewPath=1keeps those params in the address bar.obs(andviewPathper the decision above) while updating the filter params.?obs=(unit + a Playwright check at desktop width); the existing Clear Filters tests keep passing.buildPacketsQuery()'s output for callers that use it outside the hash.Non-goals
No redesign of the filter bar or URL scheme; no deploy.