Repository navigation
Quality views: first screen back under budget on the Linux build - #610
Merged
neuromechanist merged 4 commits intoNov 26, 2026
Merged
neuromechanist merged 4 commits into
neuromechanist merged 4 commits into
Conversation
nemar.sensor-labels.v1's refusal sentences were in render/words.ts, so every panel first screen carried them. They now load with the scalp-map renderer only when a map placed by name was refused (mapSentences); montage_unavailable's sentence, shown when a lazy load fails, stays eager in its own one-copy module. Tested: quality-views render and sensor-labels tests.
The half of placeSensors that runs nemar.sensor-labels.v1 (W2b) sat in model.ts, on every panel first screen. It moves to place-by-name.ts, loaded with the algorithm only for a map placed by name, step for step as before. Tested: quality-views models, presets, render and sensor-labels tests.
Deploying nemar-website with
|
| Latest commit: |
ebaa899
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f848f55b.nemar-website.pages.dev |
| Branch Preview URL: | https://fix-608-first-screen-size.nemar-website.pages.dev |
Contributor
Author
|
CI run 45872321787 on 15c3937, These match the local measurements in the description byte for byte (every chunk name and hash CI prints is the local build's). Agentic AI tools were used. The author assumes full responsibility for this content. |
place-by-name.ts now loads sensor-labels-copy for a refusal through model.ts's loaded guard, so a copy that cannot be fetched leaves the maps montage_unavailable (with its reload hint) instead of a bare word, and mapSentences reads it from the module cache. sensor-labels-copy no longer re-exports montage_unavailable, so its chunk depends on none and the first screen keeps 18 files. Comments and the AGENTS.md file map name the new modules. Tested: bun run test, typecheck, lint, perf.
Browser checks on the spectrum's maps placed by name: drawn when placed, the sensor-labels sentence when refused, and montage_unavailable when place-by-name or sensor-labels-copy is aborted, the view still drawn. Each abort case fails with its guard removed. Tested: quality-panel and draw-parity specs, 41 passed.
3 tasks done
neuromechanist
merged commit Nov 26, 2026
d9066b4
into
feature/issue-586-epic-pipeline-progress
3 of 4 checks passed
13 of 15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the Critical seam finding on #608: the
Quality-view bundle sizesstep failed on CI run 45867980133 (head c441d5d) with both no-preload first screens at 30.0 KB against the 30.0 KB budget.No budget, gate expectation or first-screen definition is changed here; the gate's lookup is fixed separately in #611.
Root cause
Two things, one hiding the other.
siteUnionsfinds the panel's chunk by the sentence "Loading the recording's quality views".Since W9 (W9: admin run quality drill-down (#588) #598) that sentence is also in the admin drill-down's chunk (
pipeline-quality-labels.ts,loading), and[...files.keys()].find(...)returns whichever filereaddirSynclists first.That order is the file system's: APFS and ext4 list
dist/_astro/differently, and every content hash moves it.The build itself is byte-identical on both (every chunk name and hash CI prints is in the local macOS build).
So the 15/17 versus 16/18 file counts are not a different split: one machine measured
admin-drill.*.js, the otherpanel.*.js.At Quality views: one shared drawView #602 CI was green at 29.1 KB on the admin chunk while the real panel's no-preload screen was already 29.3 KB; on c441d5d CI measured the panel; on this PR's second CI run it measured the admin chunk again.
Quality views: size gate finds each measured chunk exactly once #611 makes the gate find the panel by its name and its sentence, exactly one chunk.
the nine
nemar.sensor-labels.v1refusal sentences (sensor-labels-copy.ts, imported byrender/words.ts),and the half of
placeSensorsinmodel.tsthat calls the algorithm and places the matched electrodes.Both are needed only for a scalp map placed by name.
What moved
placeSensorsis a lazy chunk,place-by-name.ts, imported wheremodel.tsused to import./sensor-labels(it imports the algorithm statically), step for step, through the sameloadedguard.render/words.tsno longer importssensor-labels-copy.ts.For a refusal,
place-by-name.tsloads the copy through the sameloadedguard, so a copy that cannot be fetched (offline, redeployed) leaves the mapsmontage_unavailable, whose sentence says to reload, never a bare word.The renderer's
mapSentences(word)then reads the copy from the module cache and passes it torenderSensorFieldand the text rows.montage_unavailable's word and sentence, shown when a lazy load fails, cannot be lazy: their one copy ismontage-unavailable-copy.ts(eager, read byrender/words.tsand the viewer); the copy module imports nothing at run time, so its chunk depends on no other.panel-words.ts(a lazy chunk) imports the copy, so a skip reason that is a sensor-labels word reads as before; that chunk loads the copy whenever the panel has something to say, never with a first screen.What a visitor sees is unchanged when every chunk loads.
A map placed by name loads
place-by-name(about 1 KB) besidesensor-labels, and a refused one the copy (about 1 KB) under the same guard.Sizes
The real panel's unions, gzipped together, exact bytes on the local build (byte-identical to CI's; budget 30720 B):
What the gate printed on CI:
Tested
bun run test(271 files, 8880 tests): the one-copy test, and a render test that a map placed by name and refused shows the sensor-labels sentence in its note, each map and each text row (it fails with the sentences not loaded)e2e/quality-panel.spec.ts, "the spectrum's maps placed by name" (the spectrum's layout dropped, its sensors named by the header, the bytes and digests recomputed): drawn when placed; the sensor-labels sentence when refused; withplace-by-nameaborted, and withsensor-labels-copyaborted on a refusal, the view still draws and every map saysmontage_unavailable's sentence. Each abort case fails with its guard removed. Withe2e/quality-draw-parity.spec.ts: 41 passed, own portbun run typecheck(0 errors),bun run lint,bun run test:quality-views-perfbunx astro build && bun scripts/check-quality-views-size.mjs --require-build, and the real panel's unions measured with the panel chunk pinnedViteston CI fails only on the three nemar-cli drift tests (12 tests), the same 12 as on c441d5dAgentic AI tools were used. The author assumes full responsibility for this content.