#175 — Preventing losing chat history on cloning widget
Repo: Twill-AI/twill-ai-ui State: closed | Status: done Assignee: Unassigned
Created: 2024-12-16 · Updated: 2025-03-24
Description
Update how tickets are cloned into a dashboard so that the history of the widget is not lost during the process.
To to this, the payload of the PATCH /dashboards/{id} endpoint has changed as follows:
...
widgets: null | [ // The whole layout here or null to don't edit.
{
clone_widget_id: int, // Widget to clone into dashboard or ID of widget already owned by dashboard.
dashboard_position: str, // String representation of size/coordinates/etc.
updates_widget_id: int | null // If provided it contains ID of widget which we are replacing with `clone_widget_id`.
},
...
],
Basically, the new updates_widget_id field represents the dashboard widget which we want to replace with the cloned widget.
Steps to reproduce
- Create a plot and add it to a dashboard
- Click on the plot title on the dashboard to get to the widget chat page
- Start a conversation and ask for a modification of the plot (for example turn it into a bar chart if it is a line chart)
- Save the changes and go back to the dashboard
- Open de widget again
AC:
- After cloning a widget into a dashboard, the new dashboard widget has the source widget’s chat history.
Notes
Add implementation notes, blockers, and context here
Related
Add wikilinks to related people, meetings, or other tickets