Skip to content

refactor(workboard): share Control UI contract#102271

Merged
steipete merged 1 commit into
mainfrom
refactor/workboard-ui-contract
Jul 14, 2026
Merged

refactor(workboard): share Control UI contract#102271
steipete merged 1 commit into
mainfrom
refactor/workboard-ui-contract

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Jul 8, 2026

Copy link
Copy Markdown
Member

Related: #102258

What Problem This Solves

The Control UI maintained a separate copy of the Workboard card and metadata contract. Plugin-owned additions could silently drift or disappear at the UI normalization boundary, including workspace provenance and authority, claim state, diagnostic actions, and notification sequence values.

Why This Change Was Made

This moves the canonical Workboard data model into the private @openclaw/workboard-contract workspace package and makes both plugin internals and the Control UI consume it. UI-only lifecycle, task, refresh, and presentation state stays local to the Control UI. The normalizer explicitly preserves supported contract fields and drops unknown discriminants instead of fabricating fallback values.

User Impact

No visual behavior changes are intended. Workboard metadata now has one package-owned contract, so valid plugin fields survive gateway normalization and future contract drift becomes a compile-time/build-time failure.

Evidence

  • AWS Crabbox run run_0f9b3d099eb4: 250 Control UI Workboard tests and 8 Workboard gateway tests passed.
  • AWS Crabbox run run_9be895fcc578: full TSGo project build passed on pushed head f9430b27668907fe1020479468ca2d66ac2f8a25.
  • pnpm ui:build: production build, sidecar checks, and performance budgets passed.
  • git diff --check: passed.
  • Fresh latest-main autoreview: clean with no accepted/actionable findings.

@RomneyDa
RomneyDa requested a review from a team as a code owner July 8, 2026 18:34
@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Dependency Guard

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

Changed files:

  • extensions/workboard/package.json
  • packages/workboard-contract/npm-shrinkwrap.json
  • packages/workboard-contract/package.json
  • pnpm-lock.yaml
  • ui/package.json

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 8, 2026

Copy link
Copy Markdown
Contributor

Dependency graph changes are blocked

OpenClaw does not accept dependency graph changes through PRs unless a repository admin or security explicitly authorizes the current head SHA. Dependency updates are generated internally by maintainers so external PRs cannot change the resolved graph.

Detected dependency graph changes:

  • packages/workboard-contract/npm-shrinkwrap.json changed.
  • pnpm-lock.yaml changed.
  • extensions/workboard/package.json changed devDependencies.
  • packages/workboard-contract/package.json changed name, version.
  • ui/package.json changed dependencies.

Auto-scrub was not attempted because this PR changes package manifest dependency graph fields:

  • extensions/workboard/package.json changed devDependencies.
  • packages/workboard-contract/package.json changed name, version.
  • ui/package.json changed dependencies.

Dependency graph changes must be reviewed by security or handled by maintainers internally. Please remove lockfile changes manually if they are not needed.

To remove lockfile changes, restore them from the target branch:

git fetch origin
git checkout 'origin/main' -- 'packages/workboard-contract/npm-shrinkwrap.json' 'pnpm-lock.yaml'
git commit -m 'chore: remove dependency lockfile change'
git push

If this PR intentionally needs a dependency graph change, ask a repository admin or member of @openclaw/openclaw-secops to comment:

/allow-dependencies-change

The action will approve the current head SHA (f9430b27668907fe1020479468ca2d66ac2f8a25) when it reruns. A later push requires a fresh approval.

@clawsweeper

clawsweeper Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 10, 2026, 12:44 PM ET / 16:44 UTC.

Summary
The PR moves the Workboard data model into private @openclaw/workboard-contract, migrates plugin and Control UI consumers, updates package/build/test resolution, and adds metadata-preservation coverage.

PR surface: Source -115, Tests +76, Config +15, Other +11. Total -13 across 27 files.

Reproducibility: yes. at source level: current main has separate Workboard plugin and Control UI contract inventories, and the PR's focused regression test covers concrete plugin-owned fields that the UI copy currently drops.

Review metrics: 1 noteworthy metric.

  • Resolved dependency graph: 0 added, 0 removed, 0 changed packages. The supplied Testbox report indicates workspace-only importer and package metadata changes, focusing review on ownership and exact-head authorization rather than third-party updates.

Stored data model
Persistent data-model change detected: vector/embedding metadata: ui/src/pages/workboard/data.test.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #102258
Summary: This PR is the candidate implementation for the Workboard portion of the canonical contract-correctness umbrella issue; the channel-status PR is a separate workstream from the same audit.

Members:

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

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

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

Rank-up moves:

  • Refresh the draft against current main and rerun focused exact-head proof.
  • Obtain admin or secops dependency authorization for the refreshed SHA.

Risk before merge

  • [P1] The current head is a draft and behind main; any refresh changes the exact SHA and requires the focused Workboard, bundle, UI build, and boundary proof to be rerun.
  • [P1] The workspace manifests, shrinkwrap, and lockfile cannot merge until an authorized admin or secops reviewer approves the exact refreshed head.
  • [P1] The shared contract contains claim metadata, so future edits must continue routing client responses through the established Gateway token-redaction boundary.

Maintainer options:

  1. Refresh, re-prove, and authorize (recommended)
    Update the draft to current main, rerun the focused package, Workboard, and UI checks, then grant dependency approval for that exact head.
  2. Pause if the package owner is undesired
    Do not merge this branch if maintainers prefer a different canonical Workboard contract seam.

Next step before merge

  • No automated repair is indicated; a maintainer should refresh the protected draft and an authorized admin or secops reviewer must approve the exact dependency head.

Maintainer decision needed

  • Question: After the draft is refreshed onto current main, should an admin or secops reviewer authorize the exact workspace package and lockfile changes for @openclaw/workboard-contract?
  • Rationale: The implementation is technically sound, but repository policy reserves intentional dependency-graph authorization for an approved human reviewer on the exact SHA.
  • Likely owner: steipete — The feature history identifies this account as the primary owner of the Workboard contract and most major expansions, making it the strongest available routing candidate for the package-boundary decision.
  • Options:
    • Authorize the refreshed head (recommended): Approve the exact SHA after confirming the dependency report remains workspace-only and the focused Workboard and bundling proof is green.
    • Reject this package seam: Keep the canonical issue open and choose another supported owner boundary if maintainers do not want the private workspace package.

Security
Cleared: The patch adds no resolved third-party package dependency, preserves Gateway replacement of actual claim secrets with [redacted], and introduces no concrete security or supply-chain regression.

Review details

Best possible solution:

Refresh the unchanged package-owned contract onto current main, rerun focused integration proof, preserve Gateway redaction and bundled-output invariants, then authorize and merge the exact dependency head.

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

Yes at source level: current main has separate Workboard plugin and Control UI contract inventories, and the PR's focused regression test covers concrete plugin-owned fields that the UI copy currently drops.

Is this the best way to solve the issue?

Yes; extracting the unchanged plugin-owned model into a narrow private package removes the competing declaration owner while keeping UI-only state local and retaining the Gateway redaction boundary.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 1dcbcce515ea.

Label changes

Label justifications:

  • P2: This is a normal-priority correctness and maintainability refactor that prevents silent Control UI metadata drift without an intended visual change.
  • merge-risk: 🚨 compatibility: The PR changes the canonical package, import, and bundling boundary shared by Workboard runtime and Control UI consumers.
  • merge-risk: 🚨 other: The intentional workspace manifest and lockfile changes require exact-head repository authorization that ordinary green CI cannot provide.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (logs): Exact-head Testbox logs cover focused Workboard UI and Gateway tests, emitted bundle inspection, Control UI build, dependency reporting, and path-scoped repository checks for this internal no-visual-change refactor.
  • proof: sufficient: Contributor real behavior proof is sufficient. Exact-head Testbox logs cover focused Workboard UI and Gateway tests, emitted bundle inspection, Control UI build, dependency reporting, and path-scoped repository checks for this internal no-visual-change refactor.
Evidence reviewed

PR surface:

Source -115, Tests +76, Config +15, Other +11. Total -13 across 27 files.

View PR surface stats
Area Files Added Removed Net
Source 16 198 313 -115
Tests 3 79 3 +76
Docs 0 0 0 0
Config 5 15 0 +15
Generated 0 0 0 0
Other 3 23 12 +11
Total 27 315 328 -13

What I checked:

  • Current-main duplication remains: Current main still independently declares the Workboard model in the plugin and Control UI, including UI normalization code that omits diagnostic actions, notification sequence, and workspace source metadata. (ui/src/lib/workboard/index.ts:7, 1dcbcce515ea)
  • Canonical contract preserves current behavior: The extracted package contract matches current main's plugin-owned type declarations except for its ownership comment, so the branch does not drop newer Workboard fields. (packages/workboard-contract/src/index.ts:1, 53f851b45e34)
  • Gateway secret boundary remains intact: Workboard Gateway replaces actual claim secrets with the literal [redacted] before returning cards to clients; the shared UI contract preserves only that display-safe marker. (extensions/workboard/src/gateway.ts:45, 53f851b45e34)
  • Extension boundary correction: Commit f92300a moved the contract out of the bundled plugin source graph into a private workspace package and configured it to be inlined into Workboard runtime output. (tsdown.config.ts:227, f92300a45c26)
  • Derived boundary configuration corrected: Commit 53f851b added the package alias to XAI's derived extension boundary paths, resolving the previous package-boundary check failure. (extensions/xai/tsconfig.json:360, 53f851b45e34)
  • Exact-head proof: The PR discussion records passing focused Workboard UI and Gateway tests, bundled-output inspection, UI build, path-scoped checks, and a dependency report with no resolved package additions, removals, or version changes. (ui/src/pages/workboard/data.test.ts:101, 53f851b45e34)

Likely related people:

  • steipete: GitHub path history ties the original Workboard dashboard and most major metadata, orchestration, persistence, Gateway, and worktree expansions to this account. (role: introduced behavior and primary feature owner; confidence: high; commits: 86ed25af34eb, 1d645ff66bfd, 61031d1b1cec; files: extensions/workboard/src/types.ts, extensions/workboard/src/gateway.ts, extensions/workboard/src/store.ts)
  • vincentkoc: Recent merged refactors localized and trimmed declarations and exports in the same Control UI Workboard module, making this account relevant to the UI ownership boundary. (role: recent Control UI contract contributor; confidence: high; commits: 0ecfc522db53, 6418e196b123, 835e6a75325a; files: ui/src/lib/workboard/index.ts)
  • BunsDev: Commit e07dbb2 updated Workboard status persistence across the plugin and Control UI, providing adjacent behavior context for the shared contract. (role: recent Workboard persistence contributor; confidence: medium; commits: e07dbb27d91f; files: extensions/workboard/src/types.ts, ui/src/lib/workboard/index.ts, ui/src/pages/workboard)
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 (5 earlier review cycles)
  • reviewed 2026-07-08T18:40:45.333Z sha 0d45475 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-08T18:48:30.208Z sha 0d45475 :: found issues before merge. :: [P1] Keep extension contracts out of the core tsgo graph
  • reviewed 2026-07-08T19:59:33.295Z sha f92300a :: needs changes before merge. :: [P2] Sync XAI boundary paths with the new contract alias
  • reviewed 2026-07-08T20:12:57.461Z sha 53f851b :: needs maintainer review before merge. :: none
  • reviewed 2026-07-08T20:21:00.410Z sha 53f851b :: needs maintainer review before merge. :: none

@RomneyDa

RomneyDa commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

Exact-head verification for 0d4547531bf763aad4f3e7ff9cf106df05ce04a6:

  • Testbox-through-Crabbox tbx_01kx1ayeeq603djks62f5gevcb: 181 Control UI Workboard tests passed.
  • Testbox-through-Crabbox tbx_01kx1ayeeq603djks62f5gevcb: 6 Workboard gateway tests passed.
  • Testbox-through-Crabbox tbx_01kx1ayeeq603djks62f5gevcb: pnpm ui:build passed.
  • Fresh Testbox-through-Crabbox tbx_01kx1b9w1t57v2epzzqmzn54nx: explicit path-scoped pnpm check:changed passed, including TSGo, oxlint, shrinkwrap guards, runtime-sidecar checks, and import-cycle validation.
  • Codex autoreview (gpt-5.5, high): clean with no accepted/actionable findings.
  • Dependency change report on Testbox tbx_01kx1ga0ayakq2ryd3z3x06b9p: 0 added, 0 removed, and 0 changed resolved packages. The dependency-file changes are only the Workboard package export, the Control UI workspace dependency, and the matching lockfile importer link.

The remaining dependency-guard failure is the expected policy gate for this intentional workspace dependency. An admin or @openclaw/openclaw-secops member must comment /allow-dependencies-change for this exact head. No merge or automerge has been requested.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. 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: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Jul 8, 2026
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Jul 8, 2026
@RomneyDa

RomneyDa commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

Exact-head verification for f92300a45c26b0c1aaf069d4f29a36cd43403416:

  • Fixed the CI boundary finding by moving the shared declaration surface to private package @openclaw/workboard-contract, outside the bundled plugin source graph.
  • Workboard keeps the contract as a development/build dependency, while tsdown.config.ts explicitly inlines it into bundled runtime output so it does not leak into plugin runtime dependency metadata.
  • Testbox-through-Crabbox tbx_01kx1kvvwpn5j0jgqd8v3nmeks: targeted Workboard bundled build passed; emitted dist/extensions/workboard contains no external @openclaw/workboard-contract import and includes the contract declarations/constants.
  • Fresh Testbox-through-Crabbox tbx_01kx1kzrzh7d0rw0chcrbcrfqg: explicit path-scoped check:changed passed in 7m30.817s, including supply-chain/lock checks, all shrinkwrap guards, TSGo, oxlint, runtime-sidecar checks, A2UI sync, and import-cycle validation.
  • Earlier focused proof remains green: 251 Control UI Workboard tests, 6 Workboard gateway tests, and pnpm ui:build.
  • Fresh Codex autoreview (gpt-5.5, high): clean with no accepted/actionable findings after the runtime metadata and bundling corrections.

The intentional workspace dependency/lockfile importer changes still require exact-head dependency approval from an admin or @openclaw/openclaw-secops member via /allow-dependencies-change. No merge or automerge has been requested.

@RomneyDa

RomneyDa commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

Exact-head CI correction pushed as 53f851b45e34c4ad9df1ac5813ef96fdd06a9c59:

  • Fixed checks-fast-contracts-plugins-b by keeping extensions/xai/tsconfig.json derived from the shared extension package-boundary map after adding @openclaw/workboard-contract.
  • Focused Testbox tbx_01kx1myghm63834y3y7hctwbpp: extension-package-project-boundaries.test.ts passed, 8/8 tests.
  • Fresh Testbox tbx_01kx1n1czk64ma2cp72mqbh89k: path-scoped check:changed -- extensions/xai/tsconfig.json passed in 5m13.861s.
  • Fresh Codex autoreview (gpt-5.5, high): clean.

The dependency approval policy gate remains the only known external authorization requirement. No merge or automerge has been requested.

@clawsweeper clawsweeper Bot removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Jul 8, 2026
@RomneyDa

RomneyDa commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jul 8, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. labels Jul 8, 2026
@RomneyDa
RomneyDa marked this pull request as draft July 10, 2026 16:02
@steipete steipete self-assigned this Jul 14, 2026
@steipete
steipete force-pushed the refactor/workboard-ui-contract branch from 53f851b to f9430b2 Compare July 14, 2026 09:16
@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Jul 14, 2026
@steipete
steipete marked this pull request as ready for review July 14, 2026 09:20
@steipete

Copy link
Copy Markdown
Contributor

Land-ready verification complete for f9430b27668907fe1020479468ca2d66ac2f8a25.

  • Rewrote the branch on current Workboard contracts. The private @openclaw/workboard-contract package now owns the shared model; plugin internals and Control UI consume it.
  • Preserved workspace provenance/access, claim state, diagnostic actions, and notification sequence values. Unsupported diagnostic/notification variants are rejected rather than coerced.
  • AWS Crabbox run_0f9b3d099eb4: pnpm test ui/src/lib/workboard/index.test.ts ui/src/pages/workboard/view.test.ts extensions/workboard/src/gateway.test.ts — 258 tests passed.
  • AWS Crabbox run_9be895fcc578: node scripts/run-tsgo.mjs -b tsconfig.projects.json — passed.
  • pnpm ui:build and git diff --check — passed.
  • Hosted CI run 29321373347 — passed, including UI, build, types, lint, docs, package boundaries, and full test shards.
  • Fresh latest-main autoreview — no accepted/actionable findings.

Known proof gap: no screenshot, because this is an internal contract refactor with no intended rendered UI change.

@steipete
steipete merged commit 561cf56 into main Jul 14, 2026
176 of 180 checks passed
@steipete
steipete deleted the refactor/workboard-ui-contract branch July 14, 2026 09:33
@steipete

Copy link
Copy Markdown
Contributor

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 15, 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 dependencies-changed PR changes dependency-related files docs Improvements or additions to documentation extensions: xai maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. plugin: workboard proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: L 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.

2 participants