githubnext/ace2Public

Ace: a collaborative coding environment on the team's own machines

Keep literal braces in timeline message text

IA

A sent message containing plain text `canAttach={false}` (not in backticks) renders in the timeline as `canAttach=`: the braces and their contents disappear, both visually and in the Accessibility text. The stored message keeps the full text (the channel summary generated from it preserves `canAttach={false}`), so only the timeline rendering drops it.

## Cause

The timeline parses message text with comark (`packages/ui/src/components/blocks/parse.ts`), which treats `{...}` after text as MDC inline attributes and removes it. Reproduced directly with comark:

``` "respect canAttach={false}, and" -> ["p",{},"respect canAttach=, and"] "respect `canAttach={false}`, and" -> ["p",{},"respect ",["code",{},"canAttach={false}"],", and"] ```

## Expected

Plain-text braces in chat messages render literally. Code, JSX props, and object literals are common in Ace messages, and text must never silently disappear from the timeline.

Observed while dogfooding #91 in Ace Canary 0.0.11. Part of #5.

  1. iamnbutlerreferenced this in [Meta] Dogfood Ace end to end #5last month on GitHub

  2. iamnbutlerparent-issue-addedlast month on GitHub

  3. iamnbutlerreferenced this in feat(ui): attach images pasted into the composer #104last month on GitHub

  4. iamnbutlerreferenced this in Long chat messages clip their final rendered line #168last month on GitHub