Skip to content

Show formatted notes as the assistant writes - #1105

Merged
koutst merged 2 commits into
mainfrom
codex/formatted-note-streaming
Sep 14, 2026
Merged

koutst merged 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

@koutst
koutst marked this pull request as ready for review September 14, 2026 18:13
@koutst
koutst requested a review from a team as a code owner September 14, 2026 18:13
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@koutst

koutst commented Sep 14, 2026

Copy link
Copy Markdown
Member Author

@codex

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-14T18:27:16.892044Z a339b55 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: a339b55fdf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@koutst
koutst merged commit 0065fd3 into main Sep 14, 2026
4 of 5 checks passed
@koutst
koutst deleted the codex/formatted-note-streaming branch September 14, 2026 18:37
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