Commit 081b5cf
fix(copilot): hold a reorder for pending deletes too
The reorder gate landed one case short: a delete that has not reached the
server leaves the server holding a resource the client's order omits, so the
order fails its identity check exactly as an unlanded add does. Gating only
on unpersisted adds let that order fire and be discarded as unsatisfiable,
losing the tab order until the next reorder or hydration.
Name the predicate for what it actually decides — whether a pending write
changes WHICH resources the chat holds — and cover both directions. A failing
update to an already-stored resource still does not park the order, which is
what the gate was narrowed for.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FwmaLmAXSK2hsPBGZmkPnT1 parent 390e1b3 commit 081b5cf
3 files changed
Lines changed: 37 additions & 13 deletions
File tree
- apps/sim
- app/workspace/[workspaceId]/home/hooks
- lib/copilot/resources
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1707 | 1707 | | |
1708 | 1708 | | |
1709 | 1709 | | |
1710 | | - | |
| 1710 | + | |
1711 | 1711 | | |
1712 | 1712 | | |
1713 | 1713 | | |
| |||
Lines changed: 25 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
223 | 243 | | |
224 | 244 | | |
225 | 245 | | |
| |||
228 | 248 | | |
229 | 249 | | |
230 | 250 | | |
231 | | - | |
| 251 | + | |
232 | 252 | | |
233 | 253 | | |
234 | 254 | | |
235 | 255 | | |
236 | 256 | | |
237 | 257 | | |
238 | | - | |
| 258 | + | |
239 | 259 | | |
240 | 260 | | |
241 | | - | |
| 261 | + | |
242 | 262 | | |
243 | 263 | | |
244 | 264 | | |
| |||
250 | 270 | | |
251 | 271 | | |
252 | 272 | | |
253 | | - | |
| 273 | + | |
254 | 274 | | |
255 | 275 | | |
256 | 276 | | |
| |||
Lines changed: 11 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
| 121 | + | |
121 | 122 | | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
126 | 128 | | |
127 | | - | |
128 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
129 | 133 | | |
130 | 134 | | |
131 | 135 | | |
| |||
0 commit comments