Context
The R1 HTML-export cutover (#9, PRs #10–#23) shipped the LLM-authored direct engine and removed the legacy JSON renderer. The single-pass direct-authoring path is live.
The R1 scope also listed the M2 long-document workflow (outline approval UI + >30k approved-outline batching + one-section repair + confirmed partial export). Those building blocks were implemented as pure modules during R1 (html-export-outline.ts, html-export-batch.ts, buildOutlinePrompt / buildSectionPrompt in html-export-direct-prompt.ts) but were not wired into the live wizard at cutover.
As a safe interim (PR #24), documents whose source exceeds the 30,000-char single-pass boundary now fail fast with a localized "too long for single pass" message instead of firing a doomed single prompt that failed downstream as pipeline-oversize.
Deliverable
Wire the built M2 long-document path into the live wizard so >30k documents export via outline approval + batched section authoring instead of failing fast:
- surface the outline approval UI (
createOutlineDraft → reorder/delete/edit/add → approveOutline) in the wizard when coverage.withinSinglePass === false
- main-side section transport + assembly for
batchAuthorOutline (per-section generate → sanitize → resolve, then finalize the assembled document)
- coverage-gap handling: one section repair, explicit placeholder, confirmed partial export (per M2b)
- extend the direct harness with a long-document (>30k) batched-export case
Non-goals
- M3 prescan/recommendations, M4, M5 (explicit R1 deferrals, unchanged)
Acceptance
- A >30k-char document reaches the outline approval step, and after approval exports a finalized single-file HTML through the batched path with full source coverage (no silent omission, no
pipeline-oversize failure).
test:html-export-direct gains a passing >30k batched case.
Context
The R1 HTML-export cutover (#9, PRs #10–#23) shipped the LLM-authored direct engine and removed the legacy JSON renderer. The single-pass direct-authoring path is live.
The R1 scope also listed the M2 long-document workflow (outline approval UI + >30k approved-outline batching + one-section repair + confirmed partial export). Those building blocks were implemented as pure modules during R1 (
html-export-outline.ts,html-export-batch.ts,buildOutlinePrompt/buildSectionPromptinhtml-export-direct-prompt.ts) but were not wired into the live wizard at cutover.As a safe interim (PR #24), documents whose source exceeds the 30,000-char single-pass boundary now fail fast with a localized "too long for single pass" message instead of firing a doomed single prompt that failed downstream as
pipeline-oversize.Deliverable
Wire the built M2 long-document path into the live wizard so >30k documents export via outline approval + batched section authoring instead of failing fast:
createOutlineDraft→ reorder/delete/edit/add →approveOutline) in the wizard whencoverage.withinSinglePass === falsebatchAuthorOutline(per-section generate → sanitize → resolve, then finalize the assembled document)Non-goals
Acceptance
pipeline-oversizefailure).test:html-export-directgains a passing >30k batched case.