Skip to content

fix(ui): match dashboard gallery search against NFC queries - #189853

Closed
huwei-xydt wants to merge 6 commits into
openclaw:mainfrom
huwei-xydt:fix/dashboards-search-nfc
Closed

huwei-xydt wants to merge 6 commits into
openclaw:mainfrom
huwei-xydt:fix/dashboards-search-nfc

Conversation

@huwei-xydt

Copy link
Copy Markdown
Contributor

What Problem This Solves

The dashboards gallery search hid matching cards when the query and session text used different Unicode canonical forms. A composed münchen query did not find a dashboard titled with decomposed text, and the reverse mismatch also failed for titles, authors, previews, and keys.

User Impact

Users typing normal composed text in the dashboards search box can miss sessions whose display names, author labels, previews, or keys came from decomposed sources. ASCII queries were unaffected.

Why This Change Was Made

The gallery filter lowercased both operands for case-insensitivity but left Unicode canonical forms unequal. Local comparison copies need NFC on the query and every matched row field, matching the Logs, activity, chat, skills, and Usage filters already fixed on main.

Evidence

Red/green unit tests in ui/src/pages/dashboards/view.test.tsx:

  • On base, the NFC-query case fails: NFC münchen against an NFD title yields no [data-dashboard-session].
  • With this fix, the full file is 7/7 green under test/vitest/vitest.ui.config.ts.
  • Sibling dashboards-page.test.tsx stays 5/5 green.
  • Production change is comparison-only in visibleDashboardRows. No Gateway, export, or persistence changes.

Merge danger

Two-way door: a revert restores earlier lowercase-only matching. Blast radius is local dashboards gallery filtering. Faulty comparison could hide or show unexpected cards; it cannot alter stored sessions or Gateway writes.

huwei-xydt and others added 6 commits October 31, 2026 22:47
LogsView compared lowercase filter text without Unicode normalization, so
NFC queries missed NFD log lines.

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]>
Lowercase then NFC-normalize the dashboards query and row text on the
comparison side so composed searches find decomposed session titles,
authors, previews, and keys.

Co-Authored-By: Claude Code <[email protected]>
@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: S labels Oct 31, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

Normalize both search operands to NFC in Dashboard, Usage conversation, and Logs filters.

Example: Search the Dashboard gallery for composed “münchen” when a card title contains decomposed “München Monitor”.

  • Before: The matching card is hidden.
  • After: The card appears with its original title preserved.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The implementation is focused and source-supported, but required runtime evidence is absent and two same-form test cases add no distinct coverage.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A visually equivalent search query can hide an existing Dashboard card or Usage conversation message.
Reason: The comparison-only repair restores useful search behavior and follows the merged Logs precedent without altering settings, authority, or stored data.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep this PR open: current main still misses canonically equivalent Dashboard searches, and the comparison fix introduces no identified correctness or security defect.

Priority: P2
Reviewed head: 69ffb536f66e70ac924ce2c4d6aecba23bab1bc7

Before merge

  • Add real behavior proof - The Dashboard and Usage filters are exercised through mounted components and reported red/green tests, but no supplied screenshot, recording, browser output, or runtime logs exercise their shipped routes; provide sanitized runtime captures and redact IPs, API keys, phone numbers, and non-public endpoints. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.

Findings

None.

Tests

  • Low-value test ui/src/pages/dashboards/view.test.tsx: Remove the NFD-query/NFD-title parameter case: it already passes with lowercase-only matching and catches no distinct regression.
  • Low-value test ui/src/pages/usage/view-details.test.ts: Remove the additional NFD-query/NFD-content mount: the two cross-form cases cover the actual failures.
  • Missing end-to-end proof: Show both Unicode mismatch directions through the running Dashboard gallery and, while retained in this stack, Usage conversation search, with original text preserved.
Agent review details

How this fits together

The Control UI filters Gateway-provided session rows locally before rendering Dashboard cards; search normalization changes comparison copies without changing session records.

flowchart LR
  A[Gateway session rows] --> B[Dashboard gallery filter]
  C[Search input] --> B
  B --> D[NFC comparison copies]
  D --> E[Matching original rows]
  E --> F[Dashboard cards]
Loading

Technical review

Best possible solution:

Keep NFC normalization in the existing comparison owners while preserving original session and message text.

Do we have a high-confidence way to reproduce the issue?

Current-main comparison code directly exposes the Unicode mismatch, and the contributor reports a failing base regression; this read-only review ran no target code.

Is this the best way to solve the issue?

Normalizing both comparison operands is the smallest complete repair using existing owners, with no new state, helpers, settings, or persistence changes.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 43a3abe0595f.

Provenance checked

  • Dashboard gallery search changes intended behavior with a stated reason (939f740: This commit carried the filter through the behavior-preserving Solid migration; earlier gallery history establishes search as a feature, without an intentional canonical-form-sensitive contract.)
  • Usage conversation search changes intended behavior with a stated reason (d003cdc: The existing comparison was carried through a presentation-owner refactor intended to preserve behavior; the PR explains the canonical-equivalence failure being corrected.)
  • Logs canonical comparison keeps the original intent (c34246e: The separately merged Logs repair intentionally normalizes comparison copies while preserving original records, rendering, and exports.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +6, Tests +71, Docs +4. Total +81 across 7 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 12 6 +6
Tests 3 76 5 +71
Docs 1 4 0 +4
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 92 11 +81

Labels

Label changes:

  • add P2: Canonically equivalent queries hide matching cards or conversation entries in local search flows with limited blast radius.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Label justifications:

  • P2: Canonically equivalent queries hide matching cards or conversation entries in local search flows with limited blast radius.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Provide the runtime evidence described in the proof assessment.
  • Remove the redundant same-form test cases.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 31, 2026, 7:26 PM ET / 23:26 UTC.

obviyus added a commit that referenced this pull request Nov 1, 2026
…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]>
@obviyus

obviyus commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

Thanks @huwei-xydt. Your fix landed in #189874 (f121a7f), which keeps your commit. I'm closing this one as included.

@obviyus obviyus closed this Nov 1, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 1, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants