Commit 547aecd
committed
fix(remote-connect): refuse rollback mid-turn and refresh right after it lands
Two problems in the mobile rollback flow, both about the window between the
host mutation landing and the phone finding out.
`begin_session_maintenance` takes its permit by clearing the pending queue,
cancelling background subagents and cancelling the active turn, so a rollback
requested while the desktop is working silently destroys that work. The
desktop refuses instead: `assertSessionIdleForHistoryMutation` requires an
idle session and an empty queue. Match it — disable both menu entries and the
confirm button while a turn is active, guard the handler, and say why.
The transcript also stayed stale on the failure path. `nudge()` ran only after
the whole operation succeeded, so a rollback that landed followed by a failed
send left the retired turns on screen until the next idle poll, which is ten
seconds out. Nudge as soon as the rollback returns, before the send can fail.
Also:
- `.chat-msg__menu-sheet` had no height bound, so the edit sheet's autofocused
textarea could raise the keyboard and push the confirm button out of an
unscrollable sheet. Add `max-height: 85dvh` and `overflow-y: auto`.
- Edit mode reported `rollbackDone` ("Rolled back") after it had also sent the
new turn. Give it its own string.1 parent 6d8af96 commit 547aecd
3 files changed
Lines changed: 46 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| 179 | + | |
| 180 | + | |
179 | 181 | | |
180 | 182 | | |
181 | 183 | | |
| |||
378 | 380 | | |
379 | 381 | | |
380 | 382 | | |
| 383 | + | |
| 384 | + | |
381 | 385 | | |
382 | 386 | | |
383 | 387 | | |
| |||
580 | 584 | | |
581 | 585 | | |
582 | 586 | | |
| 587 | + | |
| 588 | + | |
583 | 589 | | |
584 | 590 | | |
585 | 591 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2663 | 2663 | | |
2664 | 2664 | | |
2665 | 2665 | | |
| 2666 | + | |
| 2667 | + | |
| 2668 | + | |
| 2669 | + | |
2666 | 2670 | | |
2667 | 2671 | | |
2668 | 2672 | | |
| |||
2675 | 2679 | | |
2676 | 2680 | | |
2677 | 2681 | | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
2678 | 2686 | | |
2679 | 2687 | | |
2680 | 2688 | | |
| |||
2704 | 2712 | | |
2705 | 2713 | | |
2706 | 2714 | | |
2707 | | - | |
2708 | | - | |
2709 | | - | |
| 2715 | + | |
| 2716 | + | |
| 2717 | + | |
| 2718 | + | |
| 2719 | + | |
2710 | 2720 | | |
2711 | 2721 | | |
2712 | 2722 | | |
| |||
2720 | 2730 | | |
2721 | 2731 | | |
2722 | 2732 | | |
| 2733 | + | |
2723 | 2734 | | |
2724 | 2735 | | |
2725 | 2736 | | |
| |||
3433 | 3444 | | |
3434 | 3445 | | |
3435 | 3446 | | |
3436 | | - | |
| 3447 | + | |
| 3448 | + | |
| 3449 | + | |
| 3450 | + | |
| 3451 | + | |
3437 | 3452 | | |
3438 | 3453 | | |
3439 | 3454 | | |
3440 | 3455 | | |
3441 | 3456 | | |
3442 | 3457 | | |
3443 | | - | |
| 3458 | + | |
| 3459 | + | |
| 3460 | + | |
| 3461 | + | |
| 3462 | + | |
3444 | 3463 | | |
3445 | 3464 | | |
3446 | 3465 | | |
3447 | 3466 | | |
3448 | 3467 | | |
3449 | 3468 | | |
| 3469 | + | |
| 3470 | + | |
| 3471 | + | |
3450 | 3472 | | |
3451 | 3473 | | |
3452 | 3474 | | |
| |||
3493 | 3515 | | |
3494 | 3516 | | |
3495 | 3517 | | |
| 3518 | + | |
| 3519 | + | |
| 3520 | + | |
3496 | 3521 | | |
3497 | 3522 | | |
3498 | 3523 | | |
3499 | 3524 | | |
3500 | 3525 | | |
3501 | | - | |
| 3526 | + | |
3502 | 3527 | | |
3503 | 3528 | | |
3504 | 3529 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
| 367 | + | |
| 368 | + | |
367 | 369 | | |
368 | 370 | | |
369 | 371 | | |
| |||
430 | 432 | | |
431 | 433 | | |
432 | 434 | | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
433 | 442 | | |
434 | 443 | | |
435 | 444 | | |
| |||
0 commit comments