Skip to content

feat(production): live camera toggle + machine page 404 fix - #13

Merged
tech5-opti merged 2 commits into
mainfrom
tushar
Aug 21, 2026
Merged

feat(production): live camera toggle + machine page 404 fix#13
tech5-opti merged 2 commits into
mainfrom
tushar

Conversation

@tech5-opti

Copy link
Copy Markdown
Collaborator

The 404

Opening a machine on production rendered "This page doesn't exist" for a machine that plainly did. All three fetches shared one try/catch, so a failing queue lookup took the whole page down as if the URL were wrong — the worst kind of error message, since it sends the reader hunting a broken link instead of a broken call.

Only the machine itself is a hard dependency now. A failing queue shows its reason above an empty board, because "no queued batches" and "the queue could not be loaded" look identical otherwise.

getFleetMachineLive already swallowed its errors and returned null; the queue did not. That asymmetry was invisible from the call site and is what made this easy to miss.

The camera

A live feed, off by default — that is the design, not a default. A measured H2C frame is ~311 KB, so even 2 fps costs ~0.6 MB/s of continuous upload from a laptop on a home connection, and this is a page people mostly open to read numbers off. It also leaves the printer camera idle unless someone is looking.

  • An <img>, not a <video>: the source is multipart/x-mixed-replace, which browsers render natively in an image tag and not at all in a video one
  • It points at a route handler, not the backend: an <img> cannot send an Authorization header, and the bearer token must not travel in a URL
  • The handler forwards the client's abort signal — without it the viewer stops watching while Tensor-Core keeps pulling frames from the printer indefinitely

Requires Tensor-Core#9.

🤖 Generated with Claude Code

tech5-opti and others added 2 commits August 21, 2026 13:39
…page

Two fixes to the machine detail page.

The 404
  Opening a machine on production rendered "This page doesn't exist" for
  a machine that plainly did. All three fetches shared one try/catch, so
  a failing queue lookup - a backend without the route, a Zod mismatch, a
  slow query - took the whole page down as if the URL were wrong. That is
  the worst kind of error message: it sends the reader hunting a broken
  link instead of a broken call.

  Only the machine itself is a hard dependency now; if it cannot load,
  404 is honest. The queue failing shows its reason and an empty board,
  because "no queued batches" and "the queue could not be loaded" look
  identical otherwise. getFleetMachineLive already swallowed its errors
  and returned null - that asymmetry with the queue was invisible from
  the call site, and is what made this so easy to miss.

The camera
  A live feed, off until asked for. Default OFF is the design, not a
  default: a measured H2C frame is ~311 KB, so even 2 fps costs ~0.6 MB/s
  of continuous upload from a laptop on a home connection, and this is a
  page people mostly open to read numbers off. It also leaves the printer
  camera idle unless somebody is actually looking.

  An <img>, not a <video>: the source is multipart/x-mixed-replace, which
  browsers render natively in an image tag and not at all in a video one.
  It points at a route handler rather than the backend directly, because
  an <img> cannot send an Authorization header and the bearer token must
  not travel in a URL. That handler forwards the client's abort signal -
  without it the viewer stops watching while Tensor-Core keeps pulling
  frames from the printer indefinitely.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 17bc2d5b-8622-4179-a4a7-63c63308507a


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tensor Building Building Preview Aug 21, 2026 8:11am
tensor-9bct Building Building Preview Aug 21, 2026 8:11am

Request Review

@tech5-opti
tech5-opti merged commit 74c6736 into main Aug 21, 2026
2 of 5 checks passed
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant