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
Reopening a preview should reuse its existing Hydrogen tab
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.
Reopening an existing preview can create another Hydrogen tab instead of reusing the original one. During the September 11, 2026 PCB review, repeated open/start operations accumulated tabs for the same preview.
Source confirmation: src/cli/open.rs and src/cli/start.rs::open_webview_tab call hydrogen workspace add-tab without first resolving an existing tab for the server/project. Depending on Hydrogen's duplicate-name behavior this creates duplicates or returns a duplicate-name error; neither provides a reliable reopen operation.
Reproduce with a disposable preview: open its tab, then invoke the same open operation again for the same server and tab name. Expect the existing tab to be reused/navigated as needed. A separate explicit option can request an additional view.
Expected: make reopen idempotent based on the preview's server/project identity, preserve pane placement and foreground preferences, and report the existing tab ID. Tests should mock workspace discovery and assert that a repeated open does not call add-tab again. Keep distinct boards on different ports independent.
The current workaround is to keep the existing tab and refresh through the CLI. No local board screenshots are attached. This needs a Hydrogen integration check as well as CLI tests.
0 Replies
Log in to reply.