feat(desktop): style structured agent reply labels in the message renderer - #5162
feat(desktop): style structured agent reply labels in the message renderer#5162launchmaniac wants to merge 1 commit into
Conversation
…derer Add rehypeStructuredReplyLabels, a presentation-only rehype plugin that gives the fixed labels of a structured agent reply the semantic --primary accent and font-bold weight. It is gated on the exact labelled envelope (seven top-level labels in canonical order plus the three ANSWER sub-labels), styles only those labels at line-leading positions, skips code/links/quotes, and never alters the stored message text. Wired into the single markdown parse choke point (buildMarkdownElement). Signed-off-by: launchmaniac <213248306+launchmaniac@users.noreply.github.com>
|
@block/buzz-oss-team — requesting a review when you have a moment. Scope: desktop renderer only, three files — a new presentation-only rehype plugin ( Local gates (all green): 12/12 focused unit tests, 4492/4492 full desktop unit suite ( Visible checks passing: DCO Check and zizmor. CI and Desktop Release Candidate are fork-gated ( After merge, Thanks! |
|
Withdrawing this submission because the renderer behavior does not meet the expected result. No merge or release was produced. |
Summary
Some agents reply in a fixed, labelled envelope — a status line, an answer block
(broken into "what it is / why it matters / done when"), a source, a confidence,
a next action, an owner, and a blocker/escalation line. This adds a small,
presentation-only rehype plugin (
rehypeStructuredReplyLabels) that gives thoselabels the existing
--primaryaccent andfont-boldweight so the structurereads at a glance.
It is deliberately narrow and safe:
appear line-leading, in the canonical order). Ordinary prose and other
messages are untouched.
are never styled; it never descends into
code/pre/a/blockquote.for display in the HAST phase, the same place as
rehypeSearchHighlight.into the single markdown parse choke point (
buildMarkdownElement).Related issue
none found
Testing
rehypeStructuredReplyLabels.test.mjs, 12 cases):all ten labels styled; values unstyled; visible text byte-for-byte unchanged;
false positives rejected (lone/mid-line label, out-of-order, partial envelope,
label inside inline code, envelope quoted in a blockquote); ordinary Markdown
(bold/list/link) unchanged.
pnpm test(4492/4492),pnpm typecheck, andbiome checkall pass.