Adom TSCI - Tscircuit Board Viewer
Public Made by Adomby adom
Interactive tscircuit preview in a Hydrogen webview — first-class 3D / PCB / Schematic tabs, Components & Nets HUDs, an auto-glow x-ray view, Inspect, Measure, a Walkthrough Demo, and a one-click `exp
Back-to-back camera commands overwrite pending operations
Versions: adom-tsci 1.4.24; adom-wiki 1.7.41. Environment: Linux/WSL2, Hydrogen build e05f6eaa0b5de467bfbe76c20f4641390a5a4069.
Related work: adom-inc/adom-tsci PR #2 implements wiki issues #2–#4. This issue is not implemented by that PR and remains a separate follow-up. Check that branch before changing shared viewer/server code; do not duplicate its startup-view, SVG-refresh, or artifact-review work.
Back-to-back CLI camera operations can lose the first command. The viewer polls every 500 ms, but the server stores only one pending camera_command: Mutex<Option<Value>>. Each POST replaces the previous pending value; GET /api/camera-command takes only the latest.
Reproduce: with an initialized viewer, run adom-tsci view top --port <port> followed immediately by adom-tsci camera --radius 1.1 --port <port>, before the next poll. The second request can overwrite the first, leaving the old angle. Both commands report acceptance; no error explains the lost action. Separating operations long enough for a poll currently works around it.
This was observed during a September 11, 2026 PCB review and is confirmed by the source in src/server/mod.rs. For a deterministic regression, POST both commands before GET /api/camera-command and assert that both can be consumed in order.
Expected: queue accepted commands in order, or support an atomic view-plus-camera operation with an applied acknowledgment. Callers should not need arbitrary sleeps. This is separate from the startup-view preset request adom/adom-tsci#2. No local board artifacts are attached.
0 Replies
Log in to reply.