Skip to content

The composer's menus and insertText hand strings to the editor as HTML: a model-written name or a site's title arrives in the draft with markup and line breaks #739

Closed

Description

@SSFSKIM

What

Three places put a string into the composer's draft by handing it to the editor as HTML, so markup and raw line breaks inside the string are parsed rather than inserted as text:

  • the @ menu's skill rows and the slash palette insert /<name> (src/renderer/src/composer/mentions/AtMenu.tsx, src/renderer/src/composer/SlashPalette.tsx);
  • insertText on the composer's handle (src/renderer/src/composer/editor/controller.ts, reached through insertComposerText in src/renderer/src/stores/composer.ts), whose callers pass: a skill's name ("Use in chat"), an agent's name, a design system's "ask to adopt" line built from an artifact's title, and the mark-up tool's "Add to chat" line built from a page's title or address.

A skill's or a command's name comes from a file a model can write; an artifact's title is written by a model; a page's title and address are written by a site. Each can hold <br>, <p> or a raw line break, which then become structure in the person's draft that the person did not type.

Found by the review of the grant reader's rule on the UX wave's U1c link (the builder's table of every way text enters the draft). It forges no grant: since that link, the serialiser writes no line that reads as a consent outside a pasted frame, whatever put it in the draft. What is left is hygiene: text of another party's wording arriving in the draft with structure of its choosing.

Wanted

  • insertText and the two menus insert text nodes, never an HTML string.
  • A name or a title that is by its nature one line has its control characters replaced before it is inserted (the mention's writer already does this for a path and an agent's name).
  • The @ menu leaves out a path that holds a control character (today its mention is written with a replacement character and names no file).

Acceptance

  • A unit case per inserter: a name or title holding <br>, <p>x</p> and a raw line break arrives in the draft as one line of literal text.
  • No change to what a person sees for ordinary names and titles.

Activity

  1. added
    bug
    status:ready-for-implementer
    priority:P3
    on Nov 16, 2026
  2. added
    status:in-progress
    and removed
    status:ready-for-implementer
    on Nov 20, 2026
  3. SSFSKIM commented on Nov 20, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-progress: batch 7, group A

  4. added
    status:in-review
    and removed
    status:in-progress
    on Nov 20, 2026
  5. SSFSKIM commented on Nov 20, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-review: batch 7, PR #804

  6. removed
    status:in-review
    on Nov 20, 2026
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

    bugpriority:P3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions