feat(production): live camera toggle + machine page 404 fix - #13
Conversation
…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>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 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. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|



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.
getFleetMachineLivealready swallowed its errors and returnednull; 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.
<img>, not a<video>: the source ismultipart/x-mixed-replace, which browsers render natively in an image tag and not at all in a video one<img>cannot send anAuthorizationheader, and the bearer token must not travel in a URLRequires Tensor-Core#9.
🤖 Generated with Claude Code