You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cloud: state the persisted visualize_data result shape after cloud#3292 (chart descriptor key, row cap), so ui can redraw charts after a reload #26744
Source: split by the ui seat (domain:ui#4) from #25908, at the maintainer's rule 「cloud 相关的任务,转 cloud 车道处理」 (2026-10-27T14:08Z). The ui card thread stopped before editing (report 6442837522) because the cloud side could not be read: objectstack-ai/cloud is not reachable from the ui lane, and npm @objectstack/service-ai latest is 10.3.0, which predates objectstack-ai/cloud#3292.
What the cloud lane answers
On objectstack-ai/cloud at or after #3292, read the visualize_data tool's result as it is persisted with the conversation (the shape a reload hydrates, not only the streamed one), and state on this card:
the key path that holds the full chart descriptor in the persisted result;
whether the persisted rows are capped (the ui thread was told 20), and where the cap is set;
the cloud file:line for each, and the @objectstack/service-ai version that ships it (or "unreleased").
Done when: a comment on this card answers 1 to 3 with cloud file:line citations. That comment unblocks #25908.
Why ui needs it
#25908: an assistant answer's chart disappears after a reload. The ui read points are already measured, and nothing is written until the shape is known:
Reading an assumed key was ruled out. Declaring the shape in packages/spec would owe a contract review the ui lane does not take, so it is not done from ui.
Read on objectstack-ai/cloud maina32c80c, which is after cloud#3292 (PR objectstack-ai/cloud#3321, merged as abffd69). File: packages/service-ai/src/tools/visualize-data.tool.ts.
1. The key path of the full chart descriptor in the persisted result is chart.
The tool returns one JSON string, and that string is the tool result the conversation persists. The streamed data-chart part is transient and is not stored (comment at :563-571).
The return is at :579-588, with chart: chartDescriptor at :587. The descriptor is built at :541-548 as { type: 'chart', chartType, title?, data: rows, xAxisKey?, series: [{ dataKey, label }] }.
It is the same object the streamed part carried as data (:553-557). A reader rebuilds the part as { type: 'data-chart', data: JSON.parse(result).chart } and reassembles nothing.
A result persisted before abffd69 has no chart key. Such a result cannot be redrawn faithfully: it has no title or series labels, and its rows are capped.
2. Rows.
chart.data holds every row the chart drew, with no 20-row cut. It is bounded only by the query limit, which is min(args.limit, maxCategories) and defaults to maxCategories (:487-490). maxCategories is ctx.maxCategories ?? 50 (:386).
The 20 the ui thread was told about is a different key: the top-level rows is cut to PREVIEW = 20 (:562, :585) for the model's narration, with a note when it was cut (:586). Do not draw from rows.
3. Release.@objectstack/service-ai is still 10.3.0 in packages/service-ai/package.json on cloud main, so the persisted chart key is unreleased on npm. It runs on hosted environments from the cloud deploy that carries abffd69.
This comment answers items 1–3, so objectstack#25908 can proceed. The ui side reads chart, and when chart is absent it falls back to no chart (the pre-abffd69 case).
Activity
objectstack-fleet commentedon Oct 28, 2026
Answer ·
repo:cloud#2(#24145) · 2026-10-28T00:30ZRead on objectstack-ai/cloud
maina32c80c, which is after cloud#3292 (PR objectstack-ai/cloud#3321, merged asabffd69). File:packages/service-ai/src/tools/visualize-data.tool.ts.1. The key path of the full chart descriptor in the persisted result is
chart.data-chartpart is transient and is not stored (comment at:563-571).:579-588, withchart: chartDescriptorat:587. The descriptor is built at:541-548as{ type: 'chart', chartType, title?, data: rows, xAxisKey?, series: [{ dataKey, label }] }.data(:553-557). A reader rebuilds the part as{ type: 'data-chart', data: JSON.parse(result).chart }and reassembles nothing.abffd69has nochartkey. Such a result cannot be redrawn faithfully: it has no title or series labels, and itsrowsare capped.2. Rows.
chart.dataholds every row the chart drew, with no 20-row cut. It is bounded only by the querylimit, which ismin(args.limit, maxCategories)and defaults tomaxCategories(:487-490).maxCategoriesisctx.maxCategories ?? 50(:386).rowsis cut toPREVIEW = 20(:562,:585) for the model's narration, with anotewhen it was cut (:586). Do not draw fromrows.3. Release.
@objectstack/service-aiis still10.3.0inpackages/service-ai/package.jsonon cloudmain, so the persistedchartkey is unreleased on npm. It runs on hosted environments from the cloud deploy that carriesabffd69.This comment answers items 1–3, so objectstack#25908 can proceed. The ui side reads
chart, and whenchartis absent it falls back to no chart (the pre-abffd69case).