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

Persist lab filter selection in localStorage

Opened by keeb · 4/13/2026· Shipped 4/25/2026

Problem

When you select a filter on the Lab issues page (e.g. "Assigned to me", a status filter, or a type filter), then hard-refresh the page, the filter resets to the default "Open" view. This is annoying when you're working through a specific filtered list — every refresh loses your place.

Current behavior

Filter state lives only in the URL path and an in-memory Preact signal. Navigating between filters updates the URL via history.pushState, but a hard refresh always hits the server route which defaults to DEFAULT_LAB_FILTER (open issues). The URL-based filter only persists through client-side navigation, not across full page loads.

Proposed solution

Save the active filter selection to localStorage when the user changes it. On page load, if no filter slug is present in the URL (i.e. the user navigated to /lab directly or did a hard refresh), read the last-used filter from localStorage and apply it instead of falling back to the default.

Key considerations:

  • URL filters should take precedence over localStorage (deep links like /lab/assigned-to-me must still work)
  • localStorage is the fallback only when the URL doesn't specify a filter (bare /lab)
  • The "assigned-to-me" filter should only restore if the user is still authenticated
  • Clear/ignore stale localStorage values that don't map to a valid filter

Alternatives considered

  • URL query params: Would survive refresh but clutters URLs and changes the current routing model
  • Cookie-based: Works but localStorage is simpler for client-only state
  • Do nothing: Users re-select their filter every refresh, which is the current pain point
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPEDTRIAGE+ 8 MOREREVIEW+ 3 MOREPR_MERGEDSHIPPED

Shipped

4/25/2026, 7:46:11 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
keeb assigned keeb4/14/2026, 4:13:42 PM

Sign in to post a ripple.