• Гильмуллин Руслан Ниязович's avatar
    feat: landing page Phase 2 — DEMO retirement (#79) (#91)
    · 3ffe8acd
    * docs(plan): landing page Phase 2 — DEMO retirement (#79 phase 2)
    
    * feat(machine-view): boot priority — ?example=<id> > ?snippet=<id> > localStorage > default
    
    Extracts the initial-state decision tree out of MachineView.svelte into
    a pure helper (src/lib/initialBoot.ts) so the 4-tier boot priority is
    unit-testable without mounting the worker/mermaid/editor surfaces.
    
    - ?example=<id> is the new highest-priority source; matching ids snap
      selectedExampleId and load the bundled code.
    - Unknown ?example= ids fall through (to ?snippet= / localStorage /
      default) and surface badExampleId for a one-shot mount-time log entry,
      mirroring the existing ?snippet= bad-uuid pattern.
    - The URL-strip $effect now also deletes ?example= so the param doesn't
      outlive its boot consumption.
    
    Additive — existing DEMO behaviour continues to run; Task 2 of the
    landing-page Phase 2 plan rips DEMO entirely (machines-demo#79).
    
    * refactor(machine-view): rip DEMO mode — engine pages boot to MANUAL
    
    * refactor(control-panel): delete flashApply only — reflect still used by non-DEMO paths
    
    flashApply was DEMO-only (called only via demoLoop callbacks, which Task 2
    removed). Deleted: flashApply export, APPLY_FLASH_MS constant, flashing $state,
    flashTimeoutId, class:pressed binding, and the .pressed CSS rule.
    
    reflect() survives — reflectToActivePanel / reflectNeutral (non-DEMO paths:
    doLoad, doStep, doRun, takeControl, onIterHandler) still call it.
    
    * refactor(types): drop 'DEMO' from ExecutionMode (+ local mirrors) + delete demoLoop.ts
    
    * test: add M-execution-mode-union assertion (M-boot-no-demo deferred to Task 6 E2E)
    
    - M-execution-mode-union: @ts-expect-error asserts 'DEMO' is no longer
      assignable to ExecutionMode (imported from graphHighlightDerivation.ts,
      which already exports the type). 151 tests pass (was 150).
    - Dropped stale "DEMO mode auto-runs" comment from e2e/cold-start.spec.ts.
    - M-boot-no-demo deferred to Task 6 E2E: asserting executionMode==='MANUAL'
      and no tape animation after mount requires a full MachineView mount
      (worker, mermaid/ELK, Editor, IntersectionObserver, matchMedia); the
      Task 6 cold-start rewrite ("load /turing; tape cells static after 2s")
      covers it naturally without heavy mocking.
    
    * test(e2e): rewrite cold-start for static boot + add ?example= deep-link scenario
    
    * fix(e2e): landing deep-link asserts /turing settled URL (Phase 2 strips ?example=)
    
    * docs(execution-model): rewrite for Phase 2 — DEMO+IDLE retired, userTookControl gone, new boot priority
    
    * docs: sweep README + CLAUDE.md for Phase 2 — drop demoLoop.ts from trees, drop DEMO from reloadWorker narrative, add initialBoot.ts entries
    3ffe8acd