Skip to content

feat(workbench): preview Markdown in drafts and user messages - #6951

Merged
M4n5ter merged 1 commit into
rust-previewfrom
codex/composer-markdown
Nov 16, 2026
Merged

M4n5ter merged 1 commit into
rust-previewfrom
codex/composer-markdown

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Nov 16, 2026

Copy link
Copy Markdown
Member

Summary

  • Preview headings, emphasis, code, quotes, bullets and links directly in the draft. Moving the caret onto the syntax reveals it for editing.
  • Render Markdown in sent user messages. Submitting and copying preserve the original source, and conversation references still open beside the current chat.
  • Show bare web URLs as links. Command-click on macOS and Ctrl-click on Windows and Linux open web links from the draft.

Verification

  • On the native macOS test surface, pasted Markdown, clicked a list bullet to edit its marker, undid the change, sent the draft, and copied the rendered user message. The provider and clipboard received the original Markdown.
  • Ran the related native IME and conversation-reference regressions, composer and skill tests, rich-editor position test, TypeScript and Biome checks.

Draft Markdown

Editing a list marker

Sent user message

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Codex implemented the preview, rendering and tests.

Checklist

  • Tests cover the change and fail without it
  • Format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes
  • No

Render draft Markdown over the original editor coordinates. Reveal the active syntax for edits, and keep the Markdown source for submission and copying.

Generated-by: Codex
@M4n5ter
M4n5ter merged commit 54cd7e5 into rust-preview Nov 16, 2026
1 check passed
@M4n5ter
M4n5ter deleted the codex/composer-markdown branch November 16, 2026 09:37
Colafornia added a commit that referenced this pull request Nov 20, 2026
#6951 split SkillMessage into markdown, token and plain renders and dropped
the userSelect: 'text' the shared text carried. A markdown user message is
still selectable through MarkdownBody's selectable view, but a message
without Markdown syntax renders as a bare Text that is selectable neither by
itself nor as part of a selection area, so dragging over it selects nothing.

Restore userSelect: 'text' on the plain branch.

Generated-by: Maka
Astro-Han added a commit that referenced this pull request Nov 22, 2026
…7117)

Keep active and incomplete Markdown syntax visible in the composer and Markdown file editor while preserving #6951's preview design:

- Check closed caret bounds (`owner.start <= pos && pos <= owner.end`) against `selection().head()` for syntax and Mermaid diagram reveal, keeping active markers visible at trailing carets without expanding the whole document on `Cmd+A`, and removing the `+ 1` workaround in `list_marker`.
- Only conceal fenced code block delimiters and register Mermaid diagrams when both fences satisfy CommonMark's 0..=3 leading-space rule, a matching closing fence exists, and parsed `Code.value` has non-empty content.
- Only conceal blockquote `>` prefixes on lines with non-empty content after the quote markers.

Refs #6951

Generated-by: Antigravity (Gemini)
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