Skip to content

fix(ui): normalize canonical Unicode in local search comparisons - #189874

Merged
obviyus merged 11 commits into
mainfrom
fix/ui-local-nfc-search-sweep
Nov 1, 2026
Merged

obviyus merged 11 commits into
mainfrom
fix/ui-local-nfc-search-sweep

Conversation

@obviyus

@obviyus obviyus commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Three Control UI searches can hide existing results when query and source text use canonically equivalent Unicode forms:

  • Configuration field descriptions and authored tag: filters.
  • Usage details' conversation filter.
  • Dashboard gallery titles, authors, previews and keys.

User Impact

A composed accented query now finds decomposed text, and a decomposed query finds composed text. Case-insensitive and ASCII matching keep working. Displayed text, configuration values, transcript content, tags and session keys are not rewritten.

Why This Change Was Made

Each owning browser-local comparison lowercases its operands but previously left canonical forms unequal. Apply NFC after the existing lowercase operation on both query and candidate copies. Keep the existing predicates, tag conjunctions, role/tool filters, sort behavior and data ownership; no shared normalization policy or new helper API is introduced.

The dashboard change touches only query/candidate normalization. It does not change agent scoping or incorporate #188486. Logs normalization is already on main and is not duplicated here.

Includes @huwei-xydt's fixes from #189829, #189834 and #189853, cherry-picked with contributor authorship retained.

Evidence

Built Gateway and matching built Control UI served in secretless node:24.22.1 Docker, driven by real Chromium. On each of the three surfaces, two fresh browser contexts per revision exercised NFC-query/NFD-source and NFD-query/NFC-source, plus an ASCII control:

Surface Main, twice in each direction Candidate, twice in each direction ASCII control
Configuration editor No matching setting Expected field and original value visible Unchanged
Usage conversation 0 matching messages Expected original message visible Unchanged
Dashboard gallery 0 matching cards Expected original card visible Unchanged

Configuration metadata came from a real disk-loaded fixture plugin. Dashboards were created through sessions.create and board.widget.put. Usage data came from real agent turns against the maintained deterministic local QA provider, with a decomposed assistant message appended through the supported chat.inject RPC. No browser Gateway mock or database edits were used. Persisted raw values were checked after filtering.

The three focused owner files pass 35/35 tests; focused lint and formatting pass. Bidirectional authored tags share the existing conjunction case, and Usage's retained stale-count fixture now also exercises canonical filtering. New duplicate fixture blocks were removed. Production +15/-7 (net +8), tests +10/-10 (net 0), docs +8; no SDK exports, schema, index or permission changes.

See the paired screenshots and detailed receipts.

Merge Danger

Two-way door: reverting restores the previous local matching behavior, with no persistent migration to undo. Blast radius is these three browser-local filters; an incorrect comparison could hide or overmatch visible results, but does not change server authorization or stored data.

huwei-xydt and others added 10 commits November 1, 2026 04:57
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]>
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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui labels Oct 31, 2026
@obviyus

obviyus commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator Author

Built-Gateway / real-Chromium evidence

Head: 5174bd56433bb3c9dc6de505898cb27cacb769f2. Frozen main: 4120fe0aacb1cd4a0f77fef1a358d8c2f3f38315.

The candidate's production tree was built in secretless node:24.22.1 Docker and served by its built Gateway, with matching Gateway/UI build identities. The three follow-up commits after compilation change only test fixtures; production code is identical to the reviewed head. No host installation, real provider credential, browser Gateway mock, database editing, schema change or SDK export was used.

Each surface ran in two fresh Chromium contexts per revision. Results below occurred twice each:

Surface Canonical mismatch Main Candidate ASCII control
Plugin configuration editor NFC query → NFD description 0 fields 1 expected field 1 field on both
Plugin configuration editor NFD query → NFC description 0 fields 1 expected field 1 field on both
Usage conversation NFC query → NFD assistant text 0 messages 1 original message 1 message on both
Usage conversation NFD query → NFC user text 0 messages 1 original message 1 message on both
Dashboard gallery NFC query → NFD title 0 cards 1 original card 1 card on both
Dashboard gallery NFD query → NFC title 0 cards 1 original card 1 card on both

Configuration fields and metadata came from a disk-loaded synthetic plugin through the normal settings editor. Dashboards were created through real sessions.create / board.widget.put RPCs. Usage has three real OpenClaw agent turns against the maintained deterministic local QA provider (synthetic token usage, not a model-quality or billing claim). Because ordinary user-message ingestion already composes its text, the decomposed assistant fixture was added with the supported chat.inject RPC; its NFD bytes were confirmed in history before and after filtering. The UI displayed the original bytes. NFC user text supplied the reverse-direction case.

Raw configuration values and plugin metadata were compared before/after filtering. Gallery titles and session keys, conversation text, and persisted values were checked unchanged after the candidate run. tag: matching is covered bidirectionally by the existing owner test's multi-tag conjunction; the live configuration capture proves the real editor's text-comparison path, not a claim that its local input parses tag: syntax.

All three predicates retain their existing lowercase operation and apply NFC afterward, only to comparison copies. The gallery diff changes two comparison expressions only: no agent scoping, author filter, permission, roster query or #188486 changes.

Focused checks: 35/35 passed across config search, Usage details and dashboard view owners; oxlint 0 warnings/errors; oxfmt all eight changed files formatted. Hosted CI then caught an owned test-table inference error, TS2322 at view-details.test.ts:439; the role tuple now uses as const, with no assertion or production change. The corrected Usage owner passes 20/20, and its format check passes. Production +15/-7 (net +8); tests +10/-10 (net 0); docs +8. Contributor commits from #189829, #189834 and #189853 retain @huwei-xydt's authorship. The source PRs were not closed.

Retained local screenshots

All 36 canonical captures, including both directions, both repetitions and ASCII controls, are listed with exact local paths and observed counts in:

/Users/obviyus/Developer/.agents/handoffs/openclaw-bugloop/proofs/189829/workboard/screenshots.json

Under that same parent:

  • Before config: base-config-nfc-9pndrE/config-{1,2}-{nfc-query,nfd-query,ascii}.png
  • After config: sweep-config-nfc-iUDnLp/config-{1,2}-{nfc-query,nfd-query,ascii}.png
  • Before Usage/gallery: base-usage-gallery-nfc-UgjRFp/{usage,dashboards}-{1,2}-{nfc-query,nfd-query,ascii}.png
  • After Usage/gallery: sweep-usage-gallery-nfc-mNCbad/{usage,dashboards}-{1,2}-{nfc-query,nfd-query,ascii}.png

Raw RPC receipts, model requests, resolved profile/config/state paths, per-case browser results and final raw-value receipts are retained alongside the harness. An early search-selector discovery used the wrong input role; initial Usage captures were reframed to show the query and result together. Those setup/capture attempts are retained but are not the canonical screenshots above.

Representative paired captures

Main config search misses the decomposed field
Candidate config search finds the original field
Main Usage search misses the decomposed message
Candidate Usage search finds the original message
Main gallery misses a composed title for a decomposed query
Candidate gallery finds the unchanged title

@obviyus

obviyus commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator Author

@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-repro Preliminary submission classification; full source review pending. labels Oct 31, 2026
@obviyus
obviyus marked this pull request as ready for review October 31, 2026 23:50
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug 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 maintainer review before merge.

What this changes

This PR makes configuration, Usage conversation, and dashboard searches match canonically equivalent Unicode text.

Example: Search configuration metadata containing decomposed München with the composed query MÜNCHEN.

  • Before: The editor shows no matching settings.
  • After: The expected field appears with its original text and value.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused, correct repair with inspected shipped-entry-point evidence and no actionable findings; exact-head CI remains pending.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected paired screenshots and the linked built-Gateway/real-Chromium receipts for configuration metadata, Usage messages, and dashboard cards in secretless Docker. They show missing results becoming visible, report both canonical directions and ASCII controls, and confirm original values remain unchanged; the subsequent head change is test-only.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Search can hide existing fields, messages, and dashboard cards when visually equivalent text uses different Unicode canonical forms.
Reason: The maintainer-authored direction repairs a demonstrated matching defect with narrow changes and no new configuration or product contract.

Merge readiness

✅ Ready for maintainer review

Keep this PR open for landing: it fixes a current search defect with sufficient browser evidence and no actionable findings.

Priority: P2
Reviewed head: 5174bd56433bb3c9dc6de505898cb27cacb769f2

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: A red-on-base run of the final consolidated test fixtures is not recorded; paired browser runs demonstrate the corresponding failure and repair.
Agent review details

How this fits together

Three browser-local filters consume queries and existing configuration metadata, conversation messages, or dashboard rows, then select visible results without rewriting their sources.

flowchart LR
  A[Search query] --> C[Existing local filter]
  B[Gateway supplied source text] --> C
  C --> D[Lowercase comparison copies]
  D --> E[NFC normalization]
  E --> F[Existing matching predicates]
  F --> G[Visible original results]
Loading

Technical review

Best possible solution:

Land the existing comparison-only repair once the normal exact-head CI gates pass.

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

Current-main source shows the unequal canonical comparison operands, and supplied paired browser captures demonstrate the failure; this read-only review ran no target code.

Is this the best way to solve the issue?

The patch is the smallest complete repair at the existing comparison owners, preserving lowercase behavior, filter conjunctions, source bytes, and the separate Settings navigation matcher.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +8, Tests 0, Docs +8. Total +16 across 8 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 15 7 +8
Tests 2 10 10 0
Docs 3 8 0 +8
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 33 17 +16

Root-cause cluster

Relationship: canonical
Canonical: #189874
Summary: This PR consolidates three source contributions addressing canonical Unicode mismatches in separate local filters.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Canonical Unicode mismatches hide existing local search results across three UI surfaces without changing data or blocking the core runtime.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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 (1 earlier review cycle)
  • reviewed 2026-10-31T23:55:47.483Z sha e4fbc58 :: needs maintainer review before merge. :: none

Reviewed October 31, 2026, 8:08 PM ET / November 1, 2026, 00:08 UTC (Revision 2).

@obviyus

obviyus commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

Initial pushed head e4fbc58 failed one substantive CI job: check-test-types-core-5, https://github.com/openclaw/openclaw/actions/runs/41254217699/job/124694616136 . Exact error: ui/src/pages/usage/view-details.test.ts(439,27), TS2322, string is not assignable to the supported message-role union. The retained parameterized fixture widened its role table. The repair makes that existing table a readonly literal tuple with as const; assertions and production code are unchanged. The only other failing job was the derived openclaw/ci-gate (job 124695471547). Cancelled jobs in that run: 0. No unrelated failure, CI rerun, or empty push was used.

@obviyus

obviyus commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 1, 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-repro Preliminary submission classification; full source review pending. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 1, 2026
@obviyus

obviyus commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

Exact head 5174bd56433bb3c9dc6de505898cb27cacb769f2: openclaw/ci-gate passed; current-head failures 0, cancelled checks 0. CI: https://github.com/openclaw/openclaw/actions/runs/41254968489 . Fresh exact-head review is 5/6 with no actionable findings: #189874 (comment) . The owned initial test-type error was repaired with a literal role tuple, without a production change. The review’s additional fixture receipt is now recorded: final consolidated config/Usage fixtures against frozen main produce four intended canonical-matching assertion failures (26 other cases pass); the candidate owner cases pass. This complements the paired built-Gateway browser proof, not a replacement for it. No CI job rerun or empty push was used. Source PRs #189829, #189834 and #189853 remain open.

@obviyus
obviyus merged commit f121a7f into main Nov 1, 2026
86 checks passed
@obviyus
obviyus deleted the fix/ui-local-nfc-search-sweep branch November 1, 2026 00:14
@obviyus

obviyus commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

Landed in f121a7f. Thanks to the author of #189829, #189834 and #189853. Your fixes are included here.

vincentkoc added a commit that referenced this pull request Nov 1, 2026
…ed-backup-search-exports-20261101

* commit 'cde4bfe4f10ce470ded7264c68d9a72ae03594cc':
  fix(ci): keep backup and chat search internals private (#189894)
  fix(codex): recover unused native threads without dropping history (#189900)
  fix(oc-path): use last duplicate JSON key to match runtime parsing (#189855)
  perf(test): parse the Mantis resolver workflow once (#189801)
  fix(agents): revert default hard context admission (#189891)
  refactor(test): use canonical tracked temp paths (#189800)
  chore(ui): refresh control ui locales (#189898)
  improve: show gateway commit and build time on About
  refactor(test): share SDK export fixture JSON writes (#189799)
  fix: restore Files navigation from unavailable previews (#189879)
  refactor(test): share raw ratchet fixture writes (#189798)
  fix(ai): honor Model Studio compatible-mode output limits (#189870)
  fix: hold queued messages through inline edits (#189869)
  perf(test): reuse the baseline fixture Node resolver (#189790)
  test(qa): correlate handoff replies by run identity (#189885)
  fix(ui): normalize canonical Unicode in local search comparisons (#189874)
  fix(ui): explain unsupported browsers without module scripts (#189883)

# Conflicts:
#	ui/src/pages/chat/components/chat-search-highlight.browser.test.ts
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. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants