Skip to content

fix(ui): match mobile group searches across NFC and NFD forms - #191945

Merged
obviyus merged 2 commits into
openclaw:mainfrom
huwei-xydt:fix/session-group-search-nfc
Nov 3, 2026
Merged

obviyus merged 2 commits into
openclaw:mainfrom
huwei-xydt:fix/session-group-search-nfc

Conversation

@huwei-xydt

@huwei-xydt huwei-xydt commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

What problem this solves

The mobile Move to group → Search groups filter misses canonically equivalent Unicode names: an NFC München query cannot find an NFD München group, or vice versa. The operator sees no matching group even though it exists.

What changed

Normalize both comparison strings locally with lowercase followed by NFC. Original group labels, selection payloads, sorting, non-group rows, shared search helpers and Gateway contracts remain unchanged. The fix by @huwei-xydt is preserved in its original commit.

Consolidated both Unicode directions into the existing controlled-picker test table, retaining ASCII filtering, no autofocus, sorted groups, original action payload, closing and retired-page behavior. Production +2/−2; tests +15/−15 (net 0); documentation +2. No test allocation or checker changes.

Evidence

Built mobile Chromium proof, controls and before/after screenshots.

  • Main 4285c6ced4216d72266c370455bc6f491ac65687: both Unicode directions miss twice each.
  • Candidate: both directions match twice each. Selecting and reopening preserves the original group's bytes and selected state.
  • ASCII alp and accent-stripped Munchen controls are unchanged on both refs.
  • Focused browser unit file: candidate 17 passed; same consolidated cases on main 2 Unicode failures / 15 passed.
  • The native browser proof uses finalized built artifacts and the repository's mocked Gateway. Normal builds returned performance-budget violations on both refs; see the evidence for exact measurements. No successful build or real-Gateway claim is made.

Merge danger

Two-way door: revert fully restores the old local comparison; no persisted state, config, schema, protocol or dependency changes. Blast radius is limited to local filtering in the mobile group picker. Accents are not stripped, and stored group names are never normalized.

The move-to-group filter in the mobile session menu compared raw
lowercased strings, so an NFC query missed group labels stored in
NFD form (and vice versa). Normalize both sides to NFC before the
substring test, matching the model picker search fix.

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

clawsweeper Bot commented Nov 3, 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.

@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. 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. labels Nov 3, 2026
@clawsweeper

clawsweeper Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Normalize mobile group-search comparison strings to NFC while preserving original group names and selection values.

Example: Search for NFC München when the existing group is stored as NFD München.

  • Before: The existing group is absent from the search results.
  • After: The original group appears and can be selected without changing its stored spelling.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A small, correct repair with directly inspected browser proof and focused red/green coverage; broad validation remains pending.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots and obviyus's recorded Chromium results exercise the built mobile Move to group picker at the reviewed head with a mocked Gateway transport, covering both NFC/NFD directions, unchanged controls, original outgoing group values, and reopened selected state; this satisfies the prior review's runtime-evidence request without claiming real-Gateway persistence.
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 visibly identical group name disappears from mobile search when its Unicode composition differs from the query.
Reason: The focused repair restores expected text matching without introducing settings, broader search policy, or stored-state changes.

Merge readiness

✅ Ready for maintainer review

This PR fixes a current mobile search defect with a narrow change and directly relevant browser evidence; no actionable defects were found, and exact-head CI remains in progress.

Priority: P2
Reviewed head: 8b4d860c90f2beba0264394544a57f910bcb96b9

Before merge

None.

Findings

None.

Agent review details

How this fits together

The mobile session menu filters group entries supplied by the shared session-menu owner and forwards the selected entry to the existing action handler.

flowchart LR
  A[Original group entries] --> C[Mobile group filter]
  B[Search query] --> C
  C --> D[Lowercase and NFC comparison]
  D --> E[Original matching entries]
  E --> F[Existing selection action]
Loading

Technical review

Best possible solution:

Retain the local NFC comparison fix and original group identities, then complete the normal exact-head CI gates.

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

Current-main source exposes the exact lowercase-only comparison, and the supplied built-browser evidence demonstrates both cross-form misses against an earlier main revision with the same comparison; no target code was executed during this review.

Is this the best way to solve the issue?

This is the smallest complete repair: normalize temporary comparison strings at the existing filter owner, preserve raw entries and actions, and extend the existing controlled-picker test table.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Mobile group filtering keeps the original intent (d84e193: The mobile session-pages feature added sorted groups and on-demand local search while retaining existing action and permission owners.)
  • Controlled-picker regression coverage keeps the original intent (d84e193: The existing test protects sorting, focus, original selection values, closing, and retired-page behavior; the parameterized cases retain those assertions.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit c8e1ef9 adds ui/src/pages/chat/components/chat-header-session-menu-mobile.tsx:11 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c8e1ef929577; files: ui/src/pages/chat/components/chat-header-session-menu-mobile.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 proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: Canonical Unicode differences hide existing groups in one mobile filter; clearing the query still permits selection.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • 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-11-03T14:06:03.998Z sha 799413a :: needs real behavior proof before merge. :: none

Reviewed November 3, 2026, 9:36 AM ET / 14:36 UTC (Revision 2).

@obviyus

obviyus commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Nov 3, 2026
@clawsweeper

clawsweeper Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@obviyus

obviyus commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Built Control UI proof for 8b4d860c90f2beba0264394544a57f910bcb96b9 (production UI bytes unchanged from contributor head 799413a9c935c8b552e628431860ae79821e598a). Fix by @huwei-xydt; the contributor commit is preserved.

Real Chromium, 390 × 844 mobile viewport, normal built Control UI and the repository's mocked Gateway transport. Baseline: main 4285c6ced4216d72266c370455bc6f491ac65687. No component-only fixture or helper replay substitutes for these browser actions.

Operator action Main, repeats 1 / 2 Candidate, repeats 1 / 2
Move to group → Search groups: NFC München query, NFD Mu\u0308nchen label missing / missing matched / matched
NFD Mu\u0308nchen query, NFC München label missing / missing matched / matched
ASCII alp query Alpha / Alpha in both directions Alpha / Alpha in both directions
Accent-stripped Munchen query missing / missing in both directions missing / missing in both directions

After each search, selected the original group and observed the real sessions.patch request retaining the original label byte-for-byte, then reopened the picker and checked that group's aria-pressed="true". Main required clearing the failed query before selection; the candidate selected the matching result directly. Eight fresh browser contexts; all assertions passed. Only comparison strings are lowercased then NFC-normalized: stored names, sorting and action payloads are unchanged.

Focused browser unit file: candidate 17 passed, main with the same consolidated cases 2 failed / 15 passed (only the two Unicode rows fail because no selectable result exists). The earlier hosted copy-menu failure did not reproduce in either focused file run; it is not being classified as inherited from those passing runs.

The normal UI build produced/reused verified finalized artifact sidecars but returned performance-budget failures on both refs: main total CSS gzip/raw exceeded its caps; candidate chat-boot gzip was 1,280,994 B against 1,280,674 B. No budget/checker was changed or bypassed; the browser proof served those built artifacts, with matching build identities and captured asset SHA-256 values. These are build-budget failures, not passing build claims.

Consolidated the duplicated Unicode setup into the existing controlled-picker table while retaining ASCII, focus, sort, original-action, close and retired-page assertions. Whole-change production +2/−2, tests +15/−15 (net 0), docs +2; no allocation file.

Main NFC query misses NFD group

Candidate NFC query matches original NFD group

Main NFD query misses NFC group

Candidate NFD query matches original NFC group

@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. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. 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. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 3, 2026
@obviyus

obviyus commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Exact-head CI for 8b4d860c90f2beba0264394544a57f910bcb96b9 is red. No jobs were rerun and no green-chasing push was made. Four failing jobs, classified below; 0 cancelled workflow runs on this SHA.

Failing job Exact case Independent causal evidence
check-lint-core-4 ui/src/pages/config/config-page.test.ts:700:9: auth shadows the outer binding (no-shadow) Same exact lint error locally in the CI merge tree and with this PR's mobile owner/test changes reverted.
checks-fast-baseline-ratchets config-secret-fields.test.ts:6 mock of ../toast.ts does not preserve real exports Same exact checker failure locally in the CI merge tree and revert baseline. Test-line gate itself passed, net delta 0.
checks-ui (1/3) config-page.test.ts > loads replacement sources and clears sensitive reveal state: runtime.subscribe is not a function, config-page-state.ts:467 Same exact case/stack fails locally in the CI merge tree and revert baseline.
checks-ui (2/3) chat-composer-mobile.browser.test.tsx > keeps attachment chips at the editing inset in the one-line mobile composer: line 134, expected null to be truthy Independent #188155 job 125959086565, head a4781bd8532fa5153fd87691b56ee30e488fc8d7, records the same case, assertion, value and line. The focused case passed locally on both candidate/revert; those passes alone are not the attribution evidence.

Causal comparison used GitHub's exact merge tree 39990d8c98f0a5533f09af35320cf87fc422cf74 for this pushed head, then restored the two mobile picker source/test files from its main parent e6a2efb46efad42eabba6e3e9b90b81b45d527d7. No failure owner was altered, no missing subscribe was supplied, and no assertion, budget or baseline was relaxed. Commands and outputs:

candidate and revert:
  pnpm test src/pages/config/config-page.test.ts src/pages/chat/chat-composer-mobile.browser.test.tsx
    -t 'loads replacement sources|keeps attachment chips'
  => same config runtime.subscribe failure; composer passes
  node scripts/run-oxlint.mjs ui/src/pages/config/config-page.test.ts
  => same no-shadow error at 700:9
  node --import ./scripts/tsx.mjs scripts/check-test-mock-exports.mts --base HEAD --no-merge-base
  => same config-secret-fields.test.ts:6: ../toast.ts violation

The PR changes only a local mobile group-label comparison, its table-driven coverage and documentation. That comparison is not imported by the config runtime/test/mock checker or the composer fixture; restoring it does not change those outcomes. These four failures are unrelated to the repair, so this is a pause for the maintainer, not a merge-ready/green-CI claim.

The exact-head review is 4/6 overall, 5/6 proof, 4/6 patch; no findings. Hosted Control UI performance, UI E2E, changed tests, production/test types, changed lint and docs passed. Observed native mobile proof and inspected screenshots remain valid.

@obviyus

obviyus commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Maintainer override: the only reds are the known config-page auth shadowing lint, the config-secret-fields mock-export ratchet, config runtime subscribe missing (all on main b018452: #191538 (comment)), and a composer attachment assertion that also fails in unrelated run https://github.com/openclaw/openclaw/actions/runs/41647886532/job/125959086565. This PR touches none of them. Classification: #191945 (comment)

@obviyus
obviyus merged commit 4824c14 into openclaw:main Nov 3, 2026
111 of 117 checks passed
@obviyus

obviyus commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Landed in 4824c14. Thanks @huwei-xydt. Mobile Move to group search now matches across Unicode forms.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 4, 2026
…aw#191945)

fix(ui): match group names across Unicode forms in mobile Move to group

The mobile "Move to group" search compared text byte for byte, so a search typed in one Unicode form (for example composed "é", NFC) did not find a group whose name used the other form (decomposed, NFD), and the reverse. The local comparison now lowercases and then applies NFC to both sides. Stored labels, actions and the selected group are unchanged, and there is no accent folding.

Evidence: built Control UI in a mobile Chromium viewport. Both Unicode directions missed on main twice and matched with this change twice, and selecting the result moved the item to the original group. ASCII and accent-stripped controls were unchanged. Details and screenshots: openclaw#191945 (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: 🐚 platinum hermit Good normal PR readiness with ordinary 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