Skip to content

Rank skill name matches ahead of descriptions - #123533

Closed
jesse-merhi wants to merge 5 commits into
mainfrom
openclaw/our-openclaw-webui-tool-search-is-a-bit-dumb-when-i-do-openclaw
Closed

jesse-merhi wants to merge 5 commits into
mainfrom
openclaw/our-openclaw-webui-tool-search-is-a-bit-dumb-when-i-do-openclaw

Conversation

@jesse-merhi

Copy link
Copy Markdown
Member

New behavior

Skill references now prioritize matches in the skill name before incidental matches in the description. Typing $openclaw therefore shows openclaw_local_test and openclaw_stg_test before skills such as canvas, healthcheck, and node_connect whose descriptions merely mention OpenClaw.

Matching is ordered by exact normalized name, name prefix, normalized name substring, then description. Alphabetical ordering remains deterministic within each tier, and hidden skills remain excluded.

How to verify

  1. Open the Control UI chat composer against a Gateway that exposes the relevant skills.
  2. Type help $ and observe the normal alphabetical skill catalog.
  3. Type help $openclaw.
  4. Confirm openclaw_local_test and openclaw_stg_test appear before description-only matches.

Validation

  • Focused owner regression: 22 tests passed.
  • Control UI production build completed and the Gateway served the rebuilt asset.
  • Fresh-browser real-Gateway walkthrough confirmed the expected $ and $openclaw ordering.

Visual proof will be refreshed through the required PR proof-pack workflow after both review phases are clean.

@clawsweeper

clawsweeper Bot commented Aug 14, 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 app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Aug 14, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 Aug 14, 2026
@clawsweeper

clawsweeper Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 3, 2026, 6:16 PM ET / 22:16 UTC (Revision 13).

ClawSweeper review

What this changes

The PR ranks skill-reference suggestions by normalized name relevance before description matches, shares scoring with slash commands, and adds matcher and composer coverage.

Merge readiness

⛔ Blocked before merge - 2 items remain

Keep open: the requested improvement remains absent from main and the latest release, and this member-authored PR is protected from cleanup closure. Earlier metadata-loss findings are not established by the introduced patch.

Likely related people: Jesse Merhi, Patrick Erichsen, and Peter Steinberger are medium-confidence routing candidates from merged area history.

Priority: P2
Reviewed head: 00e7db94c4ff2bd7c59eb6ff47b597a1ec01cbac

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The introduced implementation is focused and reuses the existing owner, with useful regression coverage; integrated current-main behavior remains unverified.
Proof confidence 🌊 off-meta tidepool Not applicable: The member-authored PR is exempt from the external-contributor proof gate; its body reports a rebuilt UI served by a real Gateway and observed ordering. Integrated title-aware behavior still needs validation after conflict resolution. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The member-authored PR is exempt from the external-contributor proof gate; its body reports a rebuilt UI served by a real Gateway and observed ordering. Integrated title-aware behavior still needs validation after conflict resolution. No stored-data contract changes.
Evidence reviewed 10 items Verified introduced change: The pinned merge-base-to-head patch changes relevance scoring and skill completion ordering. It does not change command-entry metadata projection, remove clientPresentation, or remove skillDisplayName; those fields were already absent in the original base implementation.
Current main still needs relevance ordering: Main matches displayed titles, normalized titles, command prefixes, and descriptions, then sorts all matches alphabetically by displayed title. It does not rank name matches ahead of description matches.
Latest-release behavior: The v2026.9.8 source also uses displayed-title alphabetical ordering after filtering, so the central improvement is not already shipped.
Findings None None.
Security None None.

How this fits together

The Control UI receives a command catalog from the Gateway and uses it to suggest skills while users compose chat messages. Selecting a suggestion inserts a skill reference into the draft sent to the agent.

flowchart LR
  A[Gateway command catalog] --> B[UI command catalog]
  C[Composer query] --> D[Match and rank skills]
  B --> D
  D --> E[Skill suggestion menu]
  E --> F[Selected reference in draft]
  F --> G[Chat message]
Loading

Before merge

  • Resolve merge risk (P1) - The conflicting branch has no verified integrated result: preserve current displayed-title matching and command presentation metadata when resolving it, then validate title-only matches against description-only matches.
  • Complete next step (P2) - Resolve the conflicts with current main, preserve title matching and presentation metadata, and validate title-only relevance in the combined picker.
Agent review details

Security

None.

PR surface

Source +12, Tests +141. Total +153 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 26 14 +12
Tests 2 145 4 +141
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 171 18 +153

Review metrics

Metric Value Why it matters
Production versus test LOC Production +26/-14 (net +12); tests +145/-4 (net +141) Production growth adds normalized substring matching and relevance ordering through the existing scorer rather than a parallel search implementation.

Mantis proof suggestion

Web UI chat interaction evidence would help verify relevance ordering and retained title matching after integration. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis verify the integrated Web UI chat skill picker ranks exact, prefix, and substring name or displayed-title matches ahead of description-only matches, preserves alphabetical bare-query ordering, and inserts the selected reference; return redacted screenshots and interaction results.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Use one shared relevance scorer for command tokens, aliases, and displayed skill titles while retaining current catalog metadata and visibility rules.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Use one shared relevance scorer for command tokens, aliases, and displayed skill titles while retaining current catalog metadata and visibility rules.

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

Not applicable as an established bug: this proposes improved search ranking. Source inspection confirms that current main and v2026.9.8 still alphabetize matching skills; no runtime reproduction was executed.

Is this the best way to solve the issue?

Yes, sharing the existing relevance scorer is the appropriate owner-level approach, provided integration also scores current displayed titles. A separate picker-specific search engine would duplicate policy.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The member-authored PR is exempt from the external-contributor proof gate; its body reports a rebuilt UI served by a real Gateway and observed ordering. Integrated title-aware behavior still needs validation after conflict resolution. No stored-data contract changes.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This is a bounded improvement to finding skills in the chat composer, with no demonstrated urgent runtime regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The member-authored PR is exempt from the external-contributor proof gate; its body reports a rebuilt UI served by a real Gateway and observed ordering. Integrated title-aware behavior still needs validation after conflict resolution. No stored-data contract changes.

Evidence

What I checked:

  • Verified introduced change: The pinned merge-base-to-head patch changes relevance scoring and skill completion ordering. It does not change command-entry metadata projection, remove clientPresentation, or remove skillDisplayName; those fields were already absent in the original base implementation. (ui/src/lib/chat/commands.ts:467, 00e7db94c4ff)
  • Current main still needs relevance ordering: Main matches displayed titles, normalized titles, command prefixes, and descriptions, then sorts all matches alphabetically by displayed title. It does not rank name matches ahead of description matches. (ui/src/lib/chat/commands.ts:557, 711e57e41b37)
  • Latest-release behavior: The v2026.9.8 source also uses displayed-title alphabetical ordering after filtering, so the central improvement is not already shipped. (ui/src/lib/chat/commands.ts:577, fc23bc864e45)
  • Caller and observable output: The composer passes the edited reference query to getSkillCommandCompletions, renders the returned order, and inserts the selected command token into the draft. The patch changes matching and presentation order without changing execution authorization. (ui/src/pages/chat/components/chat-composer-skill-menu.ts:143, 00e7db94c4ff)
  • Owner and sibling regression coverage: The unit tests cover exact, prefix, substring, description-only, locale-independent tie ordering, and existing slash-command ranking. The composer test covers substring selection and the resulting chat.send text; it does not cover title-only ranking against a description-only match. (ui/src/lib/chat/commands.test.ts:361, 00e7db94c4ff)
  • Normalization contract and dependency boundary: The directly inspected workspace normalizer trims and lowercases strings. The previous UI import reexports that same implementation. This patch has no affirmative dependency on the Codex harness, runtime, or protocol. (packages/normalization-core/src/string-coerce.ts:77, 00e7db94c4ff)

Likely related people:

  • Jesse Merhi: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Patrick Erichsen: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Resolve conflicts while preserving displayed-title matching and current command metadata.
  • Add a title-only match versus description-only ranking case and validate the combined picker flow.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (12 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-14T08:45:05.170Z sha 00e7db9 :: found issues before merge. :: [P1] Preserve client-presentation metadata
  • reviewed 2026-08-15T05:03:05.257Z sha 00e7db9 :: found issues before merge. :: [P1] Preserve plugin client-presentation metadata
  • reviewed August 16, 2026, 6:03 AM ET / 10:03 UTC sha unknown :: found issues before merge. :: [P1] Preserve plugin client-presentation metadata
  • reviewed August 20, 2026, 1:49 AM ET / 05:49 UTC sha unknown :: found issues before merge. :: [P1] Preserve plugin client-presentation metadata
  • reviewed 2026-08-20T05:49:09.906Z sha 00e7db9 :: found issues before merge. :: [P1] Preserve plugin client-presentation metadata
  • reviewed 2026-08-26T06:03:14.836Z sha 00e7db9 :: found issues before merge. :: [P1] Preserve current command-entry presentation metadata | [P1] Rank displayed skill titles as well as command identifiers
  • reviewed 2026-09-02T17:12:19.154Z sha 00e7db9 :: blocked before merge. :: [P1] Rank displayed skill titles with command identifiers
  • reviewed 2026-09-27T18:05:18.512Z sha 00e7db9 :: blocked before merge. :: [P1] Include displayed skill titles in relevance scoring

@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 Aug 14, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. and removed P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels Aug 14, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 26, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. and removed P2 Normal backlog priority with limited blast radius. labels Sep 2, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 27, 2026
@steipete

Copy link
Copy Markdown
Contributor

Thanks for the PR. We're closing older pull requests that have gone stale against current main.

This draft has had no commits since August 14 and the Control UI composer has been rebuilt since. Please open a fresh PR against current main if skill-name ranking is still needed.

@steipete steipete closed this Oct 24, 2026
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 maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary 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