Skip to content

fix(ui): dashboard author search bolds the wrong text for Korean and accented names - #196639

Merged
obviyus merged 5 commits into
openclaw:mainfrom
Mahdi-Hasan:fix/dashboard-author-highlight
Nov 10, 2026
Merged

obviyus merged 5 commits into
openclaw:mainfrom
Mahdi-Hasan:fix/dashboard-author-highlight

Conversation

@Mahdi-Hasan

@Mahdi-Hasan Mahdi-Hasan commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes: in the Dashboards author filter search, the bolded part of an author name is missing or on the wrong letters for Korean names and for accented names stored in decomposed form.

User Impact

When you search the author list (shown once there are more than 8 authors), the matched part of each name is bolded correctly, for example 민 in 김민수, Lee in Kim 민수 Lee, and García for the search garcia. Which authors match does not change.

Why This Change Was Made

AuthorName found the match position in the folded name (NFD, accents removed, lowercased), then used that position and the raw query length to slice the original name. Folding changes string length: Hangul syllables split into 2–3 jamo, and decomposed accents are dropped. So the offsets did not line up.

matchFoldedQuery in ui/src/lib/text-match.ts finds the match in the folded name, then maps it back to the original name by folding each prefix of the name and comparing lengths. Combining marks right after the match stay with the last matched letter. The filter and the highlight share one foldSearchText, the same fold the filter used before, so which authors match does not change, and Greek final sigma (ΝΙΚΟΣ vs νικος) still matches.

Evidence

Real Gateway with the built Control UI, in Chromium (Playwright), node 24.22.1 in Docker. Ten dashboards, each created by its own user profile, including 김민수, Kim 민수 Lee, García stored decomposed and ΝΙΚΟΣ. Two runs on main and two on this PR: proof comment.

Search main This PR
민 김민수: nothing bold 민 in both names
lee nothing bold Lee
garcia Garcí bold, final a plain García

The list of matching authors is the same on main and this PR for every search. ada, νικος, ΝΙΚΟΣ and an empty search behave the same on both.

Before: main
After: this PR

  • ui/src/lib/text-match.test.ts covers the mapping for Hangul (partial syllable), mixed scripts, a decomposed accent at the end of the match, Greek final sigma and an empty search.
  • Control UI gzip: chat boot JS +40 B, startup JS +0 B.

Merge risk

Two-way door: UI display only, no stored data or contracts. If it is wrong, only the bold span in the Dashboards author search is affected.

…accented names

AuthorName found the match in the folded name, then sliced the original
name with those offsets. NFD folding changes length (Hangul splits into
jamo, decomposed accents drop), so the bold landed on the wrong letters
or disappeared. matchFoldedQuery keeps each folded unit's source span.
@clawsweeper

clawsweeper Bot commented Nov 10, 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 10, 2026
@clawsweeper

clawsweeper Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR maps accent-insensitive author-search matches back to the original name before bolding them.

Example: Search for lee in the Dashboards author filter containing Kim 민수 Lee.

  • Before: The author matches, but Lee is not bold.
  • After: Lee is bold and the matching author remains unchanged.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A bounded, source-verified repair with relevant shipped-interface proof and no open findings; exact-head CI remains pending.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots exercise DashboardAuthorFilter through the built Control UI on a real Gateway in Chromium, showing repaired Korean, mixed-script and NFD-accent highlights; the accompanying report verifies unchanged matching and Greek controls, and the exercised production files match the reviewed head.
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 international author names shows missing or misplaced bold text despite finding the correct author.
Reason: The change restores the existing search-highlight contract without changing defaults, filtering, permissions or persisted settings.

Regression provenance

Possible regression — probable (reviewed change; reproduction). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

Keep this PR: it fixes a verified highlighting bug that remains on current main, with inspected before/after screenshots and no actionable correctness findings.

Priority: P2
Reviewed head: 2aa83e357cab36dc0668415dde23765937fa60d1

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Automated regression execution against the base and head was not independently verified; supplied before/after Gateway screenshots exercise the shipped author filter.
Agent review details

How this fits together

The Control UI derives author options from dashboard session rows, filters names using folded search text, and renders the matching span within each original name.

flowchart LR
  A[Dashboard session rows] --> B[Author options]
  C[Author search query] --> D[Shared text folding]
  B --> D
  D --> E[Matching authors]
  E --> F[Original source span]
  F --> G[Bold author text]
Loading

Technical review

Best possible solution:

Keep one shared folding function and map its match back to original-name offsets within the existing text-matching owner.

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

Current-main source exposes the offset mismatch, and supplied real-Gateway screenshots independently show the reported failures; this read-only review ran no target code.

Is this the best way to solve the issue?

The repair preserves filtering semantics and contextual lowercasing while correcting source spans without introducing state or a competing renderer.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Dashboard author filtering and highlighting keeps the original intent (832bbf9: The approved gallery redesign added searchable multi-select authors; the repair preserves that interaction and its matching rules.)
  • Dashboard route tests keeps the original intent (0557efa: Existing tests protect configured scope and managed session queries; the cleanup retains their scenarios and assertions.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Holger Gruenhagen: Raw commit d5be7a6 adds ui/src/lib/text-match.ts:5 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: d5be7a6a4293; files: ui/src/lib/text-match.ts)

PR surface

Source +26, Tests -8. Total +18 across 4 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 2 37 11 +26
Tests 2 54 62 -8
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 91 73 +18

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

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: Incorrect highlighting affects international author names, while author matching and selection continue to work.
  • 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 (3 earlier review cycles)
  • reviewed 2026-11-10T11:40:16.812Z sha 4493d91 :: needs real behavior proof before merge. :: [P2] Preserve contextual lowercasing when mapping source spans
  • reviewed 2026-11-10T11:56:08.164Z sha 69f4fa1 :: needs real behavior proof before merge. :: none
  • reviewed 2026-11-10T12:31:44.947Z sha 69f4fa1 :: needs maintainer review before merge. :: none

Reviewed November 10, 2026, 9:37 AM ET / 14:37 UTC (Revision 4).

Per-character lowercasing turned the final sigma in ΝΙΚΟΣ into σ, so a
query with ς matched in the filter but lost its highlight. Strip marks per
character, lowercase the whole string like the filter, and share one
foldSearchText between filter and highlight.
@Mahdi-Hasan

Mahdi-Hasan commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Addressed the final-sigma finding in 69f4fa1: the highlight now uses the same whole-string foldSearchText as the filter, and ΝΙΚΟΣ / κος is in the component test. PR body updated.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 10, 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. 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 10, 2026
@Mahdi-Hasan

Mahdi-Hasan commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Added before/after Control UI screenshots for all four queries to the PR body (Vite dev server, Chromium, mocked Gateway).

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper

clawsweeper Bot commented Nov 10, 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. 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. labels Nov 10, 2026
@Mahdi-Hasan

Copy link
Copy Markdown
Contributor Author

Removed the Korean, mixed-script, NFD-accent and final-sigma rows from text-match.test.ts. dashboard-tools.test.tsx already covers them through the author filter. Both files pass locally (8 tests).

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added the clawsweeper:intake:bug Preliminary submission classification; full source review pending. label Nov 10, 2026
# Conflicts:
#	ui/src/lib/text-match.test.ts
@obviyus

obviyus commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@obviyus

obviyus commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

Proof on a real Gateway with the built Control UI, in Chromium (Playwright), node 24.22.1 in Docker. Ten dashboards, each created by its own user profile. Author names include 김민수, Kim 민수 Lee, García stored decomposed (NFD) and ΝΙΚΟΣ. Two runs on main (3a1a9cf0de) and two on this PR (5a570d88fe; head 2aa83e357c has the same files).

Search main (both runs) This PR (both runs)
민 김민수: nothing bold. Kim 민수 Lee: 민 민 in both names
lee nothing bold Lee
garcia Garcí bold, final a plain García

Controls, the same on all four runs:

  • The list of matching authors is the same for every search (empty, 민, lee, garcia, ada, νικος, ΝΙΚΟΣ).
  • ada bolds Ada in Ada Lovelace.
  • νικος and ΝΙΚΟΣ both match ΝΙΚΟΣ (Greek final sigma).
  • An empty search bolds nothing.

Control UI gzip, PR vs main: chat boot JS +40 B, startup JS +0 B.

Before: main
After: this PR

@clawsweeper clawsweeper Bot added 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-repro Preliminary submission classification; full source review pending. labels Nov 10, 2026
@obviyus
obviyus merged commit 426c1d6 into openclaw:main Nov 10, 2026
99 of 100 checks passed
@obviyus

obviyus commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

Landed in 426c1d6. Thanks @Mahdi-Hasan. Author search now bolds the right letters for Korean and accented names.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 11, 2026
…accented names (openclaw#196639)

fix(ui): dashboard author search bolds the wrong text for Korean and accented names

In the Dashboards author filter, the bolded part of a name was cut from the original name using positions found in a folded copy (accents stripped, Hangul split into parts) and the raw query length. For Korean names and decomposed accented names, the wrong letters were bolded or nothing was. The match is now mapped back to the original name, so the bold covers exactly the matching letters. The same fold is used for matching, so which authors match does not change, and no text is new.

Evidence: a real Gateway in secretless Docker on node:24.22.1 serving the built Control UI to Playwright Chromium, with 10 dashboards by different authors including 김민수, Kim 민수 Lee, a decomposed García and ΝΙΚΟΣ, two runs each. On main, searching 민 bolded nothing in 김민수, lee bolded nothing, and garcia left the final a plain. With this change 민, Lee and García are bolded exactly. The matching author list is identical for every query, ada bolds Ada, νικος and ΝΙΚΟΣ both match, and an empty query shows no bold. Control UI gzip: +40 B. Details and screenshots: openclaw#196639 (comment).

Thanks @Mahdi-Hasan.

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 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: S 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