Repository navigation
fix(ui): usage filters hide sessions when multiple providers are selected - #129482
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 2:03 PM ET / 18:03 UTC. ClawSweeper reviewWhat this changesThe branch makes repeated Usage dashboard category filters alternatives and preserves quoted query terms while filtering, editing chips, and accepting suggestions. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessThis PR remains necessary: current main still intersects repeated provider terms and splits keyed quoted values. The patch repairs both behaviors in the shared query owner, with no blocking correctness finding found; exact-head CI is still in progress and the branch is behind main. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — step 1 Assertions:
How this fits togetherThe Usage dashboard receives Gateway session-usage records and filters them locally before rendering operator-visible sessions. Its query helper also feeds filter chips and suggestions, so token parsing must stay consistent across matching and editing. flowchart LR
A[Gateway usage sessions] --> B[Usage dashboard]
B --> C[Query tokenizer]
C --> D[Category and text filters]
D --> E[Visible sessions]
C --> F[Suggestions and filter chips]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +13, Tests +188. Total +201 across 5 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep category-level OR grouping and quote preservation centralized in the query helper, then merge after the clean current-main result and exact-head UI checks are confirmed. Do we have a high-confidence way to reproduce the issue? Yes—source inspection gives a high-confidence current-main path: repeated provider terms are intersected in Is this the best way to solve the issue? Yes—the shared query helper is the narrowest owner because filtering, suggestions, chip removal, and category replacement all consume its terms; changing only the rendered dropdown would leave the other mutation paths inconsistent. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 0ea03f3a3bcc. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
21e7821 to
f410363
Compare
f410363 to
386d5fa
Compare
0e55120 to
5486c7c
Compare
|
Merged via squash.
|
…cted (openclaw#129482) * fix(ui): make usage multi-select and quoted filters work * fix(anthropic): keep provider policy artifacts lightweight * test(vitest): assign codex startup retry to its owner shard
What Problem This Solves
Fixes an issue where operators selecting multiple providers, models, tools, or channels on the Usage dashboard would unexpectedly see no matching sessions. Session labels containing spaces also could not be found with quoted searches, and changing another filter could split or corrupt an existing quoted search.
Why This Change Was Made
The existing Usage query owner now groups alternatives within each multi-select category while continuing to intersect separate categories, numeric thresholds, and
has:requirements. One quote-aware tokenizer is reused for filtering, suggestions, adding/removing filter chips, and category replacement so every query surface preserves complete quoted terms.User Impact
Selecting multiple providers means sessions from any selected provider remain visible; narrowing by another category or threshold still works predictably. Searches such as
label:"Team Planning"match the intended session and remain intact while other filters or suggestions are edited.Evidence
Before the fix, focused owner-boundary tests reproduced six independent failures: multiple selected providers returned zero rows; quoted labels were split and failed to match; adding, removing, and suggesting filters corrupted quoted terms. A subsequent browser screenshot exposed the related stale-suggestion branch, which was added as another authentic failing regression before repairing its canonical owner.
Selecting both providers now retains both sessions:
Searching a quoted label now retains the one matching session:
node scripts/run-vitest.mjs run --config test/vitest/vitest.ui.config.ts --configLoader runner ui/src/pages/usage/helpers.node.test.ts ui/src/pages/usage/query.test.ts— 28 passed, including every formerly failing case.OPENCLAW_UI_E2E_RECORD=1 node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/usage-cost-analysis.e2e.test.ts— 5 Chromium scenarios passed; actual UI interactions select both providers and search a quoted session label.Production LOC: +23/-10 (net +13); tests: +191/-3.