Skip to content

refactor(ui): present Logbook mutations through Solid actions - #180380

Merged
steipete merged 5 commits into
mainfrom
solid2/w-s2-logbook-actions-schema31
Oct 22, 2026
Merged

steipete merged 5 commits into
mainfrom
solid2/w-s2-logbook-actions-schema31

Conversation

@steipete

@steipete steipete commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Whole-scope production syntax census at e8cde7518c558f1b4e44cb8139a149289b9719ad → f58e6da389e1777bafdf10b7788e4f4ccc9b6414. Counts are syntax, not defects.

Family LOC 1 Handlers 2 Cleanup 3 Async/Loading/Errored 4 Actions/optimistic 5 Import/lazy 6 Structured/store/projection 7 Factories 8 Context 9 Reveal 10 Owner APIs
solid 7935 → 7935 3 → 3 4 → 4 0/3/1 → 0/3/1 2/1/1 → 2/1/1 3/2 → 3/2 0/1/0 → 0/1/0 0 → 0 0 → 0 0 → 0 1/1/1 → 1/1/1
config 4962 → 4962 0 → 0 0 → 0 0/0/0 → 0/0/0 0/0/0 → 0/0/0 0/0 → 0/0 1/1/0 → 1/1/0 0 → 0 0 → 0 0 → 0 0/0/0 → 0/0/0
menus 8313 → 8313 0 → 0 2 → 2 0/2/2 → 0/2/2 1/1/0 → 1/1/0 3/1 → 3/1 0/2/0 → 0/2/0 1 → 1 0 → 0 0 → 0 0/0/0 → 0/0/0
rest 20136 → 20136 4 → 4 16 → 16 2/7/4 → 2/7/4 3/3/0 → 3/3/0 6/1 → 6/1 1/2/0 → 1/2/0 0 → 0 2 → 2 0 → 0 0/0/1 → 0/0/1
pagesA 27072 → 27072 3 → 3 3 → 3 15/35/33 → 15/35/33 17/23/1 → 17/23/1 6/0 → 6/0 1/3/1 → 1/3/1 0 → 0 0 → 0 0 → 0 0/0/0 → 0/0/0
pagesB 43723 → 43723 1 → 1 9 → 9 2/31/21 → 2/31/21 9/9/3 → 9/9/3 22/4 → 22/4 3/7/1 → 3/7/1 0 → 0 1 → 1 1 → 1 0/0/0 → 0/0/0
pagesC 55116 → 55250 4 → 4 26 → 26 1/19/16 → 1/19/16 5/7/0 → 6/11/0 43/4 → 43/4 9/11/0 → 9/11/0 20 → 20 0 → 0 0 → 0 0/0/0 → 0/0/0
app 31657 → 31657 2 → 2 3 → 3 0/9/8 → 0/9/8 0/0/0 → 0/0/0 68/7 → 68/7 0/2/0 → 0/2/0 0 → 0 1 → 1 0 → 0 0/0/0 → 0/0/0
lib 54764 → 54764 0 → 0 5 → 5 0/2/2 → 0/2/2 1/1/0 → 1/1/0 15/1 → 15/1 1/2/0 → 1/2/0 0 → 0 1 → 1 0 → 0 2/0/2 → 2/0/2
plugins 4024 → 4024 0 → 0 3 → 3 0/4/4 → 0/4/4 1/1/0 → 1/1/0 13/1 → 13/1 1/2/0 → 1/2/0 0 → 0 0 → 0 0 → 0 2/2/3 → 2/2/3
api 2104 → 2104 0 → 0 0 → 0 0/0/0 → 0/0/0 0/0/0 → 0/0/0 2/0 → 2/0 0/0/0 → 0/0/0 0 → 0 0 → 0 0 → 0 0/0/0 → 0/0/0
total 259806 → 259940 17 → 17 71 → 71 20/112/91 → 20/112/91 39/46/5 → 40/50/5 181/21 → 181/21 17/33/2 → 17/33/2 21 → 21 5 → 5 1 → 1 5/3/7 → 5/3/7

Supersedes #180338. Integrates the reviewed action implementation with current main and the current native landing workflow.

What Problem This Solves

Logbook capture, analysis, standup, and question actions now expose native Solid mutation presentation while their existing owner keeps synchronous admission and accepted results. Capture shows the expected paused value until the server settles. The other three operations expose only progress; generated content and analysis outcomes still come from the owner.

Route, Gateway, descriptor removal, and selected-day changes retire presentation without cancelling the admitted operation. The existing error contract remains visible. A declined owner operation returns no receipt, so it cannot start a phantom optimistic transition.

Touched-file checklist Before → after
1 Native handler defects 0 → 0
2 Component cleanup debt 0 changed; synchronous owner custody retained
3 Primary reads Unchanged; separate Logbook readiness PR
4 Mutation presentations 4 manual → 4 native action callers, one shared generator
5 Lazy boundary Logbook remains behind its existing plugin lazy import
6 State mirrors No new writable owner mirror; optimistic capture value only
7 Handwritten factories 0 → 0 in changed modules
8 Redundant context wrappers 0 → 0
9 Sibling loading Unchanged
10 Owner escapes 0 added

Evidence

Check Result
UI tsrs Passed
Focused tests Three changed single-file suites attempted through the pinned Bun wrapper (logbook-actions, plugin-page, logbook-view), each ended at the no-output watchdog before assertions. CI supplies remaining unit evidence. The built-UI probe verified pending/settled controls and held-write day and route navigation.
Independent P0–P2 review Found one fixture-only unstable retirement promise; corrected every direct Logbook fixture to return a stable promise. No production defect established.
Lint / format Both passed on all nine changed files
Production Knip Exact head and base report the same13 heartbeat-owner unused files; no UI finding or new ignore
Paired build / strict performance Both exact builds passed; paired strict evaluator reports zero violations/warnings. Source/test inputs match the reviewed prior head.
Visual Four 1440×1000 production-renderer captures inspected; synthetic data only
CI ci:full requested

Production nonblank LOC in the five touched production files: 1342 → 1468 (+126). The growth separates native mutation presentation and names the existing synchronous retirement points; it adds no RPC, dependency, or predicted server-generated output.

Exact integrated startup 316,028 → 316,032 B (+4 B), CSS40,894 B/1 request unchanged. Chat 1,437,999 → 1,438,002 B (+3 B); New Session 1,015,223 → 1,015,230 B (+7 B). All surfaces remain below current caps. Logbook retains its lazy boundary. The plain owner admits duplicate writes synchronously; Solid owns optimistic presentation.

Before: capture request pending

Before: capture request settled

After: optimistic capture request pending

After: capture request settled

CI repair for run 39727889052: all eight plugin-page.session-navigation.browser.test.tsx cases failed because the new action-retirement owner reads the application router and this browser fixture omitted it. The fixture now supplies a real router and stops it on cleanup. The exact browser file passes 8/8 locally. This is a test-fixture correction; production code, bundle metrics, source maps, and the four attached captures are unchanged.

CI follow-up: run39735223827 caught two readiness-test mounts newly present on main without the actions' required route-retirement input. Both now supply the same stable never-retired fixture as the other standalone view tests; exact UI-pages type graph passes. The integrated head is beea6dac305. The exact logbook-view.readiness.test.tsx runtime file also passes both tests on this head (503 seconds total, mostly transformation).

Exact-head full ci:full run 39738370889 completed successfully for beea6dac30554995d021634fdcfee5b995feb252 after the readiness-fixture repair. This is current-head evidence for all selected UI, Control UI E2E, browser-extension, and real-Gateway shards.

@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.

@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-22T07:10:56.257398Z beea6da 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.

@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: f58e6da389

ℹ️ 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 +140 to +142
const bundled = this.hasBundledView(info);
if (!bundled) {
this.retireActions();

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 Retire actions when a native page takes over

When the plugin runtime publishes a native pages contribution for logbook/logbook during activation or reload while the Gateway descriptor remains, PluginPageContent gives that contribution precedence, but this check still sees bundled === true, and plugin-registry publications do not invoke update(). A pending Logbook action therefore receives no synchronous retirement before its branch is replaced; Solid can retain the obsolete bundled branch until the RPC settles—or indefinitely if it hangs—delaying the native page. Retire based on the selected rendering mode before publishing it, rather than only on descriptor presence.

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

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added 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: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 22, 2026
@clawsweeper

clawsweeper Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR presents Logbook mutations through Solid actions while retaining synchronous admission and accepted results in the existing owner.

Example: Click Pause on the 2026-10-21 Logbook while the capture request is pending.

  • Before: The disabled control says Pause and the status says Capturing every 30s.
  • After: The disabled control says Resume and the status says Capture paused, then reconciles with the server.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The visible capture improvement is demonstrated and ownership is coherent, but a source-confirmed page-retirement defect blocks merge.
Proof confidence 🐚 platinum hermit (4/6) This maintainer-authored PR is outside the ordinary contributor proof gate; inspected built-UI captures demonstrate pending optimistic capture and settled reconciliation, while the body reports held-write day and route probes.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Pending capture changes do not immediately display the requested paused state, and mutation presentation must release page transitions when its scope ends.
Reason: The maintainer-authored direction provides optimistic feedback while preserving synchronous admission, generated results, and Gateway ownership.

Merge readiness

⛔ Needs changes before merge - 2 items remain

Keep this PR open: the maintainer-directed refactor is useful, but native-page takeover can leave the outgoing Logbook action holding the page transition.

Priority: P2
Reviewed head: f58e6da389e1777bafdf10b7788e4f4ccc9b6414

Before merge

  • Retire bundled actions before a native page takes over (P2) - When plugin activation or reload publishes a native pages registration for logbook/logbook while its Gateway descriptor remains advertised, PluginPageContent selects native mode. This check still considers the descriptor bundled, and plugin-registry publications do not call update(). A pending action therefore keeps awaiting its RPC instead of retiring, allowing Solid to hold the outgoing bundled branch and delay the native page until settlement. Observe registry-driven mode changes at the synchronous page owner and resolve retirement before publishing the replacement; add a held-operation takeover regression.
  • Complete next step - Integrate the overlapping timeline-readiness change from refactor(ui): derive Logbook timeline readiness #180074, preserving its Loading/Errored behavior and supplying a stable getRetired promise to both readiness-test mounts.

Findings

  • [P2] Retire bundled actions before a native page takes over — ui/src/pages/plugin/plugin-page-lifecycle.ts:140-143

Tests

  • Missing end-to-end proof: Inspected captures cover optimistic capture settlement; runtime artifacts do not show rejected-write recovery or held-action retirement, and no red-on-base result is supplied.
Agent review details

How this fits together

The Control UI plugin page mounts Logbook for a Gateway connection; controls submit RPC operations through the Logbook owner, and Solid presents progress and results.

flowchart LR
  A[Logbook controls] --> B[Logbook owner]
  B --> C[Gateway RPC]
  C --> B
  B --> D[Solid action presentation]
  E[Page and connection lifetime] --> D
  F[Selected day lifetime] --> D
  D --> A
Loading

Technical review

Best possible solution:

Keep the shared presenter and retire it synchronously at the existing page owner whenever the selected rendering mode leaves bundled Logbook.

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

A held Logbook operation followed by publication of a native logbook/logbook page reaches a rendering-mode change without synchronous retirement; this is source-reproducible but was not executed during review.

Is this the best way to solve the issue?

The shared adapter follows the existing Solid action recipe and preserves owner authority, but retirement must follow the actual selected page mode rather than descriptor presence alone.

Full review comments:

  • [P2] Retire bundled actions before a native page takes over — ui/src/pages/plugin/plugin-page-lifecycle.ts:140-143
    When plugin activation or reload publishes a native pages registration for logbook/logbook while its Gateway descriptor remains advertised, PluginPageContent selects native mode. This check still considers the descriptor bundled, and plugin-registry publications do not call update(). A pending action therefore keeps awaiting its RPC instead of retiring, allowing Solid to hold the outgoing bundled branch and delay the native page until settlement. Observe registry-driven mode changes at the synchronous page owner and resolve retirement before publishing the replacement; add a held-operation takeover regression.
    Confidence: 0.94
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm --dir ui test src/pages/plugin/plugin-page.test.tsx src/pages/plugin/logbook-actions.test.tsx src/pages/plugin/logbook-view.test.tsx src/pages/plugin/logbook-view.readiness.test.tsx
  • pnpm --dir ui test src/pages/plugin/plugin-page.session-navigation.browser.test.tsx --project browser
  • pnpm check:changed
  • git diff --check

What I checked:

PR surface

Source +134, Tests +163. Total +297 across 10 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 5 171 37 +134
Tests 5 168 5 +163
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 10 339 42 +297

Review metrics

Metric Value Why it matters
Production versus test LOC Production net +134; tests net +163. The growth supplies one shared presenter, retirement at existing owners, and distinct optimistic-settlement and retirement scenarios.

Root-cause cluster

Relationship: canonical
Canonical: #180380
Summary: This PR explicitly replaces the closed earlier action-presentation PR.

Members:

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

Labels

Label changes:

  • add P2: The introduced retirement gap can delay native plugin-page replacement while a Logbook operation remains pending.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: The introduced retirement gap can delay native plugin-page replacement while a Logbook operation remains pending.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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, 3:05 AM ET / 07:05 UTC.

@steipete
steipete merged commit 2f4f45d into main Oct 22, 2026
112 of 114 checks passed
@steipete
steipete deleted the solid2/w-s2-logbook-actions-schema31 branch October 22, 2026 09:09
@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
…aw#180380)

* refactor(ui): reconcile Logbook mutations with Solid actions

* test(ui): provide router for plugin navigation fixtures

* test(ui): provide logbook readiness retirement lifetime
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. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant