Skip to content

feat(web): usage row drill-down — server half (AGT-4297) - #825

Merged
unohee merged 1 commit into
mainfrom
wt/linear-agt-4297
Oct 5, 2026
Merged

unohee merged 1 commit into
mainfrom
wt/linear-agt-4297

Conversation

@unohee

@unohee unohee commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

Linear

AGT-4297 — feat(web): usage row drill-down, cross-axis filters + stage decomposition.
Server half only; the 8 UI findings stay out of scope as FOLLOW_UP.

What changed

Reserved-param parsing (parseUsageQuery, USAGE_RESERVED_PARAMS) moves out of
src/support/web.ts into a dedicated route module, and /api/usage gains
cross-axis filtering (?by=stage&project=X).

  • src/support/usageRoute.ts (new) — reserved-param parsing + axis filter
  • src/support/usageLedger.ts — filter ledger rows by axis
  • src/support/web.ts — delegate to the route module (1505 -> 1499 lines)
  • tests: usageRoute.test.ts (new), usageLedger.test.ts

Verification

  • npx vitest run src/support/usageLedger.test.ts src/support/usageRoute.test.ts --pool=forks --maxWorkers=2 -> 2 files, 11 tests passed
  • npx tsc --noEmit -> exit 0
  • npx oxlint on the 5 changed files -> 0 warnings, 0 errors

The issue's own blocker (AGT-4296) is PR #615, merged; the assets it named
(feat/usage-drilldown branch, /tmp/agt4296-full.patch) were both gone, so the
base was rebuilt from origin/main.

Move reserved-param parsing out of web.ts into a dedicated route module
and accept cross-axis filters (?by=stage&project=X) on /api/usage.

- src/support/usageRoute.ts: new — parseUsageQuery + USAGE_RESERVED_PARAMS
- src/support/usageLedger.ts: filter ledger rows by axis
- src/support/web.ts: delegate to the route module (1505 -> 1499 lines)

Refs: AGT-4297
@unohee
unohee merged commit eacad1b into main Oct 5, 2026
7 checks passed
@unohee
unohee deleted the wt/linear-agt-4297 branch October 5, 2026 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant