Skip to content

fix(console): centralize messages and stop retrying a failed partial mount - #91

Merged
Dreamcoder08 merged 4 commits into
mainfrom
fix/console-followups-75
Sep 29, 2026
Merged

Dreamcoder08 merged 4 commits into
mainfrom
fix/console-followups-75

Conversation

@Dreamcoder08

Copy link
Copy Markdown
Owner

Closes #75.

  • Messages: one module (src/lib/console/messages.ts) imported by the loader, driver, actions and the recovery spec — no duplicated strings between components and tests
  • Failed partial mount: the eager loading logic moves to loader.ts (createConsoleLoader, unit-testable); a failed mount is final for the page (later triggers show the failure status instead of re-mounting), a double trigger while loading shares one mount, and the driver registers every listener on one abort signal and removes them all if wiring throws
  • Theme action: announces before closing the dialog (order toggle → announce → close asserted)
  • Tests: TERMINAL-003 skips outside Chromium and has an explicit waitForRequest timeout; the recovery spec imports RELOAD_FLAG
  • Unit 170/170 (+5); mutation proofs: loader guard off, abort() removed, theme order swapped — each made the new tests fail and was restored; playwright --list titles identical (26 tests in console+terminal)
  • E2E (CONSOLE-RECOVERY-*, CONSOLE-008, TERMINAL-003) and the lazy chunk name _astro/driver.*.js are verified by CI, not locally (laptop thermals)

Move every console status and error string into src/lib/console/messages.ts
and import it from the eager loader, the lazy driver, the actions, and the
recovery e2e spec so the copy and its assertions cannot drift apart.
…heme change first

Move the eager first-use loader into src/lib/console/loader.ts so its
failure branches are unit testable. A mount that throws is now final for
the page: later triggers re-show the failure status instead of mounting
again, and concurrent triggers share one in-flight load. The driver wires
every listener through one AbortSignal and aborts it when wiring throws,
so a partial mount leaves no listeners behind.

The theme action now announces before closing the dialog, because the
live region lives inside it and a closed dialog leaves the accessibility
tree.
TERMINAL-003 now skips outside Chromium, the only browser that reports a
script-initiated mailto: navigation as a request, and gives waitForRequest
an explicit timeout; the built URL stays asserted through the fallback
link's href. The recovery spec imports RELOAD_FLAG from chunk-recovery.ts
instead of hardcoding the storage key.
@Dreamcoder08
Dreamcoder08 force-pushed the fix/console-followups-75 branch from 01c0c0e to 09dfd0b Compare September 29, 2026 05:24
@Dreamcoder08
Dreamcoder08 merged commit 0da0a0a into main Sep 29, 2026
2 checks passed
@Dreamcoder08
Dreamcoder08 deleted the fix/console-followups-75 branch September 29, 2026 05:27
Dreamcoder08 added a commit that referenced this pull request Sep 29, 2026
* test(console): accumulate sessionStorage restores in chunk-recovery tests

setSessionStorage overwrote a single module-level restore, so a test that
swapped storage twice lost the first restore. Restores now stack and run
newest first in afterEach. Refs #92.

Claude-Session: https://claude.ai/code/session_01WKW6vNiCa8XkaAWAjPQLRf

* test(convergence): drive the pointer-idle teardown test with mock timers

The test waited 260ms of real time; it now enables node:test mock timers
and ticks past the idle timeout, so it is deterministic and instant.
Refs #92.

Claude-Session: https://claude.ai/code/session_01WKW6vNiCa8XkaAWAjPQLRf

* test(terminal): tighten the TERMINAL-003 chromium-only guard

Keep the skip as the first statement, set apart from the page work, and
stop restating the Chromium navigation rationale in two comments. Titles
and tags are unchanged. Refs #93.

Claude-Session: https://claude.ai/code/session_01WKW6vNiCa8XkaAWAjPQLRf

* test(ci): run the lighthouse-summary child with a hermetic env

The child inherited the whole parent env minus GITHUB_STEP_SUMMARY; it now
gets only PATH plus what each test passes, so CI variables such as
NODE_OPTIONS cannot leak in. Also make the table-row helper easier to read.
Refs #95.

Claude-Session: https://claude.ai/code/session_01WKW6vNiCa8XkaAWAjPQLRf
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.

Console/terminal: follow-ups from the #74 review

1 participant