Skip to content

refactor: remove 4-col outer margin from cat and TUI#8

Merged
rrbe merged 1 commit into
masterfrom
refactor/remove-margin-indent
May 22, 2026
Merged

refactor: remove 4-col outer margin from cat and TUI#8
rrbe merged 1 commit into
masterfrom
refactor/remove-margin-indent

Conversation

@rrbe
Copy link
Copy Markdown
Owner

@rrbe rrbe commented May 22, 2026

Summary

  • Drop the MARGIN / MARGIN_WIDTH 4-column outer indent that cat and
    TUI body rows shared (originally mirrored glow). With TUI as the
    default mode it cost 4 cols of real estate for no remaining gain.
  • Cat-mode table rows also lose their extra 2-col inset so all body
    content now starts at column 0.
  • Hoist TOC_PANEL_WIDTH constant in src/tui/mod.rs (was a magic
    30 literal in three places).
  • Tighten wrap_and_write (drop the unused suffix parameter and the
    dead term_width == 0 guard) and inline prefix_visual_width.
  • Append a dated Update — 2026-05-22 section to three design docs
    that referenced MARGIN_WIDTH, without editing the historical
    content.

Test plan

  • make check passes (fmt-check + clippy -D warnings + 73 lib +
    9 CLI + 5 snapshot tests).
  • Snapshot fixtures regenerated and diffed against pre-change
    output — only the 4-col leading prefix removed and wrap points
    shift later (extra usable width).
  • Eyeball in Ghostty / iTerm2: verify TUI body text isn't visually
    too close to the left edge and heading images still align with
    body text at column 0 / column 30 (with ToC open).

🤖 Generated with Claude Code

The MARGIN / MARGIN_WIDTH gutter originally mirrored glow's output.
With TUI as the default mode it cost 4 cols of horizontal real estate
for no remaining visual gain. Cat-mode table rows also lose their
extra 2-col inset so all body content aligns at column 0.

Hoist TOC_PANEL_WIDTH while in the area (was a magic 30 in three
places). Snapshot fixtures regenerated; existing design docs get a
dated "Update — 2026-05-22" appendix rather than in-place edits.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rrbe rrbe merged commit 2a10469 into master May 22, 2026
5 checks passed
@rrbe rrbe deleted the refactor/remove-margin-indent branch May 22, 2026 01:56
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