Skip to content

Workspaces: add trusted chart widgets#101792

Merged
steipete merged 9 commits into
openclaw:mainfrom
100yenadmin:feat/dashboard-charts-sdk
Jul 16, 2026
Merged

Workspaces: add trusted chart widgets#101792
steipete merged 9 commits into
openclaw:mainfrom
100yenadmin:feat/dashboard-charts-sdk

Conversation

@100yenadmin

@100yenadmin 100yenadmin commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Workspaces can render text and structured operational data, but lack a trusted built-in visualization for numeric series. The legacy charts PR targeted the removed dashboard stack and bundled obsolete SDK assumptions.

Why This Change Was Made

This rebuild adds builtin:chart directly to the current Workspaces schema, tool authoring help, registry, and Control UI. It accepts only bounded finite numeric series (maximum 500 points), uses dependency-free SVG, and supports line, bar, area, sparkline, and gauge presentations. Invalid types, bounds, overflow-prone ranges, and malformed data fail into a safe error state; no script or evaluation surface is introduced.

The renderer normalizes constant, one-sided, and extreme finite ranges without invalid SVG coordinates. Bars stay inside their slots at the 500-point limit, zero-valued bars stay on the baseline, and screen-reader summaries report the observed data range.

User Impact

Workspace authors and agents can create responsive charts using current widget primitives. Empty and invalid data are clearly distinguished. All four new strings were translated across the 20 generated locales with zero recorded English fallbacks.

Visual Proof

Before: current main treats the five chart widgets as unsupported.

Before: unsupported chart widgets

After: trusted line, bar, area, sparkline, and gauge renderers.

After: chart widget gallery

Per-type captures: line, bar, area, sparkline, gauge. Artifact manifest.

Crabbox runs: candidate, baseline.

Evidence

  • node scripts/run-vitest.mjs ui/src/lib/workspace/widgets/widgets.test.ts ui/src/e2e/workspace-chart.e2e.test.ts extensions/workspaces/src/schema.test.ts — 34 tests passed across three shards.
  • node --import tsx scripts/control-ui-i18n.ts check — all 20 locales clean; zero fallback keys or pairs.
  • node scripts/run-vitest.mjs test/scripts/control-ui-i18n.test.ts — 19 tooling tests passed.
  • git diff --check origin/main...HEAD — clean.
  • Fresh branch autoreview after the final rebase — clean, no actionable findings (0.93 confidence).
  • Exact-head hosted checks are required before landing.

@100yenadmin
100yenadmin requested a review from a team as a code owner July 7, 2026 16:17
@100yenadmin

Copy link
Copy Markdown
Contributor Author

On the dependency-guard check: stacked on the not-yet-merged Wave 1 (#101098), so the cumulative diff inherits Wave 1's single new-plugin pnpm-lock.yaml importer entry. This PR adds no new dependency. Green locally: UI dashboard suite (102 tests), ui:i18n:check, pnpm ui:build, oxlint.

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: XL labels Jul 7, 2026
@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Jul 7, 2026
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Dependency graph guard cleared

This PR no longer has blocked dependency graph changes. A future dependency graph change requires a fresh /allow-dependencies-change comment after the guard blocks that new head SHA.

  • Current SHA: 9e182f05b44d2923aee8d08615e02497fdac6fa9

@clawsweeper

clawsweeper Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 13, 2026, 8:55 AM ET / 12:55 UTC.

Summary
Adds a trusted builtin:chart Workspaces widget with bounded numeric-series parsing, dependency-free SVG line, bar, area, sparkline, and gauge rendering, plus schema, authoring guidance, UI copy, styles, docs, and tests.

PR surface: Source +318, Tests +84, Docs +7. Total +409 across 9 files.

Reproducibility: not applicable. This PR adds a new charting capability rather than repairing broken behavior with an established existing contract.

Review metrics: 1 noteworthy metric.

  • Trusted widget contract: 1 built-in kind added. A new built-in becomes a permanent schema, agent-authoring, documentation, and UI rendering surface rather than an internal implementation detail.

Stored data model
Persistent data-model change detected: vector/embedding metadata: ui/src/styles/workspace.css. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #101142
Summary: This PR is the direct implementation candidate for the open chart-widget request; the broader roadmap tracks the surrounding Workspaces program, while the merged foundation is a prerequisite rather than a competing fix.

Members:

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

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🐚 platinum hermit
Result: blocked until 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 a redacted screenshot or short recording showing a final-head chart bound to real workspace data; redact private endpoints, identifiers, credentials, and other sensitive details.
  • After maintainer sponsorship, rebase onto current main and refresh the review against the resulting head.

Proof guidance:

  • [P1] Needs real behavior proof before merge: No contributor-provided final-head screenshot, recording, live output, or redacted runtime log shows a genuinely bound chart in Workspaces; add proof, update the PR body to trigger review, and ask a maintainer for @clawsweeper re-review if it does not rerun automatically.

Risk before merge

  • [P1] Merging would establish another permanent trusted Workspaces widget kind before a maintainer has confirmed that charts belong in the bundled native tier rather than the existing custom-widget path.
  • [P1] The contributor has not supplied inspectable final-head proof showing a real bound chart in the Workspaces UI; unit tests and CI cannot demonstrate layout, theme, binding, and accessibility behavior together.
  • [P1] The PR branch is behind current main, so the final implementation and proof need review refresh after rebasing even though GitHub currently reports the branch mergeable.

Maintainer options:

  1. Decide the mitigation before merge
    Confirm charts as a supported trusted Workspaces primitive, then rebase and show a redacted final-head screenshot or short recording of a genuinely bound chart across at least one normal series and one edge case; allow the repository's post-merge locale-refresh workflow to generate translated bundles.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] A maintainer must decide the permanent trusted-widget boundary; after sponsorship, the contributor must provide final-head live UI proof and refresh the behind branch.

Maintainer decision needed

  • Question: Should Workspaces permanently expose builtin:chart as a bundled trusted widget, or should charting remain an approved custom-widget capability?
  • Rationale: Both boundaries are technically available, and choosing the trusted built-in tier creates a lasting schema, authoring, documentation, and Control UI contract that cannot be inferred from implementation quality alone.
  • Likely owner: steipete — The current Workspaces foundation and its plugin/UI ownership boundary were introduced through this person's merged integration commit.
  • Options:
    • Sponsor the trusted built-in (recommended): Accept the bounded dependency-free chart primitive after final-head live UI proof and an up-to-date rebase.
    • Keep charts custom: Close or narrow this PR and direct chart authors to approved custom widgets so the permanent built-in registry stays smaller.

Security
Cleared: The diff adds no dependency or executable third-party content and keeps chart input within bounded finite data rendered through Lit-managed SVG.

Review details

Best possible solution:

Confirm charts as a supported trusted Workspaces primitive, then rebase and show a redacted final-head screenshot or short recording of a genuinely bound chart across at least one normal series and one edge case; allow the repository's post-merge locale-refresh workflow to generate translated bundles.

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

Not applicable: this PR adds a new charting capability rather than repairing broken behavior with an established existing contract.

Is this the best way to solve the issue?

Unclear: the dependency-free bounded renderer is a narrow implementation, but maintainers must decide whether the best product boundary is a permanent trusted built-in or the existing approved custom-widget path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 0d1573e9a2cc.

Label changes

Label justifications:

  • P2: This is a bounded user-facing Workspaces feature with normal product-review priority and no demonstrated urgent regression or release blocker.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: No contributor-provided final-head screenshot, recording, live output, or redacted runtime log shows a genuinely bound chart in Workspaces; add proof, update the PR body to trigger review, and ask a maintainer for @clawsweeper re-review if it does not rerun automatically.
Evidence reviewed

PR surface:

Source +318, Tests +84, Docs +7. Total +409 across 9 files.

View PR surface stats
Area Files Added Removed Net
Source 6 319 1 +318
Tests 2 84 0 +84
Docs 1 9 2 +7
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 412 3 +409

What I checked:

Likely related people:

  • steipete: Authored and merged the current agent-composable Workspaces foundation in commit 0af8467, establishing the plugin and Control UI boundaries that this widget extends. (role: introduced current foundation; confidence: high; commits: 0af846713749; files: extensions/workspaces/src/schema.ts, extensions/workspaces/src/tools.ts, ui/src/lib/workspace/widgets/index.ts)
  • 100yenadmin: The merged Workspaces foundation explicitly credits this contributor's original product direction, and their related roadmap and follow-up work consistently cover the same widget architecture beyond this isolated proposal. (role: original feature designer and recent area contributor; confidence: medium; commits: cf57f98fbedd, 4625479bd7b0; files: extensions/workspaces/src/schema.ts, extensions/workspaces/src/tools.ts, ui/src/lib/workspace/widgets/chart.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 (14 earlier review cycles; latest 8 shown)
  • reviewed 2026-07-07T23:57:50.102Z sha d0b8615 :: needs real behavior proof before merge. :: [P2] Remove the root carve scratch file
  • reviewed 2026-07-08T04:28:19.001Z sha d0b8615 :: needs real behavior proof before merge. :: [P2] Remove the root carve scratch file
  • reviewed 2026-07-09T23:22:54.706Z sha 7d40009 :: needs real behavior proof before merge. :: [P2] Remove the root carve scratch file
  • reviewed 2026-07-10T08:41:46.978Z sha 3dde902 :: needs real behavior proof before merge. :: [P1] Store dashboard state in SQLite | [P2] Render bars from a zero baseline | [P3] Add the authoring guide to public docs navigation
  • reviewed 2026-07-13T03:05:58.387Z sha fde98e7 :: needs real behavior proof before merge. :: [P2] Synchronize the generated locale maps
  • reviewed 2026-07-13T07:35:59.413Z sha 7830eee :: needs real behavior proof before merge. :: [P2] Synchronize the generated locale maps
  • reviewed 2026-07-13T09:45:17.822Z sha aa07ac0 :: needs real behavior proof before merge. :: [P2] Synchronize the generated locale maps
  • reviewed 2026-07-13T12:40:51.626Z sha 4625479 :: needs real behavior proof before merge. :: [P2] Synchronize the generated locale maps

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. 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. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Jul 7, 2026
@100yenadmin

Copy link
Copy Markdown
Contributor Author

Fixed the P1 file-binding contract issue flagged here. resolveBinding (ui/src/lib/dashboard/index.ts) now calls dashboard.data.read with { binding } — the gateway's readParams whitelist accepts only that key, so the previous { path, pointer } call threw at runtime — and it returns the server's already-pointer-resolved data verbatim (the server applies the JSON pointer in resolveFileBinding; the client had been re-applying it, a double-resolve). The unit test had encoded the wrong contract (mocked the whole doc, asserted { path, pointer }); it's rewritten to assert the real gateway shape so a regression fails. The fix is in this PR's diff now and at the base #101098 the series stacks on.

The dependency-guard red and the large cumulative diff are both inherent to the base-first split (this stacks on the unmerged #101098; no new package enters the resolved graph — just the new plugin's lockfile importer entry needing the standard head-SHA authorization).

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 7, 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 removed the merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. label Jul 7, 2026
@100yenadmin
100yenadmin force-pushed the feat/dashboard-charts-sdk branch from 3dde902 to fde98e7 Compare July 13, 2026 02:38
@100yenadmin 100yenadmin changed the title Dashboard: chart widgets + widget authoring SDK Workspaces: add trusted chart widgets Jul 13, 2026
@openclaw-barnacle openclaw-barnacle Bot added plugin: workspaces Agent-composable Workspaces plugin size: M and removed size: XL labels Jul 13, 2026
@github-actions github-actions Bot removed the dependencies-changed PR changes dependency-related files label Jul 13, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Jul 13, 2026
@clawsweeper clawsweeper Bot removed 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. labels Jul 13, 2026
@100yenadmin
100yenadmin force-pushed the feat/dashboard-charts-sdk branch 3 times, most recently from aa07ac0 to 4625479 Compare July 13, 2026 11:27
@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 13, 2026
@steipete steipete self-assigned this Jul 16, 2026
@steipete
steipete force-pushed the feat/dashboard-charts-sdk branch from 4625479 to 383c1f8 Compare July 16, 2026 22:18
@steipete
steipete force-pushed the feat/dashboard-charts-sdk branch 2 times, most recently from e2a7e04 to d9e1c4d Compare July 16, 2026 23:06
@steipete
steipete force-pushed the feat/dashboard-charts-sdk branch from 2584614 to 9e182f0 Compare July 16, 2026 23:38
@steipete
steipete merged commit 4a7abe1 into openclaw:main Jul 16, 2026
132 of 146 checks passed
@steipete

Copy link
Copy Markdown
Contributor

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 17, 2026
* feat(workspaces): add trusted chart widgets

* fix(workspaces): keep chart helpers private

* test(workspaces): prove chart widgets in control UI

* fix(workspaces): validate empty chart bounds

* fix(workspaces): expand subnormal chart ranges

* fix(workspaces): normalize chart ranges

* fix(workspaces): keep zero bars at baseline

* fix(ui): sync chart widget locales

* fix(ui): translate chart widget locales

---------

Co-authored-by: Eva <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
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 docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. plugin: workspaces Agent-composable Workspaces plugin rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. 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.

2 participants