Skip to content

fix(ui): preserve skill group expansion when filtering - #150911

Merged
fuller-stack-dev merged 3 commits into
openclaw:mainfrom
SunnyShu0925:fix/skills-group-keyed-render-150345
Sep 21, 2026
Merged

fuller-stack-dev merged 3 commits into
openclaw:mainfrom
SunnyShu0925:fix/skills-group-keyed-render-150345

Conversation

@SunnyShu0925

@SunnyShu0925 SunnyShu0925 commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Closes #150345

What Problem This Solves

Fixes matching skills disappearing from view when a collapsed earlier group is removed by a Skills search or status filter.

User Impact

Retained groups keep their own expanded or collapsed state while filtering. Removed groups still start expanded when restored. No configuration or migration is required.

Why This Change Was Made

Key the outer Lit group list by its existing stable group ID. This preserves native <details> behavior and the existing keyed skill rows, without introducing a separate expansion store.

SunnyShu0925 contributed the production repair. fuller-stack-dev contributed the regression enhancements, which verify retained group and row identity, collapsed-state preservation, details targeting, and removal of a true middle group.

Evidence

  • 36 focused tests across the Skills renderer, ClawHub renderer, and Skills lifecycle suites passed. Retained single-worker measurement: view.test.ts has 20 passing cases totaling 344 ms of test-body time; the full three-file command took 84.95 s wall (Vitest duration 61.77 s, largely transform/startup). This is the unchanged tested source, not a fresh timing run.
  • Exact-head CI 35552104178 and required openclaw/ci-gate passed. UI unit shards took 333/329/426 s including setup and other files; archived per-file CI logs were unavailable to this checkout, so these are not incremental costs for this test.
  • Fresh independent API-only production and regression reviews on September 21 found no P0–P2 findings; their source hashes match this head.
  • Formatting, diff checks, growth/assertion guards, UI production and test typechecks, and targeted lint passed.
  • Real source-mode Chromium reproduced the original defect and verified filtering, group/row identity, native open/closed state, empty-result recovery, refresh, details, and the exact skill-toggle request at 1280 px and 390 px. The Gateway responses were synthetic; this is not live-service, built-release, or physical-device acceptance.
  • The existing contributor screenshots below remain applicable: the production renderer is byte-identical to the contributor's original fix. Their inline rendering in this PR was verified.

Real-browser screenshots (Chromium via Playwright, 1280×720 desktop and 390×844 narrow):

Desktop — After fix, initial / collapsed / filtered (Built-in retains open):
desktop-initial desktop-collapsed desktop-filtered

Desktop — Before fix, filtering: Built-in inherited collapsed state, "Weather" hidden:
before-fix

Narrow (390px) — After fix, initial / collapsed / filtered:
narrow-initial narrow-collapsed narrow-filtered

AI Assistance

AI-assisted investigation, implementation, regression strengthening, browser proof, and independent code review. Original production fix and screenshots by SunnyShu0925.

@clawsweeper

clawsweeper Bot commented Sep 17, 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 P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 17, 2026
@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 21, 2026, 2:10 PM ET / 18:10 UTC (Revision 10).

ClawSweeper review

What this changes

The PR preserves each retained Skills group’s expanded or collapsed state during filtering by rendering groups with stable identities and adding regression coverage.

Merge readiness

✅ Ready for maintainer review

Keep open: this is a focused, supported fix that current main still needs. No blocking correctness findings remain, and the inspected browser evidence demonstrates the intended improvement. The overlapping maintainer PR remains an unmerged draft.

Priority: P2
Reviewed head: 0a25bb2736b9a88a195a531293b66c4a03efff44

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A narrow owner-level fix with meaningful regression coverage and directly relevant browser proof supports normal mergeable quality.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The inspected Chromium before/after screenshots exercise the Skills renderer’s collapse-then-search flow and show Weather becoming visible after the fix. The production renderer is unchanged from the evidenced repair; synthetic inventory is appropriate for this local disclosure behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The inspected Chromium before/after screenshots exercise the Skills renderer’s collapse-then-search flow and show Weather becoming visible after the fix. The production renderer is unchanged from the evidenced repair; synthetic inventory is appropriate for this local disclosure behavior.
Evidence reviewed 9 items Pinned production repair: The introduced delta replaces the outer positional group mapping with the existing Lit repeat directive keyed by group.id. Native disclosure state and keyed inner rows remain with their existing owners; no persistence, configuration, dependencies, or authorization behavior changes.
Existing grouping and caller contract: groupSkills supplies unique, fixed source-group IDs and removes empty groups. The Skills page passes its local query and status selection to renderSkills; the repair covers both filter paths without changing grouping or Gateway requests.
Current main still needs the repair: Fetched main still renders the outer list with groups.map and retains native details elements. The inspected code therefore still permits positional reuse when an earlier group disappears.
Findings None None.
Security None None.

How this fits together

The Control UI Skills page receives the skill inventory from the Gateway and applies search and status filters locally. Its grouped results use native disclosure elements to control which skill rows are visible.

flowchart TD
  A[Gateway skill inventory] --> C[Local filtering]
  B[Search and status selection] --> C
  C --> D[Stable skill groups]
  D --> E[Keyed group rendering]
  E --> F[Disclosure state and visible skill rows]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +4, Tests +253. Total +257 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 5 1 +4
Tests 1 253 0 +253
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 258 1 +257

Review metrics

Metric Value Why it matters
Production versus regression coverage Production +4 net lines; tests +253 lines The production growth reuses the existing keyed renderer rather than introducing an expansion-state store; the added coverage protects filtering transitions.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #150345
Summary: This PR is a candidate fix for the canonical Skills disclosure-state report; another unmerged draft targets the same defect.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Use stable group identity in the existing renderer while preserving native expansion state and the initially-open behavior of recreated groups.

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

Yes: collapse Workspace while Built-in remains open, then search for a Built-in-only skill. Current-main source retains the positional rendering responsible for the reported failure; this review inspected existing browser proof without executing a new reproduction.

Is this the best way to solve the issue?

Yes: keying the outer list by existing group IDs repairs the identity mismatch at its owner without adding settings, persistence, or a competing expansion store.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: Filtering can hide matching Skills results through incorrect disclosure state, with a limited Settings UI blast radius.
  • 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. Sufficient (screenshot): The inspected Chromium before/after screenshots exercise the Skills renderer’s collapse-then-search flow and show Weather becoming visible after the fix. The production renderer is unchanged from the evidenced repair; synthetic inventory is appropriate for this local disclosure behavior.
  • proof: sufficient: Contributor real behavior proof is sufficient. The inspected Chromium before/after screenshots exercise the Skills renderer’s collapse-then-search flow and show Weather becoming visible after the fix. The production renderer is unchanged from the evidenced repair; synthetic inventory is appropriate for this local disclosure behavior.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The inspected Chromium before/after screenshots exercise the Skills renderer’s collapse-then-search flow and show Weather becoming visible after the fix. The production renderer is unchanged from the evidenced repair; synthetic inventory is appropriate for this local disclosure behavior.

Evidence

What I checked:

  • Pinned production repair: The introduced delta replaces the outer positional group mapping with the existing Lit repeat directive keyed by group.id. Native disclosure state and keyed inner rows remain with their existing owners; no persistence, configuration, dependencies, or authorization behavior changes. (ui/src/pages/skills/view.ts:195, 0a25bb2736b9)
  • Existing grouping and caller contract: groupSkills supplies unique, fixed source-group IDs and removes empty groups. The Skills page passes its local query and status selection to renderSkills; the repair covers both filter paths without changing grouping or Gateway requests. (ui/src/lib/skills-grouping.ts:18, 0a25bb2736b9)
  • Current main still needs the repair: Fetched main still renders the outer list with groups.map and retains native details elements. The inspected code therefore still permits positional reuse when an earlier group disappears. (ui/src/pages/skills/view.ts:195, de747f073085)
  • Latest release also retains positional rendering: The supplied latest release, v2026.9.5, also contains groups.map around native disclosure groups; this is not an already-shipped fix. (ui/src/pages/skills/view.ts:195, ec9c1a13db89)
  • Meaningful regression coverage: Seven added cases cover retained open and closed groups, group and row identity, details targeting, middle-group removal, restoration, status filtering, empty results, and changing an existing query. These exercise the real renderer without adding production test seams. Tests were inspected, not executed in this read-only review. (ui/src/pages/skills/view.test.ts:117, 0a25bb2736b9)
  • Inspected visible before/after proof: Inspected all four prepared desktop images linked in the captured PR body: initial open groups, collapsed Workspace with Built-in still open, filtered Built-in showing Weather after the fix, and the pre-fix filtered state hiding Weather. These directly demonstrate the changed disclosure behavior. The captured body identifies source-mode Chromium and synthetic Gateway responses; no live-service or physical-device claim is made. Narrow screenshots were not present in the prepared manifest and are not counted as independently inspected evidence.

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • Patrick-Erichsen: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (9 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-17T13:46:12.505Z sha 1844d59fbd69aea17b8b54d8e7627d1fd7e43e68 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-17T14:12:03.275Z sha 1844d59fbd69aea17b8b54d8e7627d1fd7e43e68 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-17T14:49:37.987Z sha 1844d59fbd69aea17b8b54d8e7627d1fd7e43e68 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-17T16:33:22.774Z sha 67b9908fcfb555279247229be40471790e4dcb45 :: blocked before merge. :: none
  • reviewed 2026-09-18T00:52:30.571Z sha 141a388 :: blocked before merge. :: none
  • reviewed 2026-09-18T01:00:14.169Z sha 141a388 :: blocked before merge. :: none
  • reviewed 2026-09-18T22:59:45.783Z sha 9078497 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-21T01:57:41.710Z sha 0a25bb2 :: needs maintainer review before merge. :: none

@SunnyShu0925
SunnyShu0925 force-pushed the fix/skills-group-keyed-render-150345 branch from 1712bee to 1844d59 Compare September 17, 2026 13:27
@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Sep 17, 2026
@SunnyShu0925

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Sep 17, 2026
SunnyShu0925 added a commit to SunnyShu0925/openclaw that referenced this pull request Sep 17, 2026
@clawsweeper clawsweeper Bot added 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. labels Sep 17, 2026
When filtering removes an earlier group from the Skills inventory, the
native <details open> element at the same list position was reused by
the browser, transferring the collapsed state from the removed group to
the retained one. Key the outer render with repeat() using the stable
group id from groupSkills so the browser treats each group as a
distinct element and preserves its own expansion state.

Fixes openclaw#150345
@SunnyShu0925
SunnyShu0925 force-pushed the fix/skills-group-keyed-render-150345 branch from 67b9908 to 141a388 Compare September 18, 2026 00:45
@SunnyShu0925

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@fuller-stack-dev fuller-stack-dev changed the title fix(ui): key skills group render by stable group id fix(ui): preserve skill group expansion when filtering Sep 18, 2026
@fuller-stack-dev
fuller-stack-dev merged commit 8a26ae4 into openclaw:main Sep 21, 2026
170 checks passed
@fuller-stack-dev

Copy link
Copy Markdown
Member

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 21, 2026
* commit '8a26ae487b5fb9b72ea2c12bf384e9c776659429': (154 commits)
  fix(ui): preserve skill group expansion when filtering (#150911)
  test(gateway): consolidate server history and lifecycle fixtures (#155063)
  test(codex): select HTTP fallback in native finalizer fixtures (#155008)
  improve: reduce isolated Gateway CI test time (#154366)
  test(gateway): await approval registration acknowledgments
  fix(workboard): explain blocked-card claim recovery (#154990)
  perf(agents): consolidate exec target policy tests (#155060)
  perf(config): consolidate environment test fixtures (#155062)
  fix(ui): keep the chat rail anchored through composer resize
  fix: recovery tests wait for committed outcomes (#154995)
  fix(codex): keep inference bursts from failing turns (#154945)
  fix(memory): keep generated REM reflections out of promotion rankings (#154994)
  fix(sqlite): reclaim scratch files when storage is full (#154937)
  test(cli): spawn the compiled Doctor entry in the output process test (#155055)
  fix(update): distinguish config validation execution failures (#154892)
  test(doctor): await session cleanup before deleting fixture state
  fix(update): report unavailable service inspection accurately (#154896)
  test(gateway): observe plugin approval response completion
  perf(msteams): reduce file-consent test scaffolding (#155050)
  fix(ui): retain saved permissions during delayed startup reads (#154982)
  ...
@SunnyShu0925

Copy link
Copy Markdown
Contributor Author

@fuller-stack-dev Thanks~

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 22, 2026
* fix(ui): key skills group render by stable group id

When filtering removes an earlier group from the Skills inventory, the
native <details open> element at the same list position was reused by
the browser, transferring the collapsed state from the removed group to
the retained one. Key the outer render with repeat() using the stable
group id from groupSkills so the browser treats each group as a
distinct element and preserves its own expansion state.

Fixes openclaw#150345

* test(ui): preserve skill group identity through filtering

* chore: trigger CI re-run

---------

Co-authored-by: Jason (Json) <[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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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.

Control UI: Skills search inherits another group’s collapsed state

2 participants