Skip to main content
← Back to list
01Issue
FeatureClosedSwamp Club
Assigneeskeeb

Relationships

#169 Server-side parse query params on /lab/all so refresh preserves multi-filter URLs

Opened by keeb · 4/25/2026

Problem

The Lab slug route handler at routes/lab/[slug].tsx reads only the URL path segment (e.g. "all") and ignores query string parameters when computing initialFilter. So when a user navigates with multiple filters active (URL becomes /lab/all?status=triaged&type=bug) and hard-refreshes, the server passes initialFilter: { kind: "all" } to LabShell, which seeds filters.value to [], dropping the URL's filters on the floor.

The client urlToFilters() helper already exists and parses query params correctly (used by the popstate handler). The server just doesn't call it.

Current behavior

  1. User clicks "Triaged" + "Bug" filters → URL becomes /lab/all?status=triaged&type=bug
  2. User hard-refreshes
  3. Server reads slug "all" → initialFilter: { kind: "all" }
  4. LabShell seeds filters as []
  5. User sees all issues, not the triaged-bug subset they were looking at

The URL still shows the query params, but the UI doesn't reflect them.

Proposed solution

In routes/lab/[slug].tsx, when the slug is "all" (or any filter slug), parse query params via the existing urlToFilters(ctx.req.url) and pass an initialFilters: LabFilter[] prop to LabShell — replacing or augmenting the single initialFilter prop. LabShell already supports a multi-filter array internally; this just plumbs the server-side parse through.

  • Discovered during triage of swamp-club#96 (Persist lab filter selection in localStorage). That issue handles the bare-/lab fallback case via localStorage; this issue handles the orthogonal /lab/all + query params case via SSR.
02Bog Flow
OPENTRIAGEDIN PROGRESSCLOSEDTRIAGE+ 5 MOREREVIEW+ 3 MOREPR_MERGED

Closed

5/11/2026, 4:48:25 PM

No activity in this phase yet.

03Sludge Pulse
keeb assigned keeb4/25/2026, 7:31:08 PM
Editable. Press Enter to edit.

keeb commented 5/11/2026, 4:48:37 PM

This was resolved and merged.

Sign in to post a ripple.