From fe00c1d25549333815d279df397b0e5723618c76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl-Gerhard=20Lindesv=C3=A4rd?= Date: Fri, 4 Sep 2026 08:02:46 +0000 Subject: [PATCH] fix(chat): let users save a chart the AI generated to a dashboard The Save button on chat chart cards has never rendered. It sat inside a `value.dashboard_url &&` block along with the "Open in dashboard" link, but every tool that produces a saveable ad-hoc chart returns through runReportFromConfig, whose shape has no dashboard_url. The one tool that does set dashboard_url, get_report_data, returns no report config and bails at the earlier guard. So the button was unreachable for every tool that exists. The two controls answer different questions, so gate them separately: the link needs a URL to point at, and Save only needs a chart that isn't already a saved report. Also pass the AI-generated title into the modal. Tools return it at the top level of the result rather than inside the report object, so the modal's name field was pre-filling blank. Reported by a user who asked for chat charts he could put on a dashboard. --- .../chat/tool-results/chat-report-result.tsx | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/apps/start/src/components/chat/tool-results/chat-report-result.tsx b/apps/start/src/components/chat/tool-results/chat-report-result.tsx index 8d119f70e..10673fc74 100644 --- a/apps/start/src/components/chat/tool-results/chat-report-result.tsx +++ b/apps/start/src/components/chat/tool-results/chat-report-result.tsx @@ -83,24 +83,29 @@ function ChatReportInner({ }} /> - {value.dashboard_url && ( + {(value.dashboard_url || !report.id) && (
- - Open in dashboard → - + {value.dashboard_url && ( + + Open in dashboard → + + )} {!report.id && (