Skip to content

fix(ui): keep ad hoc visualizations inline and readable - #126729

Merged
steipete merged 2 commits into
mainfrom
steipete/visualization-display-and-dashboard-bugs-10bea5
Aug 20, 2026
Merged

steipete merged 2 commits into
mainfrom
steipete/visualization-display-and-dashboard-bugs-10bea5

Conversation

@steipete

@steipete steipete commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes three related Control UI problems with ad hoc visualizations:

  • Expanding a completed turn's “Worked for” disclosure could paint intermediate work over the final reply while the transcript virtualizer waited for an asynchronous resize.
  • A canvas or attachment produced before the final reply could be folded into the completed-work rollup and disappear from the normal transcript.
  • The model-facing widget and dashboard descriptions did not say that a single ad hoc visualization should stay inline, so agents could promote one-off visuals into dashboards without being asked.

Why This Change Was Made

Expanded work now becomes separate virtual transcript rows instead of growing inside the already-measured summary row. Canvas and attachment groups are treated as persistent visible outcomes that stop the rollup boundary, for both assistant- and tool-shaped messages. The widget and dashboard tool descriptions now put the inline-first threshold before the deferred tool-directory truncation point, while preserving the existing board-only fallback and runtime defaults.

The Web “Worked for” product contract remains intact; this repairs its ownership boundary rather than deleting the rollup.

User Impact

Single visualizations remain visible inline, completed work can be expanded without covering the answer, and dashboards are reserved for explicit dashboard requests or responses with multiple non-code visualizations.

Evidence

Before

The final reply shares the stale virtual-row position with expanded work:

Worked-for expansion overlapping the final reply

After

The visualization remains visible before the rollup, and expanded work occupies independent rows without overlap:

Inline visualization retained with non-overlapping expanded work

The browser regression deliberately pauses ResizeObserver after initial layout, proving correctness does not depend on the observer racing the next paint.

Validation:

  • node scripts/check-changed.mjs
  • pnpm test:changed — 9,851 tests passed across the selected shards; the first run hit an unrelated jsdom focus-matching flake in config-form-collection-defaults.browser.test.ts, which passed in isolation and on the complete rerun
  • node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-worked-for-visualization.e2e.test.ts
  • pnpm build
  • pnpm ui:build on the current-main Node 24 tree: 336.4 KiB startup gzip (339.9 KiB limit)
  • Codex autoreview: clean, no accepted/actionable findings

The first exact-head CI runs exposed a startup bundle overage in their advancing merge trees. The transcript projection was compressed, the branch was rebased to current main, and the budget was not raised; the current-main Node 24 build now passes with 3.5 KiB of gzip headroom.

Production LOC: +33/-29 (net +4) | Tests: +255/-7

AI-assisted: yes. The implementation and tests were reviewed against the affected source, the TanStack virtualizer measurement contract, the existing Web rollup product issue, and current dashboard documentation.

@clawsweeper

clawsweeper Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui agents Agent runtime and tooling size: M maintainer Maintainer-authored PR labels Aug 20, 2026
@steipete
steipete marked this pull request as ready for review August 20, 2026 16:05
@steipete
steipete force-pushed the steipete/visualization-display-and-dashboard-bugs-10bea5 branch from cc37d0e to d52a06f Compare August 20, 2026 16:24
@steipete
steipete force-pushed the steipete/visualization-display-and-dashboard-bugs-10bea5 branch from d52a06f to 2603a40 Compare August 20, 2026 16:34
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready verification for head 2603a404d06af83b14664d644d789a692c04c25d:

  • Root cause repaired at the transcript projection owner: expanded completed work is represented as independent virtual rows, so cached summary-row measurements cannot overlap the following reply.
  • Canvas and attachment groups now stop completed-work folding for both assistant- and tool-shaped messages.
  • Widget/dashboard model guidance keeps one ad hoc non-code visualization inline and reserves dashboards for explicit requests or multiple visualizations; the complete rule is inside the deferred 177-character directory prefix.
  • Production LOC: +33/-29 (net +4). Tests: +255/-7.

Proof run:

  • node scripts/check-changed.mjs
  • pnpm test:changed (green rerun; 9,851 selected assertions)
  • node scripts/run-vitest.mjs ui/src/pages/chat/chat-thread.test.ts
  • node scripts/run-vitest.mjs src/canvas/widget-tool.prompt.test.ts
  • node scripts/run-vitest.mjs src/agents/tools/dashboard-tool.test.ts
  • node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-worked-for-visualization.e2e.test.ts
  • pnpm build
  • pnpm ui:build: 336.4 KiB startup gzip against the 339.9 KiB limit on the current-main Node 24 tree
  • Codex autoreview: clean, no accepted/actionable findings
  • Exact-head CI: https://github.com/openclaw/openclaw/actions/runs/32392727048 — green after rerunning one unrelated process-start timing shard; both implicated files passed locally (102/102)

Visual proof:

Known proof gap: this is deterministic mocked-Gateway Chromium proof rather than a pre-merge deployment to team.openclaw.ai. The browser test deliberately pauses ResizeObserver, which is stricter than the original timing race.

The latest ClawSweeper comments are review-start placeholders and contain no published Rank-up moves: list.

@steipete
steipete merged commit 62ed43d into main Aug 20, 2026
424 of 426 checks passed
@steipete
steipete deleted the steipete/visualization-display-and-dashboard-bugs-10bea5 branch August 20, 2026 17:05
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 21, 2026
)

* fix(ui): keep ad hoc visualizations readable

* perf(ui): preserve startup bundle budget
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant