Repository navigation
improve(ui): highlight skill references in the composer - #199688
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Contributor
|
Codex review: stale review; fresh review needed. Summary Next step Review history (1 earlier review cycle)
|
vyctorbrzezowski
marked this pull request as ready for review
November 22, 2026 01:25
Co-authored-by: vyctorbrzezowski <[email protected]>
Worked on by: - @vyctorbrzezowski Co-authored-by: vyctorbrzezowski <[email protected]> OpenClaw-Publication: 1b30d645-c210-4746-a93d-3dd54f571bf3
Co-authored-by: vyctorbrzezowski <[email protected]>
Map unaffected skill decorations, inspect only changed atomic boundaries, and keep skill parsing behind the lazy editor boundary. Preserve native typing and undo handoff, including literal-dollar drafts. Co-authored-by: vyctorbrzezowski <[email protected]>
Load the canonical parser before admitting a skill, without fetching the rich editor for literal or incomplete references. Keep existing native handoff and undo snapshots. Measure first-dollar activation separately from selection-only work. Co-authored-by: vyctorbrzezowski <[email protected]>
Resolve both hosted review findings: display labels never grant reference identity, and catalog replacement reconciles native admission and mounted skill decorations. Preserve raw text, selection, composition boundaries and disposal. Co-authored-by: vyctorbrzezowski <[email protected]>
Worked on by: - @vyctorbrzezowski Co-authored-by: vyctorbrzezowski <[email protected]> OpenClaw-Publication: 576ba08f-b8b6-408a-83d4-1ab3341637ad
vyctorbrzezowski
force-pushed
the
openclaw/crisp-crab-5
branch
from
November 27, 2026 03:48
9edd7c5 to
d493118
Compare
obviyus
added a commit
that referenced
this pull request
Nov 28, 2026
…l owner (#207577) ## What Problem This Solves The CI guard test `keeps private Control UI servers and resource-sensitive files under one serial owner` (`test/scripts/ci-workflow-guards.test.ts`) has been red on `main` since #199688 (bf5c529). That PR added `ui/src/e2e/composer-skill-highlights.e2e.test.ts`, but did not add it to `uiE2ePrivateServerTestFiles`. Every PR that runs the guard inherits the red. ## User Impact No product change. CI on `main` and on every PR goes green for this guard again. The new browser test runs in the serial private-server project, so it does not share the source optimizer cache with parallel workers. ## Why This Change Was Made The test starts its own source Control UI server (`startControlUiE2eServer(undefined, { source: true })` inside the suite's `startServer`). The guard detects private servers and requires each one in `uiE2ePrivateServerTestFiles`. The private-server list is the correct place for this file, so the guard stays unchanged. Open PR #206223 carries the identical line at the same position. This lands the one line on its own so `main` is green now; #206223 rebases cleanly in either order. ## Evidence - On `origin/main` 239a05e: `pnpm test test/scripts/ci-workflow-guards.test.ts -t "serial owner"` fails. The guard finds 102 private-server files; the list has 101. The missing one is `ui/src/e2e/composer-skill-highlights.e2e.test.ts`. - With this change: the same guard test passes (1 passed). - `ui/src/e2e/composer-skill-highlights.e2e.test.ts` under `test/vitest/vitest.ui-e2e.config.ts`: 1 passed. Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 29, 2026
) * improve(ui): highlight skill references in the composer Co-authored-by: vyctorbrzezowski <[email protected]> * improve(ui): highlight skill references in the composer Worked on by: - @vyctorbrzezowski Co-authored-by: vyctorbrzezowski <[email protected]> OpenClaw-Publication: 1b30d645-c210-4746-a93d-3dd54f571bf3 * test(ui): qualify composer reference performance Co-authored-by: vyctorbrzezowski <[email protected]> * fix(ui): avoid repeated work when editing skill references Map unaffected skill decorations, inspect only changed atomic boundaries, and keep skill parsing behind the lazy editor boundary. Preserve native typing and undo handoff, including literal-dollar drafts. Co-authored-by: vyctorbrzezowski <[email protected]> * fix(ui): keep literal dollars on the native composer path Load the canonical parser before admitting a skill, without fetching the rich editor for literal or incomplete references. Keep existing native handoff and undo snapshots. Measure first-dollar activation separately from selection-only work. Co-authored-by: vyctorbrzezowski <[email protected]> * fix(ui): refresh skill chips with the command catalog Resolve both hosted review findings: display labels never grant reference identity, and catalog replacement reconciles native admission and mounted skill decorations. Preserve raw text, selection, composition boundaries and disposal. Co-authored-by: vyctorbrzezowski <[email protected]> * Publish openclaw/crisp-crab-5 Worked on by: - @vyctorbrzezowski Co-authored-by: vyctorbrzezowski <[email protected]> OpenClaw-Publication: 576ba08f-b8b6-408a-83d4-1ab3341637ad * perf(ui): keep skill reference work local to the edit * test(ui): drop duplicate composer scan diagnostic * test(ui): type composer browser fixtures accurately * style(ui): format the composer test fixture * test(ui): wait for the skill editor handoff * test(ui): consolidate composer skill coverage * test(ui): reveal an admitted composer skill before checking its label --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]> Co-authored-by: Vyctor H. Brzezowski <[email protected]>
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 29, 2026
…l owner (openclaw#207577) ## What Problem This Solves The CI guard test `keeps private Control UI servers and resource-sensitive files under one serial owner` (`test/scripts/ci-workflow-guards.test.ts`) has been red on `main` since openclaw#199688 (63f2f6e). That PR added `ui/src/e2e/composer-skill-highlights.e2e.test.ts`, but did not add it to `uiE2ePrivateServerTestFiles`. Every PR that runs the guard inherits the red. ## User Impact No product change. CI on `main` and on every PR goes green for this guard again. The new browser test runs in the serial private-server project, so it does not share the source optimizer cache with parallel workers. ## Why This Change Was Made The test starts its own source Control UI server (`startControlUiE2eServer(undefined, { source: true })` inside the suite's `startServer`). The guard detects private servers and requires each one in `uiE2ePrivateServerTestFiles`. The private-server list is the correct place for this file, so the guard stays unchanged. Open PR openclaw#206223 carries the identical line at the same position. This lands the one line on its own so `main` is green now; openclaw#206223 rebases cleanly in either order. ## Evidence - On `origin/main` 75a0808: `pnpm test test/scripts/ci-workflow-guards.test.ts -t "serial owner"` fails. The guard finds 102 private-server files; the list has 101. The missing one is `ui/src/e2e/composer-skill-highlights.e2e.test.ts`. - With this change: the same guard test passes (1 passed). - `ui/src/e2e/composer-skill-highlights.e2e.test.ts` under `test/vitest/vitest.ui-e2e.config.ts`: 1 passed. Co-authored-by: Ayaan Zaidi <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #152599 (inline
$skillreferences; standalone slash commands are unchanged). Builds on #192242.What Problem This Solves
Selected skills remain raw
$command_nametext in the composer, making them harder to distinguish from surrounding prose and person mentions.User Impact
Chat and New Session show known skill references as highlighted, atomic names with the existing skill icon and no visible
$. Copying and sending preserve the canonical reference. No configuration or migration is required.Studio benchmark: Chat matched the first person mention. New Session still falls short of p95 parity (77.28 vs 71.63 ms across 50 matched observations per variant). The current CI and existing asset budgets passed; the performance gap is open.
Why This Change Was Made
Reuse the generic native-first editor and extension contract from the final merged #192242, rather than introduce another editor, overlay or dependency. Skills use the existing command catalog and share atomic boundary editing with people. Display labels no longer grant reference identity: only canonical commands and normalized command identifiers are recognized. Unknown references, shell variables, escaped dollars and code remain literal.
Ordinary edits map existing skill decorations instead of rescanning the draft. Token/Markdown-sensitive edits still use the canonical parser; image-bearing drafts deliberately retain full parsing. Atomic editing checks only affected chip boundaries and does not serialize large pastes for single-character separator checks. Literal dollars may load the small parser, but cannot fetch CodeMirror until a reference is admitted. Catalog replacement explicitly refreshes labels/removals and admits unchanged restored drafts; subscriptions end with their native/editor owners. Native undo snapshots, asynchronous handoff, IME boundaries and retired-frame guards are preserved. Skill integration still composes through the mention adapter, not a new feature framework.
Performance acceptance for this landing
Use production builds and alternate samples on the same host. The known-good reference is
491c2944(merged person mentions); keep an identical-reference control and the previous skill head0283e5b6. Collect at least 10 paired Chromium samples per route, cold and warm separately, and record renderer CPU median/p95, structural work counts and request/asset sizes.Chat and New Session must stay native for a long unrelated draft containing
$HOME, with zero whole-draft skill scans on subsequent unrelated typing. In rich mode one ordinary key after a 64 or 128 KiB word must not require work proportional to the word. Confirm exact$command_nameoutput, late catalog changes, Markdown/escaped text, cursor, undo and chip selection.Person-only typing, selection, undo, mixed typing and large paste must stay within the identical-reference sample spread, with no repeatable regression in median or p95. Time cold first skill from the first
$through selection and an interactive editor; compare with the analogous first person mention and the old skill head. Validate the real Gateway flow as well as the repeatable benchmark. Enforce the startup asset gate without raising the limits.Evidence
Rebased composer and Chromium regression
Rebased onto 93ce03a. The rebased product tree matches the expected integration; the follow-up changes only the browser test. The controlled rewrite leaves the caret at the end of a long draft. Chromium reproduced the previous assertion with the skill correctly present as an atomic range but outside the rendered viewport. The test now checks admission before moving the caret, reveals the token, and still asserts the actual rendered label.
On this candidate, all 43 focused Chromium cases and both end-to-end skill-reference cases passed, as did the UI typecheck, targeted lint, and formatting. This does not assert that the historic New Session p95 gap below has disappeared. The earlier live Gateway proof was not rerun for this test-only repair.
Studio qualification of the final product tree
Paired production Chromium, renderer CPU in ms, synthetic Gateway for timings, with identical baseline as a control. Kept the original tails. Repeated five scenarios whose original runs overlapped other validation.
Values are median / p95. New Session originally had two higher samples (104.45 and 117.36 ms); neither recurred in the ten untraced confirmation pairs or the separate trace. The cause is unconfirmed, so this does not claim full p95 parity. The following 30 untraced pairs retained the earlier observations and produced no candidate samples above 77.28 ms. The 50-pair identical person-mention control was 68.43 / 73.93 ms. A local matcher experiment removed 400 name normalizations on the first dollar with 200 skills, but the measured paired median improved only 0.91 ms, within control variation; that experiment is not part of this PR. For ordinary typing, undo and mixed paste, differences were within the matched run's variation.
Current candidate
Current repair and review — November 16
Published head
0283e5b68266ebb706dab8a9d74623406693488ehas exactly the tested product tree of implementationec4b449ebd8e2e0e468f10da9fec32b8ec9b789b(37b3739503d08c1fbe431ff51ae1ba6af24bcb99); the publisher's final commit is attribution-only.$HOME/$unknownfetched the rich editor. It now passes while actual skill selection and canonical submission still work.6d45233were reproduced red and repaired: display-name aliases could look selected without resolving on submission; unchanged drafts did not react to catalog arrival/rename/removal. The catalog regression verifies stable editor identity, raw text and selection.6d45233, subsequently committed asec4b449. It included the generic editor, mention adapter, import lifecycle, catalog owner, Gateway reference-resolution contract and Markdown parser as context. Static review is not runtime proof. Earlier reviewer findings for indentation, adjacent backticks, native history and literal-dollar loading were repaired; the staged-only loading finding disappeared when the reviewed working-tree fix was committed.08ec3b39, 270 at452d63a5, then 240 on the final product tree. Completed interrupted work was retained rather than replayed; one restart interruption in the first stage is excluded from valid observations. Earlier-stage measurements are not relabeled as final-head proof.Acceptance rule — unchanged
Baseline
491c2944f56ad7d6d9a561a17dfffcd42cab49e3already contains the final merged mention foundation. Compare same-toolchain production builds with at least ten serial rotating baseline/candidate/identical-baseline rounds. Report median, p95, ranges and host load; keep traced diagnostics separate. Require no correctness loss, unexpected RPCs, per-key remounts/owner-echo transactions or unbounded resource growth. Median regression must be at most 5% with no worse p95; unresolved tails need confirmation. A confirmed move above 20% blocks blanket performance acceptance. Existing asset limits remain unchanged. Mock-renderer, live-Gateway and native-device evidence remain separate.Final production-build timings
Chromium
156.0.8078.4, Linux x64, real production UI with a synthetic Gateway. These are renderer main-thread CPU milliseconds per action, not per-key latency, INP, total process CPU or live-provider latency. Long typing is twelve trusted characters in a 64 KiB draft; mixed drafts contain ten people/eight skills. Paste is 256 KiB synthetic clipboard input. Catalog size is 200. Each row has ten observations per variant; each cell is median / p95. A/A is an identical baseline.The original mixed-typing median regressions were +8.39% Chat and +8.97% New Session. Final mixed medians are +4.10% and +1.69% versus baseline, and +0.06% and +0.87% versus A/A. This supports removal of the measured hot-path waste, not universal parity: New Session person/mixed/paste p95 are still +6.78%, +9.75% and +5.77% versus baseline. The complete acceptance rule therefore remains unmet.
First-use work is not hidden in preparation. New
first-skillworkloads start from an untouched native draft and include the first dollar, catalog readiness, typing the query, selecting the skill and settling imports. Olderactivate-skillrows measured selection after typing the query; they are selection-only evidence, not cold first-use parity. Native-to-rich first-use cost remains approximately +40.1 ms in Chat and +28.3 ms in New Session. At the earlier08ec3b39stage, short skill-only typing was 20.170 → 36.529 ms and 200 occurrences were 64.712 → 127.286 ms. Those are native-versus-rich feature costs, not all attributable to parsing, and are not waived or claimed as final-head measurements.Final CPU ranges: Chat mixed baseline 49.655–58.309 / candidate 51.451–57.572 ms; New Session mixed baseline 45.098–50.206 / candidate 44.695–55.102 ms; Chat first-skill baseline 46.277–52.273 / candidate 85.950–91.677 ms; New Session first-skill baseline 43.821–49.449 / candidate 70.785–81.182 ms. Final host load ranged 1.95–6.04 on 128 logical CPUs. Complete distributions and per-run manifests remain in the linked task under
catalog-final-summary.txt,catalog-final.log.summary.json, and raw observations. No outliers were removed.Reproduction, prior evidence and scope
The committed workload extends
scripts/lib/control-ui-chat-composer-scenarios.ts, using the existing engine runner. With matched baseline and candidate builds:node --import ./scripts/tsx.mjs scripts/bench-control-ui-engines.ts \ --bundle-dir .openclaw/tmp/skill-perf/base/dist/control-ui \ --compare-bundle-dir dist/control-ui \ --control-bundle-dir .openclaw/tmp/skill-perf/base/dist/control-ui \ --source-root .openclaw/tmp/skill-perf/base \ --compare-source-root . \ --control-source-root .openclaw/tmp/skill-perf/base \ --engines chromium --viewport desktop --pairs 10 \ --steps composer-qualification-chat-first-skill,composer-qualification-new-first-skill,composer-qualification-chat-literal-dollar,composer-qualification-chat-person-long,composer-qualification-chat-mixed-long,composer-qualification-new-person-long,composer-qualification-new-mixed-long,composer-qualification-new-mixed-paste \ --output .openclaw/tmp/skill-perf/rerunEarlier qualification of
6d45233retained 510 editing/activation and 62 startup observations, 157 browser cases, eight emulated narrow/dark observations, four scan diagnostics, profiles and bounded retention. Its boot CPU and heap results are historical evidence, not a fresh final-head certification. Earlier repairs retained their own exact-source summaries; only the final table above qualifies the current product tree.The simplify pass preserves the existing foreign-DOM owner and CodeMirror extension contract. No dependency, editor, overlay, global cache, custom Markdown parser or permission change was added. Necessary growth covers the skill feature, selective invalidation, native history and catalog notification/disposal. Versus
491c2944, production UI is +714/−263 lines, tests +488/−19, and benchmark code +359/−1. Net test growth is 469 lines; the documented per-change allocation is 69 beyond the standard 400 for reproduced handoff, Markdown, lazy-loading and catalog/identity failures. Startup/performance limits were not raised.Startup asset gate — still failed
Final normalized largest-JS gzip is 569,985 → 570,497 bytes (+512). The inherited-over-cap differential permits only 64 bytes: 448 bytes remain over the allowed increase. Original feature growth was +676 bytes; this repair does not claim the remaining failure is harmless. Chat/New boot gzip grows 539/486 bytes; request counts remain 21/17. CSS bytes and request counts are unchanged. The boot manifest was regenerated without a source diff. No unrelated byte-offset changes or budget increases were used.
Reproduction:
node --import ./scripts/tsx.mjs scripts/check-control-ui-performance.mts --dist dist/control-ui --base-dist .openclaw/tmp/skill-perf/base/dist/control-ui --json. The strict comparison exits 1. Inherited absolute CSS/request overages are distinguished from this new differential failure.Remaining limits
This is a verified repair update to a draft, not a shipping or zero-regression claim. Startup size, native-to-rich feature cost and remaining p95 regressions are unresolved. WebKit/Firefox could not load the app under the environment's proxy policy on either build; no bypass was attempted. Native OS IME, mobile Safari, real-device/network and live Gateway/provider performance remain unqualified. Composition browser tests simulate events, not a physical input method. No merge or deployment occurred.
The existing inspected visual evidence is retained; this repair changes computation and correctness, not the chip design. Captures use the real UI with a synthetic Gateway; mobile is an emulated 390px viewport.
Before — implementation baseline (
491c2944):After — highlighted skill names and icons:
New Session at an emulated mobile width
Requested and designed with @vyctorbrzezowski.
Work sessions
Linked for team reference; these sessions aren’t public.
Worked on by