Repository navigation
refactor(ui): use Solid actions for chat widget pinning - #180001
Conversation
|
🦞👀 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. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: stale review; fresh review needed. Summary Next step Review history (1 earlier review cycle)
|
There was a problem hiding this comment.
💡 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".
| yield completion; | ||
| yield refresh(pinned); |
There was a problem hiding this comment.
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 👍 / 👎.
|
Merged via squash.
|
Whole-scope CHAT-D census,
f25a10e929c2→560d98943ccf. Raw cleanup/owner APIs include named exceptions; unlanded families remain counted.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
mainatf25a10e929c2to 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
39725878853. Earlier local attempts terminated through the 120-second no-output watchdog without an assertion verdict; they are not counted as passes.f25a10e929c2and head560d98943ccfboth 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.ci:fullrun 39725878853: completed successfully: all three UI unit shards, all nine Control UI E2E shards, both real-Gateway shards, performance, lint/types, guards, andopenclaw/ci-gatepassed.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
Actions 0 → 1; optimistic values 0 → 2. The existing iframe-policy
untrackremains 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: