Skip to content

Show formatted notes as the assistant writes - #1105

Draft
koutst wants to merge 2 commits into
mainfrom
codex/formatted-note-streaming
Draft

Show formatted notes as the assistant writes#1105
koutst wants to merge 2 commits into
mainfrom
codex/formatted-note-streaming

Conversation

@koutst

@koutst koutst commented Sep 11, 2026

Copy link
Copy Markdown
Member

AI-generated notes currently preview as plain text while the assistant writes. Render structured draft blocks with Tiptap’s generateHTML() and the live editor’s existing extensions, preserving headings, paragraphs, emphasis, and lists. Show a small “Drafting · Preview updates live” indicator and keep the duplicate draft in chat collapsed by default.

Consumes optional replacement blocks snapshots from ResearchHub/researchhub-backend#4116. The preview reuses the assistant HTML sanitization policy, retains the last renderable snapshot when a node is incomplete, and resets when the stream or draft changes. Older servers retain a plain-text fallback. The empty editor is hidden during initial drafting but stays mounted; partial blocks are never written into it or autosaved. No new frontend dependency is needed.

Validation: ESLint on changed files and a full TypeScript check pass. A real local generation using this PR checkout displayed five headings, eight bullet items, seven numbered steps, and bold/italic text while still running. The note completed and saved successfully. Verified the narrow document drawer layout.

Live-test detail: the model’s first save omitted required paragraph wrappers in list items. Existing note validation rejected it, and the model corrected the blocks and saved on retry. The completed note remained formatted after reload.

@vercel

vercel Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
web Ready Ready Preview Sep 11, 2026 11:13pm UTC

Request Review

@sonarqubecloud

Copy link
Copy Markdown

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