Commit c58b6d9
committed
fix(plugin-terminals): reattach to existing session on refresh instead of spawning
A reload was always starting a new shell: the sessions shared state
resolves with its empty initial value and backfills the server's sessions
asynchronously, so the autostart check always saw an empty list.
Decide autostart from the authoritative `list` RPC and seed the initial
render from it, so a refresh restores the persisted sessions (reselecting
the URL-hashed one) and only spawns a shell when none exist.1 parent 5ceb97f commit c58b6d9
1 file changed
Lines changed: 18 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
539 | | - | |
540 | | - | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
541 | 557 | | |
542 | 558 | | |
543 | 559 | | |
| |||
0 commit comments