Skip to content

fix(ui): match live activity search against NFC queries - #189375

Merged
obviyus merged 6 commits into
openclaw:mainfrom
huwei-xydt:fix/activity-filter-nfc
Oct 31, 2026
Merged

obviyus merged 6 commits into
openclaw:mainfrom
huwei-xydt:fix/activity-filter-nfc

Conversation

@huwei-xydt

@huwei-xydt huwei-xydt commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Live Activity search lowercased text but compared different Unicode canonical forms literally. An accented name copied from decomposed tool output could disappear when searched with a composed query, and vice versa.

Fix and compatibility

Normalize the already-lowercased filter needle once and each lowercased entry haystack to NFC in the existing local comparison owner. Raw tool output, run and tool-call identifiers, displayed text, Gateway events, and stored data are unchanged. No public SDK or configuration changes.

The contributor's commits, including the earlier loop commit 7c5b62ac6a, remain in history. Current main was integrated to remove already-landed Activity jump-menu drift from the effective change. The duplicate mock-Gateway regressions were consolidated into the existing filter suite, preserving both normalization directions and the surrounding filter controls. Production is +2/-2; tests have no net growth against the actual merge base.

Evidence

Real built Gateway and real Chromium: the same chat invokes real read tools over NFD, NFC, and ASCII workspace files. Both canonical mismatch directions fail twice on main and succeed twice on the candidate. ASCII control succeeds on both; clearing search restores byte-identical raw preview arrays. Built UI asset hashes, real subscriptions/tool events, provider requests, final chat replies, and inspected screenshots are retained. A deterministic local model provider is used; no fabricated Gateway events or direct component mounting.

Proof comment: #189375 (comment)

Focused validation: 46 Activity owner/projection/subscription tests passed; the canonical query regression fails on main (expected one row, got zero) and passes on candidate. Formatting passed. Direct Oxlint reported only the pre-existing Activity test file's max-lines violation (the final test file has zero net line growth); no product lint finding was reported.

Merge danger

Two-way door: a revert fully restores prior comparison behavior; no state migration or published contract changes. Blast radius is limited to local Live Activity text filtering. If wrong, operators could see missing or unexpected search matches; tool execution and stored output are unaffected.

huwei-xydt and others added 2 commits October 31, 2026 08:37
Canonical NFC on jump-menu path filters so NFD Git paths (macOS)
still match NFC queries, matching the already-landed tree filter.

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.

Live activity search lowercased the filter needle and entry haystack
but did not canonicalize them, so NFC query text missed NFD tool
output. Normalize both sides to NFC at the comparison site only.

Co-Authored-By: Claude Code <[email protected]>
@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
@clawsweeper clawsweeper Bot added clawsweeper:intake:needs-environment 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:needs-repro Preliminary submission classification; full source review pending. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment 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

Normalize Live Activity search comparisons to NFC so composed and decomposed Unicode text match.

Example: Search for composed münchen-bericht when a read-tool preview contains decomposed Mu\u0308nchen-Bericht.

  • Before: The filter hides the existing activity row.
  • After: The filter finds the row while preserving its original displayed text.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused, correct repair with inspected shipped-entry-point proof, consolidated regression coverage, and no actionable findings.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots and obviyus's full proof comment exercise the changed Activity matcher through a built Gateway, normal chat tool execution, actual subscriptions, and Chromium on isolated Linux ARM64. Both canonical mismatch directions fail on baseline and succeed on candidate; ASCII matching and clearing preserve original previews.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Searching for visibly identical accented text can hide the Activity row because its Unicode encoding differs from the query.
Reason: A narrow comparison repair restores expected search behavior without changing raw output, identity, configuration, or persistence.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: it fixes a demonstrated search bug still present on current main, with no actionable code findings; required CI remains pending.

Priority: P2
Reviewed head: 3c1685878fd015cfe758da3c6b03851b749e9719

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI receives authorized live session events, builds bounded browser-local Activity summaries, and filters those summaries for display without changing tool output or identifiers.

flowchart LR
  A[Gateway session events] --> B[Activity collector]
  B --> C[Original bounded summaries]
  C --> D[Local comparison copies]
  E[Search input] --> D
  D --> F[Filtered Activity rows]
Loading

Technical review

Best possible solution:

Merge the focused comparison-only fix after the existing required checks pass.

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

The supplied built-Gateway and Chromium reproduction demonstrates both mismatch directions on the pinned main baseline, and source inspection confirms fetched main retains the same faulty comparison; no target code was executed during this review.

Is this the best way to solve the issue?

This is the smallest complete fix: normalize both comparison operands in the existing filter owner, preserve original values, and extend the existing rendered-page regression instead of adding another owner or harness.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Live Activity search comparison keeps the original intent (3dd0e8e: The original ephemeral Activity view provided local text filtering; its matcher lowercased strings but did not canonicalize Unicode.)
  • Activity presentation ownership and filter tests keeps the original intent (refactor(ui): keep private presentation with its page and host owners #175155: The merged refactor kept private presentation with its page owner and preserved user-visible behavior while routing tests through the real page.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Exact introduced change: The pinned merge-base-to-head diff adds NFC normalization to the existing haystack and query comparisons, documents the behavior, and consolidates regression coverage into the existing filter test. (ui/src/pages/activity/activity-page-view.tsx:117, 3c1685878fd0)
  • Current main still has the defect: Fetched main still lowercases both operands and compares them with includes without canonical normalization; the shared lowercase helper only trims and lowercases. (ui/src/pages/activity/activity-page-view.tsx:98, e6aa04477b30)
  • Real browser proof inspected: The four downloaded screenshots show main missing both canonical mismatch directions and the candidate finding the corresponding real read output. The full proof comment records built Gateway and Chromium execution, genuine tool calls, asset-hash verification, ASCII controls, repeated searches, and byte-identical previews after clearing. Credit: obviyus, fix(ui): match live activity search against NFC queries #189375 (comment). (3c1685878fd0)
  • Focused regression coverage: The existing rendered-page filter test now exercises NFC queries against NFD output and NFD queries against NFC output, while retaining status, follow, expansion, tool-filter, and empty-result assertions. Supplied validation reports the regression failing on main and passing on the candidate. (ui/src/pages/activity/activity-page.test.ts:347, 3c1685878fd0)
  • Feature history and original intent: The original Activity commit introduced browser-local filtering with lowercase-only comparisons; the later merged presentation refactor preserved behavior and moved the matcher into its current owner. Older local blob reads encountered missing objects, so the original implementation was verified through GitHub's commit patch instead. (ui/src/ui/views/activity.ts, 3dd0e8ed6a7c)
  • Current ownership trail: Main history identifies repeated Activity lifecycle, rendering, and performance work by Peter Steinberger; current matcher lines trace to the behavior-preserving presentation refactor rather than proving introduction there. (ui/src/pages/activity/activity-page-view.tsx:98, 4d9a54780def)

Likely related people:

  • Peter Steinberger: Raw commit 4d9a547 adds ui/src/pages/activity/activity-page-view.tsx:87 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4d9a54780def; files: ui/src/pages/activity/activity-page-view.tsx)

PR surface

Source 0, Tests 0, Docs +2. Total +2 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 2 2 0
Tests 1 15 15 0
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 19 17 +2

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P2: Canonically equivalent searches incorrectly hide existing Activity rows, with impact limited to local filtering.
  • 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 (2 earlier review cycles)
  • reviewed 2026-10-31T13:02:04.361Z sha 904fe61 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-31T13:27:48.928Z sha 10e1361 :: needs maintainer review before merge. :: none

Reviewed October 31, 2026, 10:39 AM ET / 14:39 UTC (Revision 3).

Ship the Playwright control-ui e2e that types NFC and NFD queries against a live NFD tool event so ClawSweeper sees production-path behavior proof.

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

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Head is now 10e1361703a.

Production control-ui e2e ui/src/e2e/activity-live-search-nfc.e2e.test.ts is on the PR: mock Gateway emits live session.tool events (NFD toolCallId), types NFC and NFD queries into the live toolbar search on the built /activity?view=live feed, and asserts both match the NFD row then clear restores both entries.

Green on head:

✓ |ui-e2e-bundled| ui/src/e2e/activity-live-search-nfc.e2e.test.ts > matches NFC and NFD live search queries on the built Activity feed 3819ms
 Test Files  1 passed (1)
      Tests  1 passed (1)

Before/after screenshots are linked in the PR body from proof branch pr189375-proof @ 5a7b788df35 (not in PR files). Before: NFC query against NFD tool id shows a miss. After: NFC and NFD queries both match the NFD tool id; clear restores both rows.

@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. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. and removed 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. clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Oct 31, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. 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:

@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Oct 31, 2026
@obviyus

obviyus commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

Real built Gateway + Chromium proof

Baseline main: dbc102dde5301dfccc5ef9d4e997d415912f9c18. Candidate: the exact production matcher in this PR (lowercase, then NFC on comparison copies only).

Both refs were installed and fully built inside isolated Linux ARM64 node:24.22.1. Real Chromium visited the built Gateway's Control UI, authenticated normally, and sent the same chat request through the normal composer. A purpose-built local OpenAI-compatible provider requested three genuine read tool calls. They read workspace files containing NFD Mu\u0308nchen-Bericht, NFC Caf\u00e9-Notizen, and ascii-control. Tool-call IDs were ordinary ASCII (call_activity_nfd, call_activity_nfc, call_activity_ascii), not fabricated Unicode IDs. No Gateway events or UI stores were injected.

The Activity tab subscribed to the actual active session before tools ran. Provider latency held the actual run open while the operator searched; releasing it produced the normal final chat reply on both refs. Served browser asset bytes were SHA256-checked against each ref's built dist/control-ui output.

Real Activity search Main attempt 1 / 2 Candidate attempt 1 / 2
NFC lowercase münchen-bericht against NFD output 0 / 0 rows 1 / 1 rows
NFD lowercase cafe\u0301-notizen against NFC output 0 / 0 rows 1 / 1 rows
ASCII ascii-control 1 row 1 row
Clear search All 3 original rows All 3 original rows

An ASCII positive control was exercised before each Unicode query. Input values were checked exactly, not normalized by the driver. Initial and restored raw preview arrays were byte-identical within each ref, including the decomposed diaeresis and trailing newlines. Both refs recorded three real result IDs and zero browser page errors.

The attached screenshots were inspected: main visibly shows an empty filtered feed; candidate shows the matching real read output in both directions. Full retained event captures include accepted subscription ACKs, actual tool frames, provider requests, final chat replies, screenshots, and source/asset binding.

Reproduction: build each exact ref with pnpm build (including its coupled UI), then drive the real /chat and /activity?view=live routes with Chromium. This proves the full normal Gateway-to-Activity path; it does not claim a remote model or a production channel.

The duplicate standalone mock-Gateway tests were consolidated into the existing Activity filter owner test, retaining both canonical directions, raw preview preservation, status/follow/expansion/tool filters, and the empty-result control. No new public SDK surface, normalization of stored values, or lifecycle owner was added.

Main composed query misses decomposed real read output

Candidate composed query finds decomposed real read output

Main decomposed query misses composed real read output

Candidate decomposed query finds composed real read output

@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. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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 merged commit 4ba5c85 into openclaw:main Oct 31, 2026
116 of 121 checks passed
@obviyus

obviyus commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

Landed in 4ba5c85. Thanks @huwei-xydt. The Live activity filter now matches text in either Unicode form.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 1, 2026
)

fix(ui): match the Live activity filter across Unicode normalization forms

The Live activity filter compared text without Unicode normalization, so tool output such as `München-Bericht` in one form (NFC or NFD) didn't match a filter typed in the other, and the page showed no matching activity. The filter now lowercases and NFC-normalizes both sides for the local comparison only. Raw previews are unchanged and come back when the filter is cleared.

Evidence: built Gateway and Control UI in real Chromium with real `read` tool output. NFC-query/NFD-output and NFD-query/NFC-output failed twice each on main and matched twice each with this change. ASCII controls behaved the same on both refs. Details and screenshots: openclaw#189375 (comment).

Thanks @huwei-xydt.

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