Skip to content

feat(tui): inline code on the surface, underlined links, packed style attributes (U2) - #102

Merged
lg2m merged 1 commit into
mainfrom
feat/eng-848-u2-inline-styling
Sep 21, 2026
Merged

lg2m merged 1 commit into
mainfrom
feat/eng-848-u2-inline-styling

Conversation

@lg2m

@lg2m lg2m commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

U2: inline code on the surface, underlined links, packed style attributes

Spec: docs/plans/tui-redesign.md#s3-markdown-blocks-markdownrs (inline rows) Linear: ENG-848 (parent ENG-843)

Follows #95 (U1, merged). Targets main.

What changed

  • Inline code is text on the surface tint (render::inline_code), no longer bold warning. A name in prose now shares the code panel's voice.
  • Link text is accent + underline (render::link), pushed on the markdown style stack for the link's extent. URL still dropped, no OSC 8.
  • Inline/display math is muted (was warning). Footnote refs stay accent.
  • Style gains underline. Design decision: adding it as a fourth bool measured +5 % on streaming_run_on_32kb (3 paired A/B runs on a pinned core: 452 → 475 µs; Style is copied and compared per span in wrap and diff). Attributes are now one packed Attributes(u8); Style is 9 bytes (pinned by style_stays_nine_bytes) and the same bench is −4 % vs base. write_line derives "attribute dropped → SGR 0" and "attribute added" from bit differences, one comparison each.

How verified

  • cargo test --workspace, fmt, clippy -D warnings
  • New: underline_is_emitted_once_and_cleared_by_a_reset (byte-level write_line), inline_code_is_plain_text_on_the_surface, link_text_is_underlined_accent_and_the_url_is_dropped, footnote_references_are_accent_and_math_is_muted, style_stays_nine_bytes. 270 lib + 5 golden.
  • Goldens unchanged: this slice is color/attribute only and goldens are plain text.

Measurements (target/qq-perf/tui-U2-2026-09-20/after.txt, pinned core)

Gate Before (U1) After Budget
steady_state_frame 21.9 µs 21.5 ±5 %
streaming_focused 35.4 33.9 ±5 %
streaming_run_on_32kb 452 434 ±5 %
golden_path 39.4 39.0 ±5 %
keystroke 27.0 26.6 ±5 %

Docs

  • docs/design/transcript.md: inline code bullet amended; new § Inline Styling. Ledger receipt.

Compatibility

  • PROTOCOL / DESCRIPTOR / schema: unchanged.

… attributes (U2)

Slice U2 of docs/plans/tui-redesign.md (ENG-848), stacked on U1.

Inline code renders as text on the panel surface instead of bold warning;
link text is accent and underlined (URL still dropped, no OSC 8); math is
muted. Footnote references stay accent.

Style gains underline. Adding it as a fourth bool measured +5 % on the
32 KiB streaming ceiling (Style is copied and compared per span in wrap
and diff), so bold/dim/italic/underline are now one packed byte; Style is
9 bytes and the same bench is 4 % faster than before the slice.
write_line derives attribute resets and additions from bit differences.

Four new tests including a byte-level write_line check for underline
on/off. Goldens unchanged (plain text).
@lg2m

lg2m commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator Author

Linear: ENG-848. Stacked: #100 (U3) targets this branch, #101 (U9) targets #100. Retarget each to main as the one below merges.

@lg2m
lg2m added this pull request to stack #105 September 21, 2026 19:40
@lg2m
lg2m merged commit c045e59 into main Sep 21, 2026
4 checks passed
@lg2m
lg2m deleted the feat/eng-848-u2-inline-styling branch September 21, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant