Skip to content

feat: wire M2 long-document (outline approval + >30k batching) into the live HTML-export wizard #25

Description

@project820

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions