Skip to content

feat(computers): skip downloading a screen frame the view already shows - #494

Merged
edenreich merged 1 commit into
mainfrom
feat/skip-unchanged-frames
Nov 10, 2026
Merged

edenreich merged 1 commit into
mainfrom
feat/skip-unchanged-frames

Conversation

@edenreich

@edenreich edenreich commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Every screen poll downloaded the whole frame, even when the computer's screen had not changed. The Computers grid polls each tile every 2 seconds and a driven screen every 300 ms, so most of that was the same picture again. Each poll now names the frame the view already shows, and a computer whose screen is still that frame answers "unchanged" instead of the image.

It needs a computer whose CLI has inference-gateway/cli#1797. An older one ignores the extra field and sends the full frame as before.

Changes

  • backend/src/workspaces.rs - screen_frame takes have, the id of the frame on display, and adds it to the read_frame request. Screen carries the frame's id, and an unchanged reply answers None, the same as "no new screen".
  • frontend/components/ComputersView.tsx - useScreen remembers the id of the frame it shows and sends it with the next poll. A poll that answers nothing keeps the picture.
  • frontend/lib/tauri.ts - Screen gains id and screenFrame takes have.

Testing

  • The frontend build, clippy and the backend tests pass, with new assertions for the request carrying have and for the unchanged reply. The take-over e2e test passes.
  • Not tried against a real computer. No released CLI answers unchanged yet, so the saving has not been observed end to end.

Affected repos: desktop only. Docs follow-up: inference-gateway/docs#1179.

@edenreich
edenreich marked this pull request as ready for review November 10, 2026 00:53
@edenreich
edenreich merged commit dbc1ace into main Nov 10, 2026
1 check passed
@edenreich
edenreich deleted the feat/skip-unchanged-frames branch November 10, 2026 00:53
@inference-gateway-maintainer

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.65.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@inference-gateway-maintainer inference-gateway-maintainer Bot added the released Shipped in a release label Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant