Skip to content

fix(ui): match config form search against NFC queries - #189829

Closed
huwei-xydt wants to merge 5 commits into
openclaw:mainfrom
huwei-xydt:fix/config-form-search-nfc
Closed

huwei-xydt wants to merge 5 commits into
openclaw:mainfrom
huwei-xydt:fix/config-form-search-nfc

Conversation

@huwei-xydt

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Settings config form search hid matching fields when the query and field text used different Unicode canonical forms. A composed münchen query did not match a field description stored with decomposed text, and tag: filters with diacritics failed the same way against NFD field tags.

User Impact

Users typing normal composed text into config search could not find fields whose labels, help, enum text, or tags came from decomposed sources. Tag filters failed the same way against NFD field tags.

Why This Change Was Made

The default text matcher and tag matcher lowercased operands for ASCII case-insensitivity but left Unicode canonical forms unequal. Local comparison copies need NFC on both sides so search behaves like the existing Logs, skills, activity, and chat filters.

Evidence

Red/green node unit tests in ui/src/components/config-form.search.node.test.ts:

  • On base, the two new cases fail: NFC query vs NFD description, and NFC/NFD tag: criteria vs NFD field tags.
  • With this fix, the full file is 12/12 green under test/vitest/vitest.ui.config.ts.
  • Production change is comparison-only: defaultTextMatcher and matchesTags NFC both operands after lowercase. No schema, hint, Gateway, or persistence changes.

Merge danger

Two-way door: a revert restores earlier lowercase-only matching. Blast radius is local Settings config search visibility. Faulty comparison could hide or show unexpected fields in the form filter; it cannot change saved config values, authorization, or Gateway writes.

huwei-xydt and others added 5 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 both comparison operands in the default
config search text matcher and tag matcher so composed queries find
decomposed field text and tags.

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. labels Oct 31, 2026
@obviyus

obviyus commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

This PR makes config-form text and tag searches match canonically equivalent Unicode strings.

Example: Search for composed “münchen” when a field description contains decomposed “München credential”.

  • Before: The matching field is hidden.
  • After: The field matches because both comparison operands are NFC-normalized.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The focused implementation appears correct and useful, but the required real-behavior proof does not cover the changed owner.
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: Visually equivalent Unicode queries can hide matching configuration fields and tags.
Reason: A narrow comparison repair restores expected search behavior without introducing configuration, persistence, or public API changes.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep this PR open: it fixes a concrete config-search defect still present on current main, with no actionable correctness or security findings.

Priority: P2
Reviewed head: 05856dca87368b682f86f346ed612dd0ebed70c6

Before merge

  • Add real behavior proof - The changed config-form owner has reported node-unit red/green results, but no supplied screenshot, recording, log, or live output exercises that behavior through the built Control UI; inspected sidebar screenshots and merged Logs evidence cover other paths. The contributor should provide the config-form text and tag scenario, redacting IPs, API keys, phone numbers, and non-public endpoints, then request re-review. 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

  • Missing end-to-end proof: Show the built Control UI config form finding canonically equivalent field text and tag criteria, including both mismatch directions and unchanged displayed values.
Agent review details

How this fits together

The Control UI config-search owner receives queries, schema metadata, and field hints, then determines which configuration sections and fields remain visible.

flowchart TD
  A[Config search input] --> B[Query parser]
  C[Schema and field hints] --> D[Recursive config matcher]
  B --> D
  D --> E[Text and tag comparisons]
  E --> F[Visible sections and fields]
Loading

Technical review

Best possible solution:

Keep canonical normalization in the existing comparison functions while preserving original metadata and saved values.

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

Current-main source directly explains why composed queries miss decomposed descriptions and tags; the contributor reports failing-base and passing-head regressions, but this read-only review executed no target code.

Is this the best way to solve the issue?

This is the smallest complete repair at the existing owner: normalize comparison copies on both sides without adding state, wrappers, or another search path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 4120fe0aacb1.

Provenance checked

  • Default config text matching keeps the original intent (89ccb5a: The merged Settings-search work completed recursive discovery while allowing sidebar search to supply its distinct short-query matcher.)
  • Config tag matching keeps the original intent (f69219f: The extracted search owner retained case-insensitive exact tag filtering alongside recursive field discovery.)
  • Inherited Logs normalization and regression keeps the original intent (fix(ui): match logs filter against NFC queries #189473: The merged repair normalized local comparison operands while preserving displayed and exported log records and consolidating regression coverage.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

Likely related people:

  • vyctorbrzezowski: Raw commit f69219f adds ui/src/components/config-form.search.ts:76 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: f69219f76823; files: ui/src/components/config-form.search.ts)
  • Shakker: Raw commit 89ccb5a adds ui/src/components/config-form.search.ts:81 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 89ccb5a90d6b; files: ui/src/components/config-form.search.ts)
  • Peter Steinberger: Raw commit 36f74e6 adds ui/src/components/config-form.search.ts:105 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 36f74e6ba3b0; files: ui/src/components/config-form.search.ts)

PR surface

Source +10, Tests +38, Docs +4. Total +52 across 5 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 15 5 +10
Tests 2 43 5 +38
Docs 1 4 0 +4
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 62 10 +52

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Canonically equivalent queries can hide matching configuration fields, with impact limited to search visibility.
  • 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.

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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-31T22:58:15.629Z sha 05856dc :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-31T23:03:36.104Z sha 05856dc :: needs real behavior proof before merge. :: none

Reviewed October 31, 2026, 7:15 PM ET / 23:15 UTC (Revision 3).

@clawsweeper clawsweeper Bot added 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
@obviyus

obviyus commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@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. 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
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