Commit 1cc9019
committed
fix: skip idle terminal.onEvent subscription and release pruned terminal buffers
- connection.ts: Only subscribe to client.terminal.onEvent when
applyTerminalEvent handler is provided. No production caller passes
this handler, so the subscription was a no-op wasting WebSocket traffic.
- terminalSessionState.ts: Reset buffer atoms to EMPTY_TERMINAL_BUFFER_STATE
when metadata snapshot pruning removes terminals no longer reported by
the server. Releases up to 512KB of retained string data per pruned
terminal session on long-running clients.1 parent 4db082a commit 1cc9019
2 files changed
Lines changed: 11 additions & 5 deletions
File tree
- apps/web/src/environments/runtime
- packages/client-runtime/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
151 | 153 | | |
152 | 154 | | |
153 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
405 | 409 | | |
406 | 410 | | |
407 | 411 | | |
| |||
0 commit comments