Skip to content

refactor: present Secrets reads and saves with native Solid actions - #180418

Merged
steipete merged 1 commit into
mainfrom
solid2/w-s2-secrets-actions
Oct 22, 2026
Merged

steipete merged 1 commit into
mainfrom
solid2/w-s2-secrets-actions

Conversation

@steipete

@steipete steipete commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Secrets loading and save feedback now use native Solid readiness and actions, with pending presentation released when the Gateway changes or the user leaves the page.

User Impact

The Secrets dialog keeps its existing appearance, validation, permissions, confirmation, error messages, retry behavior, and draft retention. Navigating away or reconnecting does not wait for an admitted save to settle. The existing owner still decides whether a request may run and records its actual result.

Why This Change Was Made

Replace the hand-built revision signal with the shared owner projection, observe admitted list receipts under Loading, and scope optimistic saving to the current store. A synchronous router subscription releases presentation before Solid can park page cleanup; it does not cancel the write or issue another RPC.

Evidence

Both normalized UI builds passed. The strict paired performance check passed with no warnings or violations: startup JavaScript is 316,219 → 316,238 bytes gzip (+19), chat boot 1,439,258 → 1,439,282 (+24), and new-session boot 1,016,089 → 1,016,102 (+13). All changes are below the 64-byte build-variance allowance; startup raw bytes and CSS are unchanged.

Direct Node/Playwright proof passed on both builds: a failed list read recovers through Retry with exactly two list requests; a held save disables its controls; a rejected save shows the error and retains the draft. The head also passed a successful retry, displaying the returned row and closing the dialog. Before/after images below use only synthetic data and were inspected and delivered in chat.

tsgo:ui, scoped lint/format, and git diff --check passed. Isolated review reported no actionable P0–P2 findings. The changed files were reviewed in isolation; the existing store implementation was inspected locally.

The two focused Bun test files did not reach assertions locally. The first attempt stalled before loading Vitest; the second reached Vitest but failed to start its worker (Timeout waiting for worker to respond). The attempts were stopped by the repository wrapper, and no local test pass is claimed. PR CI supplies the missing unit-test evidence.

The canonical pnpm deadcode:knip check exited 1 with the same 13 heartbeat-file findings as the exact-base check; the command output is byte-identical. It reports no changed Secrets path.

The broader static scan (pnpm dlx --package [email protected] knip --config config/knip.config.ts --production --no-progress --reporter compact --no-config-hints --exclude duplicates) reported 13 unused files, 19 unused exports, and 10 unused exported types. No changed Secrets path was reported, and all reported paths/configuration have unchanged blobs against the base. That broader command was not replayed on the base, so its export/type findings are not claimed as baseline-proven.

Solid audit and change size
Checklist item Before → after
Native handlers Stable event callbacks preserved; no conditional handler binding added
Lifecycle onSettled 1 → 1; ordered router-retirement subscription 0 → 1
Async reads Manual view loading branch 1 → 0; admitted async receipt reader and Loading 0 → 1
Mutations Native action 0 → 1; optimistic saving flag 0 → 1; plain owner admission/settlement retained
Code splitting Existing route import timing retained; no eager page import
Structured state Revision signal 1 → 0; shared mutable-owner projection 0 → 1; no writable owner mirror
JSX Existing TSX retained; handwritten component construction 0 → 0
Context No redundant context wrapper, 0 → 0
Sibling loading One list resource; no unrelated Reveal group introduced
Owner APIs createRoot, getOwner, runWithOwner, and production flush remain 0

Production lines: 824 → 889 (+65). Test lines: +127. The growth is the receipt/action/lifetime boundary plus two page-level scenarios; the plain Secrets owner remains the sole request and write authority. Effects, render effects, untrack, direct DOM listeners, and DOM queries remain zero in the changed production files. No baseline or dependency changes.

Before: Secrets save pending

Before: Secrets save rejected with retained draft

After: Secrets native action save pending

After: Secrets save rejected with retained draft

Keep request admission and write settlement in the existing Secrets owner. Observe admitted reads, scope optimistic saving to its presentation, and release pending presentation on Gateway replacement or route departure.
@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 22, 2026
@clawsweeper

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

@steipete
steipete marked this pull request as ready for review October 22, 2026 07:55
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 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-22T08:00:24.153694Z 543af34 Draft marked ready
ℹ️ 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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. labels Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR replaces manual Secrets loading and save presentation with Solid readiness, actions, and scoped optimistic feedback.

Example: Save PUBLIC_URL=https://new.example.test and receive a rejected response.

  • Before: Owner busy state disables the form, then the error appears with the draft retained.
  • After: A native Solid action presents the same disabled form and retained draft while allowing its presentation to retire independently.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and has no identified correctness defect, but the supplied runtime evidence covers only part of its async lifecycle contract.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Secrets loading and save feedback need to retain their existing behavior as presentation moves to native Solid async primitives.
Reason: The maintainer-authored direction aligns with the established Solid migration and preserves validation, permissions, drafts, and the existing request owner.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: the maintainer-directed refactor preserves the existing Secrets authority, and inspection found no actionable introduced defect.

Priority: P3
Reviewed head: 543af346a90dd3d5d66abdc6a24c47b742229539

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied browser evidence does not exercise Gateway replacement or route departure while a save remains unresolved.
Agent review details

How this fits together

The Control UI Secrets page accepts list, edit, bulk-save, and delete interactions; its plain TypeScript owner admits Gateway requests and records outcomes, while Solid renders rows, dialogs, and pending feedback.

flowchart LR
  A[Secrets controls] --> B[Secrets page owner]
  B --> C[Secrets store operations]
  C --> D[Gateway RPC]
  B --> E[Owner projection]
  E --> F[Solid readiness and actions]
  F --> A
  G[Router and Gateway lifecycle] --> B
Loading

Technical review

Best possible solution:

Retain the existing Secrets request owner and complete the scoped browser lifecycle proof for the native presentation refactor.

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

This is a behavior-preserving refactor, with no original failing-product reproduction claimed; inspection confirms the existing manual loading and busy presentation on main.

Is this the best way to solve the issue?

The change follows the existing Solid recipe, observes admitted reads without duplicating RPCs, and keeps request authority and actual write settlement in the established owner.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +65, Tests +127. Total +192 across 5 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 3 116 51 +65
Tests 2 135 8 +127
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 251 59 +192

Review metrics

Metric Value Why it matters
Production versus test growth Production +65 lines; tests +127 lines Production growth implements receipt observation, native action presentation, and retirement; the added page scenarios exercise distinct rejection/reconnect and route-teardown boundaries.

Labels

Label changes:

  • add P3: This is a focused internal UI refactor with preserved visible save behavior and no established urgent user regression.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is a focused internal UI refactor with preserved visible save behavior and no established urgent user regression.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

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

  • Demonstrate held-save navigation and Gateway replacement in the built browser UI, including safe late settlement.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 22, 2026, 4:10 AM ET / 08:10 UTC.

@steipete
steipete merged commit d9e63d0 into main Oct 22, 2026
161 of 164 checks passed
@steipete
steipete deleted the solid2/w-s2-secrets-actions branch October 22, 2026 08:29
@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
…penclaw#180418)

Keep request admission and write settlement in the existing Secrets owner. Observe admitted reads, scope optimistic saving to its presentation, and release pending presentation on Gateway replacement or route departure.
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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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.

1 participant