Repository navigation
fix(ui): match usage conversation search against NFC queries - #189834
huwei-xydt wants to merge 5 commits into
Conversation
LogsView compared lowercase filter text without Unicode normalization, so NFC queries missed NFD log lines. Co-Authored-By: Claude Code <[email protected]>
Co-Authored-By: Claude Code <[email protected]>
Lowercase then NFC-normalize the usage details query and clean log content on the comparison side so composed searches find decomposed messages. Co-Authored-By: Claude Code <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesNormalize search queries and candidate text to NFC before matching in Usage conversations and Logs. Example: Search Usage conversations for composed “münchen notes” when a message contains decomposed “München notes opened”.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep this PR open: it fixes a current Usage conversation search bug with a focused change, and no introduced correctness or security defect was found. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI filters Gateway-provided conversation entries locally, passing matching entries to the existing conversation list renderer. flowchart LR
A[Gateway conversation entries] --> B[Existing log parser]
B --> C[Usage conversation filter]
D[Search input] --> C
C --> E[NFC comparison copies]
E --> F[Original matching entries]
F --> G[Conversation list]
Technical reviewBest possible solution: Keep canonical normalization inside the existing conversation filter and preserve original message text throughout rendering and storage. Do we have a high-confidence way to reproduce the issue? Current-main source directly exposes the NFC-query/NFD-content mismatch, and the contributor reports a regression that fails on base; this read-only review did not run it. Is this the best way to solve the issue? Normalizing both comparison copies is the smallest complete repair: it uses the existing owner without introducing helpers, state, compatibility paths, or data mutation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7232a8de67ef. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +6, Tests +49, Docs +4. Total +59 across 5 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 31, 2026, 7:07 PM ET / 23:07 UTC. |
…9874) fix(ui): match config, Usage and dashboard searches across Unicode normalization forms Three more Control UI searches compared text without Unicode normalization, so a name stored in one form (NFC or NFD, for example `Café` saved on macOS) didn't match a query typed in the other: - the config editor form search; - Usage conversation search; - the dashboards gallery search. Each now lowercases and NFC-normalizes both sides for the local comparison only. Raw values are unchanged, and dashboard agent scoping is untouched. Evidence: built Gateway and Control UI in real Chromium. Each surface missed both directions twice on main and found the expected result twice with this change. ASCII controls behaved the same on both refs. Details and screenshots: #189874 (comment). Includes the fixes from #189829, #189834 and #189853, with their commits kept. Co-authored-by: 胡伟0668000622 <[email protected]> Co-authored-by: Claude Code <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]>
|
Thanks @huwei-xydt. Your fix landed in #189874 (f121a7f), which keeps your commit. I'm closing this one as included. |
…nclaw#189874) fix(ui): match config, Usage and dashboard searches across Unicode normalization forms Three more Control UI searches compared text without Unicode normalization, so a name stored in one form (NFC or NFD, for example `Café` saved on macOS) didn't match a query typed in the other: - the config editor form search; - Usage conversation search; - the dashboards gallery search. Each now lowercases and NFC-normalizes both sides for the local comparison only. Raw values are unchanged, and dashboard agent scoping is untouched. Evidence: built Gateway and Control UI in real Chromium. Each surface missed both directions twice on main and found the expected result twice with this change. ASCII controls behaved the same on both refs. Details and screenshots: openclaw#189874 (comment). Includes the fixes from openclaw#189829, openclaw#189834 and openclaw#189853, with their commits kept. Co-authored-by: 胡伟0668000622 <[email protected]> Co-authored-by: Claude Code <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
The Usage details conversation search hid matching messages when the query and log text used different Unicode canonical forms. A composed
münchen notesquery did not find a message stored with decomposed text, and the reverse mismatch also failed.User Impact
Users typing normal composed text in the Usage conversation filter could miss messages whose content came from decomposed sources. ASCII queries were unaffected.
Why This Change Was Made
The conversation filter lowercased both operands for case-insensitivity but left Unicode canonical forms unequal. Local comparison copies need NFC on both the query and cleaned log content, matching the Logs, activity, chat, and skills filters already fixed on main.
Evidence
Red/green unit tests in
ui/src/pages/usage/view-details.test.ts:.session-log-entryrows.test/vitest/vitest.ui.config.ts.filters.queryandentry.cleanContent. No Gateway, export, or persistence changes.Merge danger
Two-way door: a revert restores earlier lowercase-only matching. Blast radius is local Usage conversation list filtering. Faulty comparison could hide or show unexpected messages; it cannot alter stored usage records or Gateway writes.