fix(app): stop remark-directive from eating colons in assistant messages - #869
Closed
bhuvansingla wants to merge 1 commit into
Closed
fix(app): stop remark-directive from eating colons in assistant messages#869bhuvansingla wants to merge 1 commit into
bhuvansingla wants to merge 1 commit into
Conversation
remark-directive (enabled for plugin directives like ::inline-vis{...})
also parses inline :name and block :::name directives, so any colon
before a letter or digit (9:30, key:value, :D) became a directive node.
remarkMessageDirectives only handled leaf (::name) directives; text and
container directives fell through to mdast-util-to-hast, which renders an
unknown directive as an empty <div>. Inside a paragraph that split the
line and dropped the directive's text.
Handle all three kinds: leaf directives mount as before; text and
container directives are rewritten back to their literal source (text
inline, container as a paragraph). Display-only change.
This was referenced Jul 27, 2026
Collaborator
|
Superseded by #875. Thanks for this — the change is real and it's in. I reviewed it against a local checkout and found two stale test assertions and an out-of-scope container-directive rewrite that stopped nested plugin directives from mounting, so rather than round-trip here I folded the fix into #875 alongside the other three open contributor PRs (#865, #868, #869, #870). Your commits are preserved on that branch with your original authorship, and the follow-up commit credits you as co-author. The full reasoning and the live QA evidence are in the #875 description. Closing this one in favour of #875. |
This was referenced Jul 27, 2026
SawyerHood
added a commit
that referenced
this pull request
Jul 27, 2026
Supersedes #865, #868, #869, and #870. Each was reviewed against a local checkout, found defective, and fixed; this branch carries the original contributor commits plus one follow-up commit per PR. - #868 Docs YAML frontmatter — frontmatter is only recognised when the fenced block parses to a YAML mapping, so a document opening with a thematic break is no longer hidden; the blank line after frontmatter survives a save; rename gates on the parsed title; only a title-matching heading is dropped from the preview. - #869 remark-directive colons — rewrite narrowed to text directives, containers left on the previous path, literal merged into an adjacent text node, plus a regression test for "Meeting at 9:30 and 10:45 today." - #865 Project machine picker — the single-machine gate counts connected machines, a loading host list is not treated as single-machine, the all-offline state blocks submit, and the target host is a required parameter. - #870 Skill dedup logs — the injected-skills test logger captures debug so the three precedence assertions work against the demoted level. Verified with the full app, server, and docs-plugin suites plus a live QA pass against a running dev instance. Co-authored-by: Ali Madad <ali@scty.org> Co-authored-by: Bhuvan Singla <bhuvansingla2000@gmail.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Problem
remark-directive (enabled for plugin directives like
::inline-vis{...}) also parses inline:nameand block:::namedirectives. So any colon before a letter or digit —9:30,key:value,:D— became a directive node.remarkMessageDirectives only handled leaf (
::name) directives. Text and container directives fell through to mdast-util-to-hast, which renders an unknown directive as an empty<div>. Inside a paragraph, that block element split the line and dropped the directive's text:Fix
Handle all three directive kinds. Leaf directives mount as before; text and container directives are rewritten back to their literal source (text inline, container as a paragraph).
Display-only change — the persisted message text was already correct.
Tests
9:30,a:b,:Drenders verbatim in a single<p>, no injected block element (fails before the fix, passes after).:::notecontainer renders as literal source text.reconstructDirectiveSourceuses the right marker per kind (:/:::).