You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When *** or ___ opens bold at the start of an italic span in the composer (***Note:** see docs* or ___Note:__ see docs_), it renders literal **/__ and trailing markers instead of bold-italic then italic. This also corrupts reloaded drafts from serializeEditorDoc and breaks Markdown source reveal on those spans.
Change
In parseInlineMarkdownPieces (apps/web/src/composer-rich-text.ts), when a closing 2-character delimiter matches an outer bold frame opened in the same triple delimiter as the inner italic frame, pop both frames, reopen italic at the triple delimiter's start offset, and push the closed bold pieces into it. This fixes * and _ triple delimiters with exact source offsets while keeping ***both*** and nested styles intact.
Scope
Bug fix (corrupted inline Markdown rendering and draft round-trips in the default composer). Small fix for an obvious parser bug in one module; no separate issue needed.
Verification
Linux steps:
Open a thread composer with default settings.
Paste ***Note:** see docs*, press Shift+Enter, and paste ___Note:__ see docs_.
Confirm both lines render bold-italic Note: then italic see docs.
Found by reading the inline Markdown parser against serialized composer output, then reproduced in the composer.
Setup: Ubuntu 26.04, Chromium (Browser panel), light theme, 1280x800, fresh isolated data per commit ("Test machine").
Steps: Open demo-app composer → paste ***Note:** see docs* → Shift+Enter → paste ___Note:__ see docs_ (Browser panel).
Focused tests on 114e74d3de73 (vp env exec --node 26.13.1 vp test run apps/web/src/composer-rich-text.test.ts apps/web/src/composer-rich-text-doc.test.ts apps/web/src/components/ComposerPromptEditorTiptap.input.browser.test.tsx):
When a triple emphasis delimiter opens bold and italic together and the bold span closes before the italic span, parseInlineMarkdownPieces popped the inner italic frame and left the outer bold markers literal. Reorder the triple-opened frames when a 2-character closing delimiter matches the outer bold frame so both spans close cleanly with exact source offsets.
Macroscope's review found this PR approvable — This preserves bold formatting at the start of italic composer text through a narrowly scoped Markdown parser adjustment. Its effects are confined to rich-text interpretation and mark mapping, with no evident material risk requiring human judgment.
You can add or adjust custom eligibility rules. Learn more.
Reviewing files that changed from the base of the PR and between 114e74d and 1796b22.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The inline Markdown parser now handles a specific two-character closing delimiter case for mismatched emphasis. Three tests cover asterisk and underscore inputs, including an unmatched leading delimiter.
The parser adjusts italic and bold frames for a specific two-character closing delimiter run. Tests cover asterisk and underscore examples, including an unmatched leading asterisk.
This fixes the composer's handling of bold at the start of italic text, such as ***Note:** see docs*. The change is small and tested, and no remaining merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: a fix in the web composer that keeps bold text at the start of italic spans, which matches the parser change in composer-rich-text.ts and the three added test cases. I…
Description check
The description follows the template sections: Problem, Change, Scope, and Verification. It explains the bug and the parser fix, states why no issue is linked, and gives focused test results plus befo…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: a fix in the web composer that keeps bold text at the start of italic spans, which matches the parser change in composer-rich-text.ts and the three added test cases. It follows the conventional commit format and is specific enough for a teammate scanning history.
Full details: Description check
Explanation
The description follows the template sections: Problem, Change, Scope, and Verification. It explains the bug and the parser fix, states why no issue is linked, and gives focused test results plus before/after screenshots and reproduction steps. It has no linked issue, but the Scope section explains why none is needed. The template's 'Use a conventional commit title' line is satisfied by the title. The Verification section is detailed, and the author states what was not shown (Electron, mobile).
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Reviewing files that changed from the base of the PR and between 5d9b0c0 and 114e74d.
Files selected for processing: 2
apps/web/src/composer-rich-text.test.ts
apps/web/src/composer-rich-text.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Open the seeded thread in the default rich-text composer. Paste ***Note:** see docs*, press Shift+Enter, paste ___Note:__ see docs_, press Shift+Enter, paste control: **bold** and *italic* and ***both***. Blur the composer and clear the selection, capture it, and inspect computed formatting on both Note: spans.
Web client, Chromium at 1280×800, light theme; fresh isolated databases and identical synthetic project/thread seeded via t3.project/t3.thread, Replay (dev), real server and WebSocket stack.
Scenario: Bold at the start of italic text survives paste
Visual inspection: base leaves literal delimiters and plain see docs; head shows bold italic Note: followed by italic see docs for both delimiter styles.
Not shown:
Draft reload and Markdown source mapping were not exercised; this proof covers the reported paste-and-render reproduction.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:S10-29 changed lines (additions + deletions).vouch:unvouchedAuthor is not yet trusted in the VOUCHED list.
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When
***or___opens bold at the start of an italic span in the composer (***Note:** see docs*or___Note:__ see docs_), it renders literal**/__and trailing markers instead of bold-italic then italic. This also corrupts reloaded drafts fromserializeEditorDocand breaks Markdown source reveal on those spans.Change
In
parseInlineMarkdownPieces(apps/web/src/composer-rich-text.ts), when a closing 2-character delimiter matches an outerboldframe opened in the same triple delimiter as the inneritalicframe, pop both frames, reopenitalicat the triple delimiter's start offset, and push the closedboldpieces into it. This fixes*and_triple delimiters with exact source offsets while keeping***both***and nested styles intact.Scope
Bug fix (corrupted inline Markdown rendering and draft round-trips in the default composer). Small fix for an obvious parser bug in one module; no separate issue needed.
Verification
Linux steps:
***Note:** see docs*, pressShift+Enter, and paste___Note:__ see docs_.Found by reading the inline Markdown parser against serialized composer output, then reproduced in the composer.
Setup: Ubuntu 26.04, Chromium (Browser panel), light theme, 1280x800, fresh isolated data per commit ("Test machine").
Steps: Open
demo-appcomposer → paste***Note:** see docs*→Shift+Enter→ paste___Note:__ see docs_(Browser panel).4472a18e14a0)114e74d3de73)Literal ** and __ markers remain around italic "Note:" and trailing text.
Both lines show bold italic "Note:" then italic "see docs", with dimmed Markdown markers at the caret.
Links:
git merge-treeagainstmainfe2261aeb77bNot shown:
apps/web).parseInlineMarkdown).Focused tests and check:changed output (AI agent)
Fail-first on
4472a18e14a0:Focused tests on
114e74d3de73(vp env exec --node 26.13.1 vp test run apps/web/src/composer-rich-text.test.ts apps/web/src/composer-rich-text-doc.test.ts apps/web/src/components/ComposerPromptEditorTiptap.input.browser.test.tsx):vp env exec --node 26.13.1 vp run check:changed 4472a18e14a06eb050c06348c57303ecf1c59e6c:Generated with Gemini 4 Neon in T3 Code Nightly