Skip to content

feat(v3): D4 Milestone 4 — import-mode beforeunload guard + docs (v0.17)#86

Merged
mbreiser merged 1 commit into
mainfrom
feat/v3-d4-milestone4
Jun 1, 2026
Merged

feat(v3): D4 Milestone 4 — import-mode beforeunload guard + docs (v0.17)#86
mbreiser merged 1 commit into
mainfrom
feat/v3-d4-milestone4

Conversation

@mbreiser
Copy link
Copy Markdown
Contributor

@mbreiser mbreiser commented Jun 1, 2026

What this is

Milestone 4 of D4 (cross-library import) — the final piece: polish + docs.
Completes the D4 Definition of Done (handoff §9). Targets main directly
(M1–M3 already merged via #84/#85).

Changes

  • beforeunload guard during import mode (experiment_designer_v3.html):
    warns on dirty || importMode, so an accidental tab-close mid-import — when
    the staging buffer is built but not yet committed — prompts before losing it.
    Tracked separately from dirty because entering import mode intentionally does
    not mark the document dirty (design §7); only a successful commit does.
    Browser-verified: fires during import, silent before/after.
  • CLAUDE.md — new reference section "v3 Experiment Designer — D4
    Cross-Library Import"
    : module split (v3-import.js), the staging API, the
    anchor-namespace / plugin-merge-by-default rule, the commitStaging atomicity +
    no-pushUndo contract, the import-mode UI + locking (incl. the rule that new
    mutation handlers need an importMode guard), the test suites, and the
    out-of-scope list.
  • v3-editor-handoff-2.md — marked D4 shipped: header/TL;DR/shipped-table/
    Tier 4 refreshed; records that the applySequenceEdit reducer refactor was
    not needed (the staging buffer stayed self-contained and commits via the
    documented node primitives).
  • Footer v0.16 → v0.17.

Tests

npm test → arena 10/10 · v2 137/137 · v3 576/576  (docs/polish only — no logic change)

D4 status after this merges

M1 (#84) · M2 (#84) · M3 (#85) · M4 (this)D4 v1 complete. Future v1.1
candidates (design §12): sequence/block-membership import, multi-doc YAML
streams, pattern-path validation, per-anchor "merge with existing" toggle.

🤖 Generated with Claude Code

Final D4 (cross-library import) milestone: polish + documentation.

- beforeunload now warns on `dirty || importMode` — an accidental tab close
  mid-import would lose the uncommitted staging buffer. Tracked separately from
  `dirty` because entering import mode intentionally does not mark the doc dirty
  (design §7); only a successful commit does.
- CLAUDE.md: new "v3 Experiment Designer — D4 Cross-Library Import" reference
  section (module split, v3-import.js API, anchor-namespace/plugin-merge rule,
  commitStaging atomicity + no-pushUndo contract, import-mode UI + locking, test
  suites, out-of-scope list). Documents the importMode-guard rule for future
  mutation handlers.
- v3-editor-handoff-2.md: mark D4 shipped (M1–M3 merged via #84/#85), refresh
  header/TL;DR/shipped table/Tier 4, record that the applySequenceEdit reducer
  refactor was NOT needed (staging stayed self-contained).
- Footer v0.16 → v0.17.

Completes the D4 Definition of Done (handoff §9). npm test green
(arena 10 · v2 137 · v3 576). Browser-verified the beforeunload guard fires in
import mode and clears on cancel.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mbreiser mbreiser merged commit 4ea29c5 into main Jun 1, 2026
2 checks passed
@mbreiser mbreiser deleted the feat/v3-d4-milestone4 branch June 1, 2026 12:59
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