Skip to content

Test/0.4.0 polishing - #176

Open
amesk wants to merge 21 commits into
masterfrom
test/0.4.0-polishing
Open

amesk wants to merge 21 commits into
masterfrom
test/0.4.0-polishing

Conversation

@amesk

@amesk amesk commented Oct 22, 2026

Copy link
Copy Markdown
Owner

No description provided.

amesk added 16 commits October 23, 2026 17:31
…, preventing steps from bleeding across restores

A state with guided steps (RT-11 Adventure: 'R ADVENTURE') followed by a
state without steps of its own (2.11 BSD on RP1) replayed those keystrokes
on the new console. The share metadata that a device-set reload carries
across the page boundary in sessionStorage was written incrementally (only
present fields), so a state without steps left the previous state's key
standing. The reader then fell back to that stale key when the current
state had no steps of its own.

- persistStateMeta() writes every field or removes it, so a state without
  steps clears the key instead of inheriting it.
- consumeStateMeta() reads AND deletes the keys in one call, so the
  metadata belongs to exactly one apply.
- Both writers (deep-link finishLoad, snapshot load) and both readers
  (loadFromUrl, init) use the new helpers, and a plain page load without
  a pending restore sweeps any legacy leftovers.

Pinned by tests/snapshotstore.test.js (Test 20).
…enario tab and host-level pause

- docs/ARCHITECTURE.md: SHA-256 image identity, new modules (snapshots,
  media-registry, state-envelope, step-engine, emulation-control, viewer-config,
  config-apply, last-boot, boot-mailbox, lightbox), ?state= path, two wizard tabs
- docs/STATE-FORMAT.md: embedded resources, imageVersions, self-contained states
- docs/FEATURES.md: Scenario tab, host-level Pause, self-contained sharing,
  SHA-256 version pinning, updated REBOOT dialog and Behaviour tab
- docs/BUILDING.md: state-manifest and convert-state-format scripts
- docs/ROADMAP.md: Done (0.4.0) section
- docs/manual/*.md (EN+RU): Scenario tab in Quick Start, self-contained checkbox
  and version pinning in machine-state, Pause/Resume row in controls, Scenario
  and Snapshot terms in glossary, version pinning in troubleshooting
- landing/src/data.ts: new feature entries (Instant Run & Games, Shareable
  Machine States, Host-level Pause)
- landing/src/components/GetStarted.tsx: Scenario tab mention
- index.html: Machine States & Sharing and Host-level Pause feature rows,
  Scenario tab in Quick boot
- README.md: Scenario tab, self-contained and SHA-256 in Shareable States
- tools/screenshots-manual.js: btn-pause capture, guards for dialog-quickboot
  (Boot/Scenario tabs) and dialog-share (self-contained checkbox)
- assets/images/manual: regenerated dialog-quickboot.png, dialog-share.png,
  new btn-pause.png
STATE is a session-level action (save/restore/share a whole machine), so it
now docks immediately left of the quick-boot wand instead of right of REBOOT:
both open a dialog, and the wand's Scenario tab restores a saved state too.
Pause and Reboot stay on the left as live-machine controls.

- css/pdp11.css: .console-state -> left:auto; right:64px (desktop) and
  right:58px (768px breakpoint)
- pdp11.html, src/pdp11-panel.js: comments updated
- docs: machine-state.md (en/ru), controls.md (en/ru), FEATURES.md
- tests/console-button-layout.test.js: new CSS regression suite
- manual screenshots regenerated (pages, buttons, dialogs)
A picture of a settings or reference page is not what the operator saves mid-session, so the round camera button now leaves those pages the same way REBOOT and STATE do. The visibility rule lives in switchPage() beside the other floating controls, with an explicit CONTENT_PAGES list rather than the inverse of OPERATOR_PAGES: vt52-2 (TTY 2) has no operator entry and must keep its camera.

- src/pdp11-panel.js: CONTENT_PAGES list hides #screenshot-btn
- css/pdp11.css: .screenshot-btn.hidden forces display:none (the base rule sets flex)
- tests/console-button-layout.test.js: regression check for both facts
- tools/screenshots-manual.js: comma-separated shot selector for batch regeneration
- manual screenshots regenerated (storage, storage-tapes, info, dialog-config-leave; CONFIG tabs unchanged by the crop)
- docs/manual/controls.md, docs/manual/ru/controls.md: where the button is offered
The header names the product in the top-left corner and the document in the top-right one; the footer carries the edition bottom-left and the page number bottom-right. Both pairs are laid out as one table row, which keeps the two labels on a single baseline inside Chromium's restricted header/footer renderer, where flex does not work and a negative margin overshoots.
Glossary terms kept their gold screen colour on paper, where it was the only coloured element left in a black-and-white layout. The Controls table captions had the same defect from a cream that prints as a washed-out grey; their override also needs a more specific selector, because the screen rule sits below the print block and a media query carries no priority of its own.

tests/manual-pdf-colours.test.js pins both halves: no colour other than paper colours may be declared inside @media print, and the fill colours Chromium actually wrote onto the glossary pages must be the paper set. It reads the finished PDF with PDF.js, because the browser maps the screen colour into the print profile (#e8d080 becomes #948551 in the file), so checking the token would prove nothing.
@amesk
amesk force-pushed the test/0.4.0-polishing branch from a8e0ea5 to 5e01b32 Compare October 23, 2026 15:29
amesk added 5 commits October 23, 2026 20:20
…s overstrike

The Device copy of the LP11 job copy glued a literal two-character \f marker onto the line text, so printed and exported jobs had no page breaks and stray markers, while the legacy iopage.js copy wrote a real 0x0C sentinel; the two had drifted apart. The text model and the printable document now live in one module, src/lp11paper.js, and both printer paths delegate to it.

The copy also no longer loses text: a TAB only moves the carriage (it used to pad through the glyph writer and strike out whatever was already printed), and an overstrike can only add ink (a blank strike prints nothing, an underscore strike underlines the glyph instead of replacing it). A man page used to lose whole phrases in Save .txt while the animated paper showed them.

Print paginates on FF and on the 66-line sheet, sizes the type from the printable box (100cqw / --colw, measured in both weights) so the configured column count spans the paper the dialog picks, clips a line at the platen edge instead of wrapping, and prints double-struck glyphs bold. Style runs ride along as the optional lp11BufferRuns/lp11LineRuns snapshot fields, so states written before this restore as plain text. A raw-stream recorder (__lp11Record, lp11RawStream) is available for driver debugging, like __tracePC.
The seam was drawn only when the guest sent a form feed, so a job that happened to fill all 66 lines of a sheet ran into the next one with no separator at all. The perforation belongs to the paper: doPrintln now closes the sheet at the 66th line and queues the fold marker itself, while a form feed travelling through the pacing buffer no longer adds a second seam on the fresh sheet. The sheet arithmetic is a pure pageAdvance() helper, pinned by tests/g60printer-seam.test.js.
- on-screen cell is 7 x 11.67px (10 pitch x 6 LPI), so a 132 x 66 sheet is 1026 x 775px, wider than tall

- Print waits for the paper tile and the fallback bars use the tile's own colours; the sheet margins carry the paper colour

- printed rules (a run of '_' and nroff underline) are one continuous 2px line per cell

- new sheet-aspect test and palette/rule CSS contracts
- keep the paper underlay and the feed holes down to the bottom edge of a sheet the guest ejects early (src/lp11paper.js)
- lay the printed sheet out on the Printer page's geometry: 33px tractor strips, an 18px cell padding and the 924px text column inside a 960px bar field, at any configured column count
- draw a feed hole a third of the strip wide, the proportion paper-margin.png uses
- pin all three in tests/lp11-print.test.js and log them in CHANGELOG.md

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant