refactor: remove 4-col outer margin from cat and TUI#8
Merged
Conversation
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>
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.
Summary
MARGIN/MARGIN_WIDTH4-column outer indent that cat andTUI body rows shared (originally mirrored
glow). With TUI as thedefault mode it cost 4 cols of real estate for no remaining gain.
content now starts at column 0.
TOC_PANEL_WIDTHconstant insrc/tui/mod.rs(was a magic30literal in three places).wrap_and_write(drop the unusedsuffixparameter and thedead
term_width == 0guard) and inlineprefix_visual_width.Update — 2026-05-22section to three design docsthat referenced
MARGIN_WIDTH, without editing the historicalcontent.
Test plan
make checkpasses (fmt-check + clippy-D warnings+ 73 lib +9 CLI + 5 snapshot tests).
output — only the 4-col leading prefix removed and wrap points
shift later (extra usable width).
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