Skip to content

Clean chat citations and split multi-line title pastes in Space - #224

Merged
BunsDev merged 4 commits into
release-reviewed-batchfrom
paste-citations
Oct 15, 2026
Merged

BunsDev merged 4 commits into
release-reviewed-batchfrom
paste-citations

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Integration target: release-reviewed-batch. This reviewed update will land through the combined batch and its protected squash to main; Images/Plugins #236 is excluded.

What happened

A ChatGPT deep-research report was pasted into a new Space page on 2026-10-15. The page showed two problems:

  • Citation boxes. ChatGPT copies each citation as private-use characters (U+E200, the kind, U+E202-separated IDs, U+E201) around IDs like turn20search6. Those IDs resolve only inside the ChatGPT conversation, so the page rendered boxes and IDs. That page had 60 of them.
  • Flattened title. The report was pasted into the title field. A text input turns line breaks into spaces, so the title became the first 200 characters of the report.

Change

  • stripChatCitations drops citation markers together with the space before them. Entity markers keep their visible name. Stray marker characters are removed.
  • Pasting into a block cleans the text and inserts it with insertText, so undo still works.
  • Importing a Markdown file cleans it before the title is extracted.
  • A multi-line paste into the title keeps the first line, without a heading marker, as the title. The rest goes to the top of the page body.

Verification

  • Unit tests cover citations, entities, malformed markers, import, and title splitting with LF and CRLF.
  • A new e2e test pastes a report into a blank page's title, then pastes into a block.
  • pnpm test passed apart from one terminal job-control test that failed under a load average above 100. It passed when rerun alone.
  • All 28 Space e2e tests passed. Eight first timed out waiting for the window to show at a load average near 480, and they passed on rerun.

Coven-Harness: Claude Code / claude-opus-5-5

ChatGPT copies its citations as private-use marker characters around
source IDs that only resolve inside that conversation, so pasted and
imported pages showed them as boxes followed by IDs like turn5view0.
Pasting into a block and importing Markdown now drop those markers,
and entity markers keep their visible name.

Pasting a whole report into a page title used to flatten its lines into
one and cut it at 200 characters. The title now keeps the first line,
without a heading marker, and the rest goes to the top of the page.

Coven-Harness: Claude Code / claude-opus-5-5
@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
modex Ready Ready Preview Oct 15, 2026 4:21pm UTC

Request Review

Normalize carriage-return and mixed line endings before splitting pasted Space title text.

Coven-Harness: Codex / GPT-6
@BunsDev
BunsDev changed the base branch from main to release-reviewed-batch October 15, 2026 18:26
@BunsDev
BunsDev merged commit 2fb832c into release-reviewed-batch Oct 15, 2026
8 checks passed
@BunsDev
BunsDev deleted the paste-citations branch October 15, 2026 18:40

This branch was successfully deployed

1 active deployment
Preview — 827cfcd9 Deployed Oct 15, 2026 by vercel[bot]
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