Commit 81e0abf
fix(desktop): adopt the remembered tab without claiming the user's selection
Review round on the reopen fix.
A late first report of the desktop app's active tab carries the tab it
remembers, not a switch the user made, so it is adopted rather than
claimed and agent activity can still take the view on chat open. A move
away from a tab the desktop was already showing stays the user's own.
Adoption now waits for the chat history to be applied, so the arrival
order of the tab list and the history no longer decides which resource a
chat opens on, and it skips a tab the strip has already dropped, so
closing the shown tab cannot write the closed id back. Closing the shown
tab selects its neighbour the way the desktop app picks the next native
tab, instead of flashing through the strip's last tab.
The two wrapper hooks now share one options type with the strip, and the
adopt rule lives in a single helper.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0139YonWmiZUnPMTHoH4PtAJ1 parent c84a151 commit 81e0abf
7 files changed
Lines changed: 202 additions & 150 deletions
File tree
- apps/sim/app/workspace/[workspaceId]/home
- components/mothership-view/components/resource-tabs
- hooks
Lines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
411 | | - | |
| 411 | + | |
| 412 | + | |
412 | 413 | | |
413 | 414 | | |
414 | 415 | | |
415 | 416 | | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
416 | 424 | | |
417 | 425 | | |
418 | 426 | | |
| |||
451 | 459 | | |
452 | 460 | | |
453 | 461 | | |
454 | | - | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
455 | 472 | | |
456 | 473 | | |
457 | 474 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
338 | 344 | | |
339 | 345 | | |
340 | 346 | | |
341 | 347 | | |
342 | 348 | | |
343 | 349 | | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
| 350 | + | |
| 351 | + | |
358 | 352 | | |
359 | 353 | | |
360 | 354 | | |
| |||
Lines changed: 85 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 40 | + | |
51 | 41 | | |
52 | 42 | | |
53 | 43 | | |
| |||
69 | 59 | | |
70 | 60 | | |
71 | 61 | | |
| 62 | + | |
72 | 63 | | |
73 | 64 | | |
74 | 65 | | |
| |||
206 | 197 | | |
207 | 198 | | |
208 | 199 | | |
209 | | - | |
210 | 200 | | |
211 | 201 | | |
212 | 202 | | |
| |||
229 | 219 | | |
230 | 220 | | |
231 | 221 | | |
232 | | - | |
233 | | - | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
234 | 293 | | |
| 294 | + | |
235 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
236 | 302 | | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
| 303 | + | |
| 304 | + | |
242 | 305 | | |
243 | | - | |
| 306 | + | |
244 | 307 | | |
245 | | - | |
| 308 | + | |
| 309 | + | |
246 | 310 | | |
247 | 311 | | |
248 | 312 | | |
| |||
Lines changed: 4 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | | - | |
| 9 | + | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | 18 | | |
28 | 19 | | |
29 | 20 | | |
| |||
32 | 23 | | |
33 | 24 | | |
34 | 25 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 26 | + | |
| 27 | + | |
46 | 28 | | |
47 | 29 | | |
48 | 30 | | |
| |||
67 | 49 | | |
68 | 50 | | |
69 | 51 | | |
| 52 | + | |
70 | 53 | | |
71 | | - | |
72 | 54 | | |
73 | 55 | | |
74 | 56 | | |
75 | 57 | | |
76 | 58 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | 59 | | |
86 | 60 | | |
87 | 61 | | |
| |||
0 commit comments