Skip to content

feat(logbook): automatic work journal plugin with Control UI timeline tab#99930

Merged
steipete merged 11 commits into
mainfrom
claude/charming-ellis-286027
Jul 5, 2026
Merged

feat(logbook): automatic work journal plugin with Control UI timeline tab#99930
steipete merged 11 commits into
mainfrom
claude/charming-ellis-286027

Conversation

@steipete

@steipete steipete commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Closes #99867

What Problem This Solves

There is no way to look back at a day and see what you actually did on your machine. Time trackers log app names; they miss what the work was. Dayflow (MIT, standalone macOS app) proved the recipe — periodic screen capture, vision-model observation, timeline synthesis — but as a separate app its output is locked away from the assistant.

This PR adds Logbook, a bundled (disabled-by-default) plugin that turns screen snapshots from a paired node into a reviewable timeline of the day, surfaced in a new Control UI sidebar tab, with a daily-standup generator and timeline-grounded Q&A.

Why This Change Was Made

OpenClaw already owns every capability the idea needs — node screen capture, media-understanding providers, plugin services, gateway RPC, plugin SQLite state, the dashboard. Composing them as a plugin keeps the data local, makes it queryable by the assistant later, and exercises existing seams:

  • Capture: a plugin service invokes screen.snapshot (app nodes) or the new plugin-provided logbook.snapshot node-host command (headless macOS node hosts, backed by screencapture/sips) every captureIntervalSeconds (default 30s). A node-invoke policy adds logbook.snapshot to the default macOS allowlist while the plugin is enabled. Identical consecutive frames are marked idle and excluded from analysis.
  • Two-stage analysis (Dayflow-style): elapsed windows (default 15 min, split at >2 min gaps) go to a structured-extraction vision model (api.runtime.mediaUnderstanding.extractStructuredWithModel, e.g. codex/gpt-5.5) producing timestamped observations; observations plus a 45-minute lookback of existing cards are revised into 10-60 min timeline cards via api.runtime.llm.complete (default agent model), with one JSON-repair retry. Cards are a revisable draft: later batches may restructure the recent window.
  • Storage: plugin-owned SQLite (node:sqlite, same pattern as memory-core/imessage) under <state-dir>/logbook/; frames pruned after retentionDays (default 14); batches stuck in running reset to pending on restart.
  • UI: new Logbook tab following the Workboard/Dreams precedent (core view calling plugin-registered logbook.* gateway methods; plugin-disabled callout when off). Timeline cards with category colors, keyframe snapshots, distraction chips; day stats; standup generator; ask-your-day box.

Architecture notes: owner boundary respected (all product logic in extensions/logbook; the core diff is generic tab wiring + i18n). No new core config; plugin config has 8 clamped keys. Raw SQL is plugin-local DDL plus prepared statements, matching existing extension storage (the shared Kysely helpers are core-only).

User Impact

  • Off by default; no behavior change until openclaw plugins enable logbook.
  • Once enabled: the Logbook tab shows the day as expandable activity cards with focus/category stats, one-click standup notes, and natural-language recall over the tracked day.
  • Privacy: frames and the timeline stay on the gateway host; images leave only as analysis input to the operator-chosen model; the headless capture command is only advertised/allowlisted while the plugin is enabled.

Evidence

  • Unit tests: extensions/logbook/src/analyze.test.ts (time parsing, JSON repair contract, overlap trimming, batch windowing/gap split, sampling, keyframe pick) and extensions/logbook/src/store.test.ts (idle exclusion, crash recovery, revision-window replacement, stats, retention pruning) — 21 tests green via node scripts/run-vitest.mjs extensions/logbook.
  • Contract suites green: src/plugins/contracts/package-manifest.contract.test.ts, src/plugins/contracts/extension-runtime-dependencies.contract.test.ts, src/plugins/bundled-plugin-naming.test.ts, test/extension-import-boundaries.test.ts.
  • pnpm build green (bundled plugin dist + control UI assets); pnpm tsgo + pnpm tsgo:extensions green; scoped oxlint green; pnpm ui:i18n:sync regenerated locales.
  • Live end-to-end on macOS (isolated-state dev gateway + headless node host from this branch): node paired with logbook.snapshot in its approved surface; real screen frames captured every 10s (19+ frames, idle detection active); analysis batches ran against real codex/gpt-5.5 (chatgpt.com/backend-api/codex/responses transport) producing timestamped observations and merged timeline cards that correctly described the on-screen work; the Logbook tab rendered cards with keyframe snapshots, day stats (focus bar, categories, apps), a generated Daily Standup (Done/Today/Blockers), and an answered ask-your-day question. Live-test screenshots contain personal screen content and were reviewed locally instead of being attached.
  • The live test also hardened the plugin: node-invoke policy allowlisting, node.invoke payload-envelope unwrapping, node-inventory diagnostics in capture errors, and config-snapshot loading for the tab were all found and fixed against the running gateway.

Release-note context: feat(plugins): add Logbook automatic work journal plugin with Control UI timeline tab (screen snapshots via paired nodes, Dayflow-style two-stage analysis, daily standup, ask-your-day).

@steipete
steipete requested a review from a team as a code owner July 4, 2026 10:33
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui labels Jul 4, 2026
@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Jul 4, 2026
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Dependency Guard

This PR changes dependency-related files. Maintainers should confirm these changes are intentional.

Changed files:

  • extensions/logbook/package.json
  • pnpm-lock.yaml

Maintainer follow-up:

  • Review whether the dependency changes are intentional.
  • Inspect resolved package deltas when lockfile, shrinkwrap, or workspace dependency policy changes are present.
  • Treat package-lock.json and npm-shrinkwrap.json diffs as security-review surfaces.
  • Run pnpm deps:changes:report -- --base-ref origin/main --markdown /tmp/dependency-changes.md --json /tmp/dependency-changes.json locally for detailed release-style evidence.

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Dependency graph changes noted

This PR includes dependency graph changes. The dependency guard is informational because the PR author is a repository admin or a member of @openclaw/openclaw-secops.

  • Current SHA: 4a73f284bcddbaf4fccc8084f003995ba247d888
  • Trusted actor: @steipete
  • Trusted role: pull request author; openclaw-secops

Security review is still recommended before merge when the dependency graph change is intentional.

@openclaw-barnacle openclaw-barnacle Bot added the maintainer Maintainer-authored PR label Jul 4, 2026
@clawsweeper

clawsweeper Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 5, 2026, 2:49 PM ET / 18:49 UTC.

Summary
Adds a disabled-by-default bundled Logbook plugin with macOS/node screenshot capture, SQLite-backed timeline analysis, plugin Control UI tab SDK/protocol support, docs, i18n, and tests.

Reproducibility: yes. for the remaining review finding at source level: an older loadLogbook request can apply its timeline after state.day has changed. I did not run the macOS capture flow in this read-only review.

Review metrics: 3 noteworthy metrics.

  • Plugin config keys: 8 added. The Logbook manifest adds user-visible defaults for capture, retention, node selection, sizing, and model routing that affect setup and upgrade expectations.
  • Plugin UI/protocol surfaces: 2 added. The PR adds both Plugin SDK tab descriptors and a hello-ok controlUiTabs field, which are compatibility-sensitive extension/client contracts.
  • Dependency graph delta: 1 workspace importer, 0 external packages. The lockfile adds the Logbook workspace package without new third-party packages, lowering supply-chain risk but still changing package ownership.

Stored data model
Persistent data-model change detected: database schema: extensions/logbook/src/store.ts, persistent cache schema: ui/src/i18n/.i18n/ru.tm.jsonl, serialized state: extensions/logbook/index.ts, serialized state: extensions/logbook/src/analyze.test.ts, serialized state: extensions/logbook/src/node-host.ts, unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #99867
Summary: This PR is the open implementation candidate for the linked Logbook feature request; the issue remains canonical until the PR merges or maintainers choose another direction.

Members:

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

Merge readiness
Overall: 🦪 silver shellfish
Proof: 🦪 silver shellfish
Patch quality: 🦐 gold shrimp
Result: blocked until stronger real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add redacted real-behavior proof showing capture, analysis, the Control UI timeline, standup, and Q&A; redact private screen content, IPs, endpoints, keys, phone numbers, and other private details.
  • [P1] Guard loadLogbook against stale timeline responses after day changes and add a focused controller test.
  • After proof is added, updating the PR body should trigger a fresh ClawSweeper review; if not, ask a maintainer to comment @clawsweeper re-review.

Proof guidance:

  • [P1] Needs stronger real behavior proof before merge: The PR describes live macOS proof, but no redacted screenshot, recording, terminal output, copied live output, logs, or linked artifact is available for reviewers to inspect. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Mantis proof suggestion
A visible macOS-node plus Control UI proof would materially help reviewers verify the new screen-capture timeline flow without relying on private local screenshots. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis visual task: verify Logbook enabled with a paired macOS node captures frames, renders the Control UI timeline, standup, and Q&A, with private data redacted.

Risk before merge

  • [P1] The PR body describes live macOS proof, but no redacted screenshots, terminal output, recording, logs, or linked artifact are inspectable by reviewers.
  • [P1] The PR adds a new Plugin SDK tab surface, hello-ok protocol field, native Swift model field, and eight plugin config keys, so compatibility and upgrade confidence still require maintainer review beyond green CI.
  • [P1] The feature intentionally captures screen contents, stores local frames, exposes frame previews behind write scope, and can send screenshots to a model, so privacy and security-boundary acceptance must be explicit before merge.

Maintainer options:

  1. Fix UI race and attach proof before merge (recommended)
    Require a stale-response guard with focused coverage plus redacted live proof of capture, timeline rendering, standup, and Q&A before final review.
  2. Split the reusable tab contract
    Maintainers can separate the generic plugin tab/protocol work from the privacy-sensitive Logbook product if that lowers review risk.
  3. Accept the screen-journal boundary deliberately
    Maintainers may choose to ship the disabled-by-default plugin, but should explicitly own the privacy, retention, and model-routing boundary.

Next step before merge

  • [P1] Manual review remains because the PR has a proof gate and product/security boundary decision that automation cannot complete, plus one narrow code finding to fix before merge.

Maintainer decision needed

  • Question: Should Logbook ship as a bundled disabled-by-default OpenClaw plugin after the remaining code/proof blockers are fixed, or should screen journaling move to an external ClawHub/plugin path first?
  • Rationale: The PR is a new user-facing screen-capture capability with plugin SDK/protocol/config surface and privacy-sensitive model routing, so code review can identify blockers but cannot settle the product and security boundary.
  • Likely owner: steipete — He is the assigned feature sponsor and the strongest recent current-main owner signal for the plugin registry and Control UI surfaces involved.
  • Options:
    • Sponsor bundled Logbook after blockers (recommended): Keep this PR as the landing path once the stale timeline race, inspectable proof, and security review are complete.
    • Split generic tab API from Logbook: Land the reusable plugin tab/protocol seam separately and defer the screen-journal product implementation.
    • Move Logbook to ClawHub: Close or pause the bundled implementation and ask for an external plugin package if core should not own screen journaling.

Security
Cleared: No concrete code-level security defect remains after the prior state-path leak fix, but the intentional screen-capture privacy boundary still needs maintainer acceptance before merge.

Review findings

  • [P2] Discard stale Logbook timeline responses — ui/src/pages/plugin/logbook-controller.ts:166
Review details

Best possible solution:

Land only after the stale timeline response bug is fixed, redacted real-behavior proof is attached, and maintainers explicitly accept the bundled disabled-by-default screen-journal product/security boundary.

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

Yes for the remaining review finding at source level: an older loadLogbook request can apply its timeline after state.day has changed. I did not run the macOS capture flow in this read-only review.

Is this the best way to solve the issue?

No: the owner-boundary approach is plausible, and prior blockers are fixed, but this is not the best merge state until stale timeline responses are guarded and inspectable live proof is available.

Full review comments:

  • [P2] Discard stale Logbook timeline responses — ui/src/pages/plugin/logbook-controller.ts:166
    loadLogbook can start a timeline request for one day, then still assign that response after the user navigates to another day or a newer load starts. Standup and ask already guard against this stale-response pattern; capture the requested day or use a load token before applying state.timeline. Late discovery: this code was unchanged since earlier reviewed heads where the issue was visible.
    Confidence: 0.87
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.87

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 3f380635f59b.

Label changes

Label justifications:

  • P2: This is a broad disabled-by-default feature PR with a concrete P2 UI correctness bug and proof gap, but it is not a shipped regression.
  • merge-risk: 🚨 compatibility: The PR expands plugin SDK descriptors, gateway hello protocol, Swift gateway models, and plugin config defaults that existing clients and plugins must tolerate.
  • merge-risk: 🚨 security-boundary: The PR adds opt-in screen capture, local frame storage, raw frame preview RPCs, and model analysis of screenshot content.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR describes live macOS proof, but no redacted screenshot, recording, terminal output, copied live output, logs, or linked artifact is available for reviewers to inspect. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

What I checked:

Likely related people:

  • steipete: Recent current-main history shows steipete authored and merged the plugin registry, gateway, and Control UI surfaces this PR extends, and the linked issue/PR are assigned to him for this feature direction. (role: feature sponsor and recent area contributor; confidence: high; commits: 2bc50d0656bd, 89ef6632dea0; files: src/plugins/registry.ts, src/gateway/server/ws-connection/message-handler.ts, ui/src/components/app-sidebar.ts)
  • Shakker: Recent current-main history includes adjacent Control UI sidebar work in the same navigation component touched by this PR. (role: recent adjacent UI contributor; confidence: medium; commits: 4074c8e7439e; files: ui/src/components/app-sidebar.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.
Review history (9 earlier review cycles; latest 8 shown)
  • reviewed 2026-07-05T06:31:51.418Z sha 20be493 :: needs real behavior proof before merge. :: [P1] Require stronger scope for raw Daylog frames | [P2] Handle Daylog in active-tab refresh | [P2] Use the SDK temp helper for snapshots
  • reviewed 2026-07-05T06:39:30.251Z sha 20be493 :: needs real behavior proof before merge. :: [P1] Require stronger scope for raw frame bytes | [P2] Handle the new tab in active refresh | [P2] Use the SDK temp helper for snapshots | [P2] Align the shipped Logbook identity
  • reviewed 2026-07-05T07:43:05.273Z sha a7f04ba :: needs real behavior proof before merge. :: [P1] Require stronger scope for raw frame bytes | [P2] Wire Logbook into active refresh | [P2] Use the SDK temp helper for snapshots
  • reviewed 2026-07-05T08:09:25.676Z sha a7f04ba :: needs real behavior proof before merge. :: [P1] Require stronger scope for raw frame bytes | [P2] Respect disabled image media before borrowing defaults | [P2] Use the gateway day for the initial timeline | [P2] Wire Logbook into active refresh | [P2] Use the SDK temp helper for snapshots
  • reviewed 2026-07-05T13:02:31.420Z sha 6964095 :: needs real behavior proof before merge. :: [P2] Only borrow structured-capable media defaults | [P2] Gate write-only controls from read-only Logbook tabs
  • reviewed 2026-07-05T17:42:59.537Z sha fa74c42 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-05T17:50:57.135Z sha fa74c42 :: needs real behavior proof before merge. :: [P2] Do not expose Logbook state paths to read scope | [P2] Render Logbook clocks in gateway time
  • reviewed 2026-07-05T18:24:50.186Z sha d2a82d0 :: needs real behavior proof before merge. :: [P2] Do not expose Logbook state paths to read scope | [P2] Render Logbook clocks in gateway time | [P2] Stop bundled polling when the tab disappears

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Jul 4, 2026
@steipete steipete changed the title feat(daylog): automatic work journal plugin with Control UI timeline tab feat(logbook): automatic work journal plugin with Control UI timeline tab Jul 5, 2026
@steipete steipete added plugin: logbook Logbook automatic work journal plugin and removed plugin: daylog labels Jul 5, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Jul 5, 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: a7f04bab19

ℹ️ 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 thread extensions/logbook/src/service.ts
Comment thread ui/src/pages/plugin/logbook-controller.ts
steipete added a commit that referenced this pull request Jul 5, 2026
…d Control UI tab

Squash of PR #99930 work for rebase onto the Control UI route refactor:
- extensions/logbook: Dayflow-style capture -> observations -> timeline cards
  pipeline with SQLite store, node capture commands, standup/ask, retention
- plugin SDK/gateway seam: surface "tab" Control UI descriptors projected
  into hello-ok controlUiTabs (scope-filtered, deterministic order)
- Control UI: dynamic plugin tabs with bundled Logbook view
- docs, tests, labeler wiring
@steipete
steipete force-pushed the claude/charming-ellis-286027 branch from a7f04ba to 6964095 Compare July 5, 2026 12:21
@openclaw-barnacle openclaw-barnacle Bot added the gateway Gateway runtime label Jul 5, 2026
@steipete

steipete commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

All review findings are addressed on the rebased branch (now on top of the Control UI route refactor). Summary of what changed:

Security / privacy hardening

  • Raw screenshot RPCs (logbook.frames, logbook.frame) now require operator.write (extensions/logbook/index.ts). Rationale: write scope already gates state mutation and model-token spend, so raw pixels sit behind the same trust level; read-only dashboard sessions still get the derived timeline, just without keyframes. Happy to flip these to operator.admin if preferred — it is a one-line change per method.
  • tools.media.image.enabled: false now blocks the media-defaults fallback in resolveVisionModel (extensions/logbook/src/service.ts); only an explicit plugin visionModel is used then. Documented in docs/plugins/logbook.md.
  • Headless captures write into an owner-only temp subdirectory (0700 dir + pre-created 0600 file, extensions/logbook/src/node-host.ts).
  • Plugin tab path validation rejects protocol-relative URLs (//host, /\host) so a descriptor cannot iframe external content (src/plugins/registry.ts + tests).

Correctness

  • The unpinned dashboard day now adopts the gateway's status.today (browser timezones and midnight rollover no longer skew the initial view); day navigation pins, the Today button unpins (ui/src/pages/plugin/logbook-controller.ts).
  • The registry validator now accepts surface: "tab" — previously the descriptor was rejected and the tab never advertised (caught in review; regression tests added in src/plugins/registry.control-ui.test.ts).
  • Capture node selection prefers app nodes (screen.snapshot) over headless hosts and rotates off failing nodes instead of re-picking the same broken one every tick (extensions/logbook/src/service.ts + behavior tests).

Rebase / port

  • Rebased onto current main and ported the plugin-tab surface to the route-owned Control UI: one static /plugin route with ?plugin=<pluginId>&id=<tabId> (namespaced, so same-named tabs from different plugins cannot collide), openclaw-plugin-page renders bundled views, sandboxed plugin frames, or an unavailable card; the sidebar renders hello controlUiTabs after each group's static routes.

Proof

  • Focused suites green (registry descriptors, hello projection, navigation, logbook store/analyze/service), tsgo lanes and pnpm build green, i18n sync/check clean, structured review now reports no actionable findings.
  • Live smoke on the new architecture: isolated gateway with Logbook enabled, real served Control UI — sidebar shows the plugin tab, routing lands on /plugin?plugin=logbook&id=logbook, and the Logbook view renders (screenshot verified locally).

Bundled (disabled-by-default) distribution is per the maintainer's direction to land this PR.

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

ℹ️ 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 thread extensions/logbook/src/service.ts
Comment thread extensions/logbook/index.ts Outdated
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Jul 5, 2026
@steipete steipete self-assigned this Jul 5, 2026
@steipete
steipete force-pushed the claude/charming-ellis-286027 branch from 7ae026d to 4a73f28 Compare July 5, 2026 18:39

@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: 4a73f284bc

ℹ️ 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".

day: status.today,
});
} else {
state.timeline = timeline;

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 Ignore stale Logbook loads after day changes

When a silent poll or an earlier refresh is still in flight and the user navigates to another day, this assignment can apply the old timeline response to the new state.day because loadLogbook never records the requested day or checks it before mutating state. In that race, a previous/today poll that finishes after the user's day navigation renders cards for the wrong day until a later refresh happens; discard responses whose requested day no longer matches the current day (as the standup/ask paths already do).

Useful? React with 👍 / 👎.

@steipete

steipete commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Land-ready proof

Maintainer repair complete. The branch is rebased onto current main; review artifacts validate READY FOR /prepare-pr with zero findings, and all review threads are resolved.

Key repairs:

  • secure owner-only screenshot temp storage and fail-closed capture policy
  • structured-capable Codex-only borrowed vision defaults
  • write-scoped interactive tab, read-status path privacy, and gateway-timezone timeline clocks
  • DST-safe and gap-free analysis windows, including local-midnight closure
  • reconnect/day-race handling and descriptor-removal polling cleanup
  • generated protocol/docs/i18n outputs, docs, and changelog coverage

Focused proof:

  • Blacksmith Testbox tbx_01kwsq9309v0fgkm631msmxh2j: focused extension, gateway, tooling, and UI shards passed (176 assertions); Logbook analysis passed 24 tests; pnpm build and pnpm tsgo:test:ui passed
  • Blacksmith Testbox tbx_01kwsr5d0s70sern1q5e0vdt1k: 9 focused status/controller/view tests, targeted formatting, and pnpm tsgo:test:ui passed
  • Blacksmith Testbox tbx_01kwss3dpfscx5njwhd609ds08: bundled-tab descriptor-removal lifecycle regression plus controller coverage and pnpm tsgo:test:ui passed
  • final focused autoreview: no accepted/actionable findings
  • local lightweight checks: git diff --check, Control UI i18n with zero fallbacks, docs map, protocol/Swift generators

Exact-head hosted proof:

Direct Codex contract verification used source at 98d28aab54ed86714901b6619400598598876dd0:

Known proof gaps: none.

@steipete
steipete merged commit c730d8f into main Jul 5, 2026
102 checks passed
@steipete
steipete deleted the claude/charming-ellis-286027 branch July 5, 2026 18:50
@steipete

steipete commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 6, 2026
… tab (openclaw#99930)

* feat(logbook): automatic work journal plugin with a plugin-contributed Control UI tab

Squash of PR openclaw#99930 work for rebase onto the Control UI route refactor:
- extensions/logbook: Dayflow-style capture -> observations -> timeline cards
  pipeline with SQLite store, node capture commands, standup/ask, retention
- plugin SDK/gateway seam: surface "tab" Control UI descriptors projected
  into hello-ok controlUiTabs (scope-filtered, deterministic order)
- Control UI: dynamic plugin tabs with bundled Logbook view
- docs, tests, labeler wiring

* feat(ui): port plugin tabs and Logbook to the route-owned Control UI architecture

- shared /plugin route carries the tab id in the query (?id=<tab>), matching
  the router's exact-path contract
- openclaw-plugin-page renders bundled views (Logbook), sandboxed plugin
  frames (descriptor path), or the unavailable card
- sidebar renders hello controlUiTabs after each group's static routes
- Logbook view/controller live under ui/src/pages/plugin/

* fix(ui): namespace plugin tabs by pluginId to prevent cross-plugin tab id collisions

* fix(logbook): prefer app capture nodes and rotate off failing nodes

* fix(plugins): reject protocol-relative Control UI tab paths

* fix(logbook): harden automatic journal

* docs(changelog): remove maintainer self-credit

* chore(ui): refresh locale metadata after rebase

* fix(logbook): preserve analysis window boundaries

* fix(logbook): align status privacy and timezone

* fix(ui): stop hidden plugin tab polling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos app: web-ui App: web-ui dependencies-changed PR changes dependency-related files docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. plugin: logbook Logbook automatic work journal plugin rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Logbook: automatic work journal plugin with Control UI timeline tab

1 participant