Repository navigation
fix(web): keep literal characters in sticky message previews - #2272
Merged
Merged
Conversation
The sticky header stripped every _, *, [, ], (, ) and # from the prompt, so identifiers like delegate_task showed as delegatetask. Move the release notes Markdown stripper into a shared helper that removes only real delimiters and keeps code span contents verbatim, and use it for both.
chuks-qua
enabled auto-merge (squash)
October 21, 2026 13:59
writeHandoffAudit created the audit directory before writing handoff.md, so a reader between the two steps hit ENOENT. The provider-switch test read the audit in that window and failed in CI. The file is now written under a temporary name and renamed into place, readers skip a directory whose handoff.md is not there yet, and the tests wait for the switch audit, which trails turn settlement.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
The sticky header at the top of a conversation removed every
_,*,[,],(,),#,>and~from the last prompt.delegate_taskshowed as "delegatetask", and a link showed its text and URL run together. The message bubble below was correct.The preview now removes only Markdown syntax. It drops heading and quote markers at the start of a line. It removes emphasis, strikethrough and link syntax only where they act as delimiters. Code span contents stay verbatim. Literal underscores, brackets, parentheses,
#and>stay as typed.The inline stripping lives in a new
apps/web/src/lib/inline-markdown.ts. The update card's release-notes parser had its own copy of these rules with the same code-span bug, so it now uses the shared helper too.Verified in the web app against a fixture-repo thread (screenshots below), with new unit cases in
user-message-preview.test.ts. They failed on the first commit and pass on the fix. The existing release-notes tests pass unchanged.Why
Prompts are full of identifiers, paths and URLs. A header that rewrites them misleads the user about what they asked. Closes #2269.
UI Changes
Same thread, same scroll position. Prompt:
Check thread_target_list and delegate_task in `src/__tests__/a_b.ts`, see [the docs](https://example.com/a_(b)).Review Notes
Rules follow CommonMark delimiter behavior without a full parser. Unquoted
__init__still renders as "init", which matches the message bubble, since Markdown makes it bold there too. Parsing with mdast instead would add about 23 KB gzipped to the eager transcript chunk, because the Markdown renderer is lazy-loaded today.On input made almost entirely of unclosed delimiters, the lazy regexes are quadratic: about 250 ms for 50,000 characters. The old release-notes regex had the same shape. Ordinary prompts are unaffected.
Need help on this PR? Tag
@codesmith-botwith what you need.