Skip to content

feat(tui): editorial emphasis hues and airy transcript rhythm - #656

Merged
mohitranka merged 1 commit into
mainfrom
feat/ui-spacing-emphasis
Sep 12, 2026
Merged

mohitranka merged 1 commit into
mainfrom
feat/ui-spacing-emphasis

Conversation

@mohitranka

Copy link
Copy Markdown
Contributor

Problem

The conversation reads flat: **strong** and *emphasis* were weight-only and shared the body colour, every transcript block used the same single blank line, hover was a ~7% lift that was easy to miss, and the navigator tabs had no hover at all despite being clickable.

Changes

  • Editorial emphasis — new md_strong / md_emph palette tokens (optional in theme TOML with a text_primary fallback for existing user themes). **strong** renders orange bold, *emphasis* greenish-yellow italic. Prose-only: never chrome, status, diffs, code, or composer. Weight/style remain the fallback so emphasis survives monochrome terminals and terminals without italics.
  • Transcript density — Density::{Airy, Compact} in the markdown renderer. Airy (the app default at comfortable heights) adds one blank row before section headings, after heading rules, between list items, and around fenced code. Compact is the fallback when the conversation pane is shorter than AIRY_MIN_ROWS (24), so the enforced 80×18 minimum keeps its content budget. Density is part of the StreamMarkdownCache key alongside width.
  • Hover affordances — surface_hover lifted (#292929 → #2E2E2E dark, #E2E2E2 → #D4D4D4 light) so it clearly differs from selection; navigator tabs gain a hover ground plus a leading › marker. Click and hover now share navigator_tab_at, so the hit boundary cannot disagree. Queue/background rows intentionally stay hover-free — they are not clickable.
  • FORGE-DESIGN.md — resolved the two conflicts: orange is the only orange state marker (prose emphasis may share the family but never appears in chrome/status), and italics are allowed for model-prose emphasis with the modifier never the sole signal. Added §7.5.1 density, updated §5/§5.2/§6/§8.6/§9.4/§10.

Tests

  • strong_and_emphasis_take_their_editorial_hues, airy list/heading/code rhythm tests, editorial_emphasis_accessors_expose_theme_tokens, hovered_inactive_tab_takes_the_hover_ground, emphasis-token fallback for older themes.
  • PTY check at 120×40 confirms orange bold and yellow-green italic in ANSI output; 80×18 confirms compact fallback with layout intact.

Validation

  • forge-config theme 22, forge-tui markdown 51, conversation 94, navigator 6, mouse 21, design 1, theme 47, app::tests 420, render_perf 6, visual_test 24 — all pass
  • cargo fmt --all -- --check, cargo clippy --workspace --all-targets --locked -- -D warnings clean
  • cargo build --release --locked --package forge-cli OK

The conversation read flat: strong and emphasis were weight-only, every
transcript block used one identical blank line, hover was a barely
visible 7% lift, and the navigator tabs had no hover at all.

- Add md_strong/md_emph theme tokens (optional, text_primary fallback):
  orange bold for **strong**, greenish yellow italic for *emphasis*,
  prose-only and never in chrome, status, diffs or code.
- Add transcript density: airy (default) puts one blank row before
  section headings, after heading rules, between list items and around
  fenced code; compact stays the fallback below AIRY_MIN_ROWS (24) so
  80×18 keeps its content budget. Density joins the stream cache key.
- Lift surface_hover so hover reads as a pointer affordance, and give
  navigator tabs a hover ground plus leading marker, sharing the click
  boundary calculation so hover and click can never disagree.
- Resolve FORGE-DESIGN conflicts: orange is the only orange state
  marker (prose emphasis may share the family); italics are allowed for
  model-prose emphasis with the modifier never the sole signal.

Tests: emphasis hue assertions, airy list/heading/code rhythm, tab
hover ground and marker, theme token accessors.
@mohitranka
mohitranka merged commit e29e34c into main Sep 12, 2026
3 checks passed
@mohitranka
mohitranka deleted the feat/ui-spacing-emphasis branch September 12, 2026 12:27
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