Commit a80d96c
committed
fix(copilot): pin a restored table view so a stale views list cannot strand it
Reopening a chat hands the embedded table its saved view through
`initialViewId`, which the table honours only while its views query already
lists that id. A cached list from before the agent created the view resolves
it to nothing, so adoption settles on the default and stamps itself closed —
nothing revisits the id when the refetch lands, and the restored view is lost
until the tab is reopened.
Pin on mount as well as on later changes, so the handoff waits for the list
that carries the view. When adoption already applied the same view the table
consumes the pin without touching the URL, and a table opened with no saved
view still pins nothing.
This also makes a first mount agree with a tab switch, which already re-pins
the saved view through the same path.1 parent fdbc7a7 commit a80d96c
2 files changed
Lines changed: 23 additions & 5 deletions
File tree
- apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
54 | 69 | | |
55 | 70 | | |
56 | 71 | | |
| |||
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
183 | | - | |
184 | | - | |
| 182 | + | |
185 | 183 | | |
186 | 184 | | |
187 | 185 | | |
| |||
192 | 190 | | |
193 | 191 | | |
194 | 192 | | |
195 | | - | |
196 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
197 | 200 | | |
198 | 201 | | |
199 | 202 | | |
| |||
0 commit comments