Commit dd508e3
fix(daemon): refit the shared grid when a client disconnects
The primary client sizes the session, but nothing recomputed that when a
client went away — so killing the primary terminal left the survivor
being rendered at the dead client's size, showing a clipped screen until
it happened to send a resize of its own. Found by driving a real session
through connect/disconnect orderings with two terminals and two browsers
attached at once.
Flag a disconnect like any other resize so the main loop recomputes the
fit and repaints. When the fit turns out unchanged the recompute is a
no-op and the remaining clients just get a fresh frame.
The shared-session test now covers it: a second terminal must not resize
the session, and dropping the primary must hand the fit to the survivor.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TjGX8SFLLvHLESAw2NDBUs1 parent 612cf6b commit dd508e3
2 files changed
Lines changed: 35 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1411 | 1411 | | |
1412 | 1412 | | |
1413 | 1413 | | |
1414 | | - | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
1415 | 1425 | | |
1416 | 1426 | | |
1417 | 1427 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1808 | 1808 | | |
1809 | 1809 | | |
1810 | 1810 | | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
1811 | 1835 | | |
1812 | 1836 | | |
1813 | 1837 | | |
| |||
0 commit comments