Invalidate screenshot cache on terminal resize

When terminal resizes, old screenshot content is stale until
the app (tmux etc) re-renders at new dimensions. Clear cache
to force re-capture after resize.
This commit is contained in:
GitHub Copilot
2026-01-24 11:59:23 +00:00
parent 02d941af6a
commit 5536c4ac51
+3
View File
@@ -388,6 +388,9 @@ class LocalServer:
await self._create_terminal_session(route_key, width, height)
return True
await session_process.set_terminal_size(width, height)
# Invalidate screenshot cache on resize - content needs to re-render
self._screenshot_cache.pop(route_key, None)
self._screenshot_cache_etag.pop(route_key, None)
return False
async def _handle_ping(