Tracked under ADR 0002 — Phase A. Detail: implementation plan §A3.
Problem
The Markdown output textarea is readonly (static/index.html:153); the user cannot make a small inline correction without copying the text into a separate editor. Worse, when a section misses the mark, the only recourse is to regenerate the entire draft (slow on gemma4:31b, and risks losing acceptable sections). Issue #11 (style threshold) is more painful than it should be because of this.
The Preview tab also has no Copy button — switching tabs to copy is unnecessary friction.
Scope
- Make
<textarea id=\"markdown-output\"> writable. Live-sync edits into the rendered preview via marked.
- Add a Copy button to the Preview tab as well.
- Add a "Regenerate this section" button that activates when the cursor is inside a
## heading subtree.
- New endpoint
POST /api/drafts/{id}/regenerate-section accepts { section_anchor, brief_id, persona_id, format_id } and returns a candidate replacement for that section only.
- Replacement is presented as a diff/preview; the user accepts or rejects.
Acceptance criteria
Out of scope
- Visual diff UI for the regenerated section (text-only is fine for now).
- Streaming of the regenerated section (covered indirectly by Phase A2 if endpoint supports SSE).
Tracked under ADR 0002 — Phase A. Detail: implementation plan §A3.
Problem
The Markdown output textarea is
readonly(static/index.html:153); the user cannot make a small inline correction without copying the text into a separate editor. Worse, when a section misses the mark, the only recourse is to regenerate the entire draft (slow ongemma4:31b, and risks losing acceptable sections). Issue #11 (style threshold) is more painful than it should be because of this.The Preview tab also has no Copy button — switching tabs to copy is unnecessary friction.
Scope
<textarea id=\"markdown-output\">writable. Live-sync edits into the rendered preview viamarked.##heading subtree.POST /api/drafts/{id}/regenerate-sectionaccepts{ section_anchor, brief_id, persona_id, format_id }and returns a candidate replacement for that section only.Acceptance criteria
Out of scope