Skip to content

feat: widen tables to 100 columns so the detail column is readable - #90

Merged
eschizoid merged 1 commit into
mainfrom
feat/wider-tables
Aug 8, 2026
Merged

feat: widen tables to 100 columns so the detail column is readable#90
eschizoid merged 1 commit into
mainfrom
feat/wider-tables

Conversation

@eschizoid

Copy link
Copy Markdown
Owner

Why

render_table keeps the whole table inside a budget by squeezing the single widest column. That column is always the free-text one — detail on the plan, the workout name elsewhere — so every column the budget spends elsewhere comes straight out of the text actually worth reading.

At 80 the plan wrapped detail at roughly 17 characters:

│ Sun │ 2026-08-09 │ strength  │ open    │ Strength — UPPER │ 23 │
│     │            │           │         │ BODY ONLY,       │    │

At 100:

│ Sun │ 2026-08-09 │ strength  │ open    │ Strength — UPPER BODY ONLY, ~45min, moderate       │ 23 │
│     │            │           │         │ effort. No squats, lunges, deadlifts or anything   │    │

Fixed, not adaptive

Deliberately not read from $COLUMNS. It would look nicer per-terminal and make output environment-dependent, which breaks the e2e assertions that pin exact layout — including the one catching a progress bar wrapped mid-bar.

One test changed

The width expect hard-coded <= 80, so it failed on a change that was purely the number moving. It now asserts <= Render.max_total, expressing the invariant rather than repeating the constant. Everything else passes untouched: 202 e2e checks green, including the bar-never-wraps and marker-placement assertions that are most sensitive to width.

render_table squeezes the single widest column to fit its budget, and
that column is always the free-text one — so every column the budget
spent elsewhere came straight out of the workout description, the part
actually worth reading. Plan rows were wrapping detail at ~17 characters.

Fixed rather than read from $COLUMNS on purpose: env-dependent output
would make the e2e layout assertions unreproducible.

The width expect now asserts against the constant instead of a literal
80, which is why it failed on a change that was purely the number moving.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR increases Render.render_table’s fixed maximum table width from 80 to 100 display columns so the widest free-text column (e.g., detail / workout names) is less aggressively squeezed and wraps less, improving readability while keeping output deterministic for e2e layout assertions.

Changes:

  • Increase Render.max_total from 80 → 100 and expand the rationale in the module comment (including why it is intentionally not $COLUMNS-adaptive).
  • Update the table-width test to assert against Render.max_total instead of hard-coding <= 80.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@eschizoid
eschizoid merged commit 308b0f6 into main Aug 8, 2026
11 checks passed
@eschizoid
eschizoid deleted the feat/wider-tables branch August 8, 2026 22:53
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.

2 participants