Workspaces: add trusted chart widgets#101792
Conversation
|
On the |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Dependency graph guard clearedThis PR no longer has blocked dependency graph changes. A future dependency graph change requires a fresh
|
|
Codex review: needs real behavior proof before merge. Reviewed July 13, 2026, 8:55 AM ET / 12:55 UTC. Summary 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.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest 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 changesLabel justifications:
Evidence reviewedPR surface: Source +318, Tests +84, Docs +7. Total +409 across 9 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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
Review history (14 earlier review cycles; latest 8 shown)
|
|
Fixed the P1 file-binding contract issue flagged here. The @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
3dde902 to
fde98e7
Compare
aa07ac0 to
4625479
Compare
4625479 to
383c1f8
Compare
e2a7e04 to
d9e1c4d
Compare
2584614 to
9e182f0
Compare
|
Merged via squash.
|
* 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]>
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:chartdirectly 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
maintreats the five chart widgets as unsupported.After: trusted line, bar, area, sparkline, and gauge renderers.
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.