Skip to content

[Bug]: Composer shows Markdown markers on styled text but they can't be edited #29561

Closed

Description

@ElliotDrel

Note

🤖 Claude Opus 5.5 responding on behalf of Elliot

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web (mobile not checked)

Root cause

The ** shown beside styled text in the rich text composer looks like editable text, but it isn't in the document.

The editor stores styled text as a ProseMirror mark. decorationsForSelection in apps/web/src/components/ComposerPromptEditorTiptap.tsx draws each marker as a widget decoration while the caret is in that range. .composer-rich-marker sets user-select: none and pointer-events: none, so the marker cannot be clicked, selected, or changed.

docs/user/composer.md adds to the confusion by saying markers "stay in the text". That is true of what the agent receives, but not of what can be edited in the composer.

Steps to reproduce

  1. Leave Settings → Chat → Rich text composer on.
  2. Type **bold** in the composer.
  3. Click the word bold. The ** markers appear beside it.
  4. Try to click, select, or change one of the markers.

Expected behavior

Markers revealed by the caret behave like the text they appear to be. As in the MarkText desktop editor, clicking into formatted text exposes its Markdown so it can be edited in place. For example, changing ** to * makes the text italic, and deleting the markers removes the formatting.

Actual behavior

The markers can't be selected or edited. The only way to edit them directly is to turn off Settings → Chat → Rich text composer, which removes styling from the whole composer. The source toggle that addressed this was added in #26777 and reverted in #27390.

Impact

Minor bug or occasional failure

Version or commit

T3 Code v0.1.6 (desktop). Code inspected at main @ 8657eec.

Environment

Windows 11

Suggested approach

While the caret or selection is inside a styled range, show that range as real Markdown text, and parse it back into marks when the caret leaves. serializeEditorDoc and parseInlineMarkdown already convert in both directions.

This changes editor behavior as well as fixing a mismatch, so caret stops, input rules, and undo history would all need checking. This has not been prototyped.

Workaround

Turn off Settings → Chat → Rich text composer while editing formatting.

Activity

  1. ElliotDrel commented on Nov 4, 2026

    @ElliotDrel
    ContributorAuthor

    Note

    🤖 gpt-6.1-sol responding on behalf of Elliot

    The parity and selected-atom corrections are incorporated into PR #30421 at b1e7a7181e49c3398ec9c39afba41541f657e640. Both redundant follow-ups are closed. I verified the atom mapping matches our narrow correction.

    The owner's completed packaged native comparison supersedes the earlier pending-verification status. It covers this exact PR head against main 9e85538535 on physical macOS arm64: Japanese preedit cancellation restores the exact document and draft on both builds; marker deletion and selected-chip deletion/replacement pass on the final PR package. Both builds retain the same history limitation: cancellation adds a no-op undo event and clears an existing redo. Their Electron versions differ (44.10.0 versus 44.10.1); no same-Electron or merged-current-main package claim is made. This is owner-reported runtime evidence; I inspected the report, not an independent native rerun.

    Current GitHub inspection confirms no pending/failing checks, no unresolved inline threads, exact-head Macroscope approval, and a clean mergeable state. No further code correction is indicated by this comparison. Windows and native mobile coverage are not established by the macOS run.

    Delimiter-sensitive ranges deliberately retain styling when faithful source round-tripping cannot be guaranteed. PR #30421 has now merged into upstream main as af54fe23442617c7269d3447d84d2b1241a02692; issue #29561 is closed. This supersedes the earlier pending-merge status. The merge establishes incorporation, not release rollout or new platform verification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions