Skip to content

Commit ea05761

Browse files
author
i2cjak
committed
Bring the viewer lane's uncommitted work onto main
Only the viewer part of the old worktree's uncommitted state (snapshot d59a95f6a): viewer tools, viewer RPC, model framing, reflow web client, reference-audit and copper docs, build-viewer.sh and the viewer tests; in shared files only their viewer hunks (the /viewer-asset route beside main's /plot/info, plot revision notices and the stable-stamp read on top of main's locked read, the component and render-asset review jobs, the 3D workbench keeping main's probe chip and split view, viewer styles, build and CLI wiring). Other lanes' work in that tree (allowance, older lazy history and conversation code, LIMIT-era thin-view changes) is left out. main's newer 8-field Src patterns now carry the lane's revision field, and component metadata passes an empty net map to the five-argument SC.Sch.symbol.
1 parent b5fc932 commit ea05761

40 files changed

Lines changed: 1881 additions & 69 deletions

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ jobs:
152152
BACKPLANE_LICENSES_STRICT=1 scripts/js-licenses.sh dist-js/licenses
153153
# the web client the hub serves (test/smoke.ts loads its page)
154154
- name: Web client
155-
run: bend src/web/index.html -o build/web > /dev/null
155+
run: |
156+
bend src/web/index.html -o build/web > /dev/null
157+
sh scripts/build-viewer.sh build/web/viewer/vendor
156158
- run: scripts/js-smoke.sh dist-js/linux-x64/backplane-serve build/web
157159
# the compiled hub's 4 GiB stack (scripts/js-stack-prelude.js), its
158160
# children back at 8 MiB

‎docs/viewer-loading.md‎

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,13 @@ renderer modules, stub localized strings, and read-only model bytes on loopback.
6565
It runs headless Chromium 156 with SwiftShader, at 1000×700 and touch 390×844 with
6666
reduced motion. No installed app, hub, live data or CAD document is changed.
6767

68-
The real saved board GLB contains 95 component meshes: 77,216 triangles produce
68+
The real cached board GLB contains 95 component meshes: 77,216 triangles produce
6969
833,452 wire bytes. A real C5 ceramic capacitor selected from that scene has 284
7070
triangles and 3,124 wire bytes. GLB SHA-256:
7171
`702b15010a2622d580f5d6c139ceb74465a7a5d1b268f3fdacc2bec9e2c91d40`.
72+
Its originating saved board and exact source revision were not independently
73+
established for these fixture measurements. These captures do not prove that
74+
this cached asset represents the current canonical SMU board.
7275
The rendering child's test-only `solid_glb_fixture.mjs` adapter takes 105 ms for
7376
the full board and 5.3 ms for C5. Those times are fixture preparation, not a
7477
measurement of the hub's Bend GLB parser or CAD export.
@@ -93,6 +96,48 @@ fetch plus GPU-visible board geometry was 213.4/49.1 ms. These are browser-stage
9396
measurements, not cold file-to-screen promises. Remote transfer, cold CAD export,
9497
and the hub's parse/wire generation are not measured here.
9598

99+
Normal saved-source viewer, V5
100+
----------------------------
101+
102+
The isolated production hub/web V5 focused gate passed on the actual RTX5080.
103+
The unchanged service and all eleven candidate artifacts, 392 source inputs,
104+
and five canonical CAD file hashes/revisions were checked before and after.
105+
Receipt: `build/viewer/qualification-v5/pane-loading-hardware/receipt.json`,
106+
SHA256 `adc929e5e65a232866f7b93fdd48c86530816fd67dd9cfde4e201c0f4aa1e546`.
107+
108+
The export was explicitly prewarmed for 1,741.18 ms before creating a new browser
109+
context; that work is excluded from the following main-clock observation:
110+
111+
| Milestone | Milliseconds after the 3D click |
112+
|---|---:|
113+
| Matching saved PCB revision | 958.5 |
114+
| Original asset preparation request | 958.9 |
115+
| Asset preparation reply | 1,290.3 |
116+
| Independent assembly revision | 1,666.7 |
117+
| Render-worker load | 1,759.9 |
118+
| Exact asset network body complete | 1,768.3 |
119+
| First verified original-model GPU frame | 2,063.8 |
120+
121+
The PCB revision starts only authenticated asset preparation, for the same path
122+
and project. Loading and display still require independent assembly revision
123+
confirmation. The measured preparation request preceded that confirmation by
124+
707.8 ms; its reply preceded confirmation by 376.4 ms. This observation is not
125+
an instant-loading claim or a causal speedup benchmark against separate runs.
126+
The 1,666.7 ms revision wait remains. Worker initialization took 91.4 ms,
127+
including a directly measured 49.3 ms vendor fetch. The exact URL/digest-matched
128+
worker resource `responseEnd` is network completion, not a parsing/hash-check
129+
milestone; its interval to GPU visibility was 295.5 ms. Intermediate parsing
130+
status can be throttled and is optional timing evidence.
131+
132+
The gate also deliberately scrolled the pane before Frame part at desktop,
133+
narrow and touch widths. Both actual canvas rectangles returned fully inside
134+
their own pane, with no document/window scroll. A real t1→t2→t1 switch while
135+
t2's asset request was outstanding restored the original same-revision Studio
136+
frame, UUID, camera and matrix, terminated the disposed worker, and did not leave
137+
the UI busy. This qualifies UI ownership/cancellation, not cancellation of an
138+
already-running backend export. Failed earlier test-only timing/navigation runs
139+
remain separate evidence. No installed/native app was changed.
140+
96141
The actual browser checks also verify keyboard orbit, two-pointer pan/pinch,
97142
camera/projection/exposure restoration across canvas teardown, identical cached
98143
model reuse, and zero repaints at rest in both motion modes. The renderer's own

‎docs/viewer-outer-copper-recipe.md‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Full outer-copper export recipe
2+
3+
Full original-model exports now include the saved outer tracks, zones and via body holes. Compact exports retain their existing pads/mask/silk recipe, cache identity and native plot overlay behavior. The existing `full` Boolean selects the recipe; no new RPC/CLI/schema parameter is introduced.
4+
5+
`Pv.glb.flags(bare, full, out, path)` retains the original base arguments. Only full=True adds `--include-tracks --include-zones --cut-vias-in-body`. Bare/parts still selects `--no-components`/`--subst-models`. No inner copper, material override, coordinate offset, via filling or shape fusion is added. The selected bp.4 CLI help confirms all three options. RenderAsset already requests full=True; compact kind2 remains False and kind4 remains True.
6+
7+
The existing `Pv.board.out(path,bare)` and its parts3/bare3 exact-revision filenames are unchanged. `Pv.board.out.recipe(path,bare,False)` calls that original function. Full=True uses:
8+
9+
```text
10+
board-full-outer-v1-parts-<path-hash>.<exact-source-stamp>.glb
11+
board-full-outer-v1-bare-<path-hash>.<exact-source-stamp>.glb
12+
```
13+
14+
The recipe and parts/bare mode are explicit filename namespaces. Old pads-only GLBs cannot satisfy a full request. The existing `Pv.cache.revision` places the exact source stamp in the filename without hashing it; same-size writes within an mtime second remain distinct. Future changes to the full recipe must bump its version. `Pv.solid.out` passes the existing full flag only for board exports; raw GLB and STEP paths remain unchanged. Referenced model dependencies remain outside the main-board revision stamp, as before.
15+
16+
Existing success-only staging promotion is unchanged: nonzero export status never renames `.part.glb`; successful status must also complete the rename. Missing staging files or rename errors remain failures and preserve a previously published file. Private immutable-asset authorization, source/revision checks and content proof are unchanged by this delta.
17+
18+
The focused probe imports the actual server functions:
19+
20+
```sh
21+
bend test/native/viewer_copper_probe.bend -o /tmp/viewer-copper-probe.js
22+
bun test/tools/viewer_copper_recipe_test.mjs /tmp/viewer-copper-probe.js
23+
```
24+
25+
It exercises compact/full parts/bare flags and cache paths, equal-size/same-mtime-second saves, GLB/STEP behavior, an existing compact cache that cannot satisfy full detail, failed-export staging, successful promotion, missing-stage failure and a nonempty-target rename error. Optional explicit `COPPER_BOARD`, `COPPER_KICAD_CLI` and `COPPER_RECEIPT` run the selected CLI using the probe's actual production flags and paths against read-only saved CAD; all outputs/cache are temporary.
26+
27+
The actual SMU paired export preserves PCB SHA256 `d2f84cd9ce0661d2835a64339d9b1b6ec992111ee778b2c4564bc30ee037733a` and schematic SHA256 `278c206f54faff1c95a6d5aa51b7fb01d777486a173b1b8138d4575302d07105`, with exact filesystem stamps unchanged after each export. Compact has76,939triangles/89,781POSITION and NORMAL vertices; full has311,551triangles/351,351POSITION and NORMAL vertices. Full adds `smu_card_copper` and `smu_card_via`; every one of94 existing component/pad/mask/silk mesh attribute/index SHA256 hashes is identical. The substrate changes because via bodies are cut. All245 source via centres are blocked by the compact substrate top and open in the full substrate. The test also checks their full-export bottom openings. No textures or physical manufacturing-joint geometry are synthesized.
28+
29+
The first production-probe pair took about1.44s compact/4.21s full in this environment, at3.707/18.133MB; serialized metadata/filenames cause small byte-size differences from earlier `/tmp` exports with identical geometry. These are one-run export measurements, not startup or frame-rate guarantees. Full detail contains22,357 primitive meshes before batching and exceeds the earlier illustrative-solder global geometry budgets. Renderer batching, source identity preservation and interactive performance are separate owner qualification. This exporter delta must not be described as making a dense original model instant.
30+
31+
Handoff uses a minimal patch against root plot SHA256 `1a519d0e8cd2a47356116998ccc9ab73e81430e443d4f9f659810283b0ec802b`. The private snapshot commit of that root blob is not an integration change. The feature diff changes only the board flags/cache-selection functions; unrelated authorized source/revision/promotion work is preserved. No installed app, CAD, common server/RPC/CLI files, broad app build or global proof was changed/run for this feature.

0 commit comments

Comments
 (0)