Skip to content

refactor(ui): use Solid actions for chat widget pinning - #180001

Merged
steipete merged 4 commits into
mainfrom
solid2/w-s2-chat-d-widget-pin
Oct 22, 2026
Merged

steipete merged 4 commits into
mainfrom
solid2/w-s2-chat-d-widget-pin

Conversation

@steipete

@steipete steipete commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Whole-scope CHAT-D census, f25a10e929c2 → 560d98943ccf. Raw cleanup/owner APIs include named exceptions; unlanded families remain counted.

Family Files Production LOC I1 I2 raw I3 I4 I5 I6 I7 raw I8 I9 I10 raw
attachments 34 4225 0 4 2 0 1 0 0 0 0 0
automations 7 1670 0 0 0 1 0 0 0 0 0 0
cards 10 → 11 2160 → 2205 0 0 0 1 → 0 0 0 0 0 0 0
context 2 542 0 1 0 0 0 0 0 0 0 0
details 18 4848 0 0 0 0 0 1 0 0 0 0
header-navigation 12 4139 0 0 0 0 0 1 0 0 0 0
indicators-other 65 7899 0 1 1 1 0 0 0 0 0 3
media_previews 23 3652 0 2 2 1 1 1 0 0 0 0
panels_files_sidebar 24 6299 0 2 2 3 0 1 0 0 0 0
publication 3 843 0 0 1 1 0 0 0 0 0 0
pull_request_ci 10 2338 0 0 0 0 0 0 0 0 0 0
questions 13 2529 0 0 0 0 1 0 0 0 0 0
review_diff 17 4051 0 1 1 0 0 1 0 0 0 0
sharing 6 1955 0 0 1 1 0 0 0 0 0 0
sidebar 10 3399 0 0 0 1 0 0 0 0 0 0
source_previews 1 144 0 0 0 0 0 0 0 0 0 0
tools 7 1552 0 0 0 0 0 0 0 0 0 0
workspace 16 4853 0 0 0 0 0 1 0 0 0 0

Total files: 278 → 279; production LOC: 57098 → 57143.
I1–I10: 0, 11, 10, 10 → 9, 3, 6, 0, 0, 0, 3.

What Problem This Solves

A mounted Chat Canvas card can retain Pinned after its widget is removed from the dashboard when the parent does not rerender. The pin button now consumes the existing board snapshot owner through a target-keyed Solid leaf, with an action and optimistic pin/saving feedback. The provider retains mutation authority and synchronous duplicate admission. Failure, retry, target replacement, tags, selectors, and lazy native-element registration are preserved.

Merged main at f25a10e929c2 to resolve a real test-file conflict. The resolution retains main’s new document-retention/height coverage and both pin-action regressions. It only unions imports; both production source blobs are unchanged from the reviewed predecessor. Current head: 560d98943ccf71222ba78250cb0927df59f82e49.

Evidence

Check Result
Original mounted regression Base fails after board removal; reviewed source passes 21 tests, including pending title refresh, failure/retry, duplicate suppression, snapshot reconciliation, and replacement target admission. Production is unchanged.
Integrated affected suite All three current-head full UI unit shards pass in PR run 39725878853. Earlier local attempts terminated through the 120-second no-output watchdog without an assertion verdict; they are not counted as passes.
Integrated UI typecheck / formatting Passed under Node 26.12.1 and declared pnpm 12.15.0.
Integrated production Knip Exit1: exactly 13 unused heartbeat files, all matching completed scheduled main 39723236246; no widget finding. No ignore changed.
Independent review Original final P2 review clean; import-only conflict resolution independently reviewed without findings.
Paired build / strict performance Current exact base f25a10e929c2 and head 560d98943ccf both pass on the same machine: startup 316,050 → 316,016 B gzip (−34 B), 7 JS / 1 CSS requests; raw startup JS 952,017 B and CSS 40,894 B unchanged. Both use Node 26.12.1, pnpm 12.15.0, identical dependency inputs, disabled caches, and the same fixed build identity.
Synthetic visual proof Original five-state capture passed with zero page errors. Unchanged production retains those states; the full-dashboard baseline parent refresh already masks the mounted-card subscription defect.
Current CI Genuine PR-event ci:full run 39725878853: completed successfully: all three UI unit shards, all nine Control UI E2E shards, both real-Gateway shards, performance, lint/types, guards, and openclaw/ci-gate passed.

The local test startup failures remain recorded as gaps, not passing tests. No full local E2E suite, additional visual capture, or remote lease was used for the import-only merge. The bounded paired production build supplies current-base startup proof; the original inspected captures cover byte-identical production.

Solid 2 counts and size

Checklist item in touched production Before After
1. Native conditional handler defects 0 0
2. Component cleanup defects 0 0
3. Manual async-read state 0 0
4. Manual mutation state 1 0
5. Manual component loaders 0 0
6. Immutable structured-state copies 0 0
7. Hand-written component creation 0 0
8. Redundant context wrappers 0 0
9. Uncoordinated sibling readiness 0 0
10. Feature-owned roots 0 0

Actions 0 → 1; optimistic values 0 → 2. The existing iframe-policy untrack remains 1 → 1; controller/effect/render-effect/listener/query/flush/owner API counts stay 0. Two custom-element registration imports remain at their existing imperative-island boundaries.

Production LOC: 735→780 (+45), across widget-card-view.tsx and widget-pin-button.tsx. Current-main test LOC: 685→762 (+77). The added leaf preserves one board owner and target lifetime without new dependencies, configuration, or requests.

Screenshots

Synthetic dashboard states, unchanged production:

State Before After
Pinning Before: synthetic chat widget pinning in progress After: synthetic chat widget pinning in progress
Dashboard removal Before: synthetic dashboard after removing the pinned widget After: synthetic dashboard after removing the pinned widget

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T05:13:11.899068Z 560d989 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed 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 Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head 5bffc94083f676b5de642086dfdd698bc12340ff, but the PR head is now 912a71254c14e14da8b67359e5706efb773b0145. Its old verdict and PR readiness labels are no longer current.

Next step
Run or wait for a fresh ClawSweeper review on the current PR head.

Review history (1 earlier review cycle)
  • reviewed 2026-10-21T23:09:08.772Z sha 5bffc94 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Oct 22, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 560d98943c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +34 to +35
yield completion;
yield refresh(pinned);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep pinning optimistic until the board refresh lands

With the real Gateway, board.widget.put broadcasts board.changed before sending its response (src/gateway/server-methods/board.ts:493-494). The provider handles that event by incrementing stateGeneration and starting an asynchronous board.get (ui/src/lib/board/gateway-provider.ts:332-336), which causes it to discard the subsequent mutation response. Consequently, when completion resolves here, refresh(pinned) can only reread the still-old snapshot and rolls the optimistic value back to false until board.get finishes; on a slower connection the button visibly re-enables and permits a duplicate pin. Keep the action pending until the authoritative refresh publishes its receipt instead of immediately refreshing this synchronous projection.

AGENTS.md reference: ui/AGENTS.md:L16-L18

Useful? React with 👍 / 👎.

@steipete
steipete merged commit 8f6a045 into main Oct 22, 2026
113 of 116 checks passed
@steipete
steipete deleted the solid2/w-s2-chat-d-widget-pin branch October 22, 2026 06:11
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 23, 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 ci:full Keep ordinary native-locale CI selection on the next PR run. P2 Normal backlog priority with limited blast radius. size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant