Repository navigation
fix(plugin-chatbot): a reloaded answer draws a redrawn chart once, keeping the last visualize_data result per chartId - #34840
Merged
objectstack-fleet[bot] merged 2 commits intoNov 17, 2026
Conversation
Within one message, visualize_data results sharing a top-level chartId collapse to one chart: the last descriptor at the first result's text offset. Results without a chartId are read as before; nothing is merged across messages; the data-chart part path is unchanged. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzfrh8TiPJf1i2kMSoa
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzfrh8TiPJf1i2kMSoa
Contributor
Author
|
repo:objectstack#3 · os-support-ai · session_01WGufzgQsdnyS4QdR8stjDa L1 review (L1-d) · 2026-11-17T13:25ZL1: ACCEPT Read at that head: the file list (3 paths), the full diff, the PR body, card #34716 with its triage comment 6943297547, claim 6947876307 and os-dev-report 6948830939, and the 52 check-runs on Checklist
Must-fixNone. Should-fixNone. Notes
Landing: not governed, all checks green. Area o3-H lands it. |
Contributor
Author
|
repo:objectstack#3 · os-support-ai · session_01WGufzfrh8TiPJf1i2kMSoa Landing (area o3-H) · 2026-11-17T13:25Z
State change: ready + auto-merge enabled; |
objectstack-fleet
Bot
deleted the
claude/issue-34716-chart-dedupe-reload
branch
November 17, 2026 13:47
8 tasks done
This was referenced Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Yibo Wang · project thread
Fixes #34716
Clause-②: no
Metadata-protocol: none
repo:objectstack#3 · os-support-ai · session_01WGufzfrh8TiPJf1i2kMSoa
维护者速读
extractCharts的visualize_data结果路径)在同一条消息里按结果信封顶层的chartId合并:同一chartId只画一张图,用最后一次结果的图,放在第一次出现的位置。chartId的结果(旧历史、其它生产者)逐字节照旧;从不跨消息合并;data-chart部件路径(实时流)不变。回滚 = revert 本 PR。ui/packages/plugin-chatbot/src/toolResultParsers.ts(extractCharts中resultIndexByChartId一段,chartFromToolResult改为同时返回chartId);ui/packages/plugin-chatbot/src/__tests__/mapMessages.chartIdDedupe-34716.test.ts。pnpm --dir ui exec vitest run packages/plugin-chatbot/src/__tests__/mapMessages.chartIdDedupe-34716.test.ts,预期 7 passed。What changes
chartFromToolResultnow returns the chart together with the envelope's top-levelchartId(only a non-empty string counts as an id).extractCharts, on the results path only: within ONE message, a result whosechartIdwas already seen replaces that earlier chart in place (last descriptor, first result'stextOffset). A result without achartIdis pushed exactly as before. The map is local to one call, so nothing is merged across messages. Thedata-chartpart branch is unchanged (still preferred whenever the message has one).@object-ui/plugin-chatbotpatch.Tests
New file
mapMessages.chartIdDedupe-34716.test.ts(7 tests), per the card's Acceptance:chartIdtwice in one message: one chart, last descriptor, first offset;chartIds: two charts at their own offsets;chartId(same descriptor twice) give two charts at their own offsets, as today;chartIdin two messages: one chart in each;content(unanchored): the redraw collapses, no offset;data-chartparts present: parts win, every part kept, results ignored.Acceptance notes
c513d62abefore coding:extractChartspushed everyvisualize_datahit intofromResults, and nochartIdreader existed underui/packages/plugin-chatbot/src(grep -rn chartIdreturned nothing).chartIdis unrenderable (no series), it is skipped by the existing descriptor narrowing and the earlier chart stays. Noted, not pinned.Verification
All readings at head
59e6bcaa, in worktreeobjectstack-issue-34716.Package tests and typecheck
pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-chatbot/under the verify lock:Test Files 102 passed (102),Tests 1035 passed (1035), VERDICT command-exit 0.pnpm --filter @object-ui/plugin-chatbot run type-check(tsc --noEmit && tsc -p tsconfig.test.json; the test project includessrc/**/*.test.ts): VERDICT command-exit 0.Ablation (one, the collapse lookup)
node scripts/ablation-replace.mjsreplaced theresultIndexByChartId.get(chartId)lookup with a constantundefined(anchor 1 to 0, blob a5f650e0 to 8eb18380). The suite imports../mapMessagesfrom source, so no build sits between the edit and the run. Result: 3 failed, 4 passed. The three same-chartIdtests went red; CONTROL, different ids, two messages and thedata-chartpath stayed green. Restore: blob back to a5f650e0, which equals HEAD, andgit diff HEADis empty.Derived gate families (dispatch-gates --commands, 38)
All 38 derived commands ran locally with exit 0, including
pnpm --dir ui exec vitest run scripts/(171 files passed, 2 skipped).dispatch-gates --ranreconciliation: 38 derived, 38 run, 0 NOT-MEASURED (a derived zero: every entry carries an exit code).check:new-line-citations: 0 new citations. After the last commit (it changed only the test file),check:nul-bytes,check:cross-package-test-inputsandcheck:test-source-aliaswere re-run: exit 0. The type-check lanes and repo-wide families belong to CI.Generated by Claude Code