Skip to content

Card copy is discarded, not wrapped, below 28 columns #75

Description

@bmethod

Source: Codex review of #74, thread on src/ui/home.tsx, 2026-09-13.
Reached by: opening a card on a terminal narrower than 28 columns.
Expected delta: 40 lines, 80 test lines

Card copy is thrown away instead of wrapped on a terminal narrower than 28 columns. detailWidth keeps a 20-column floor, while the screen padding and the expansion indent leave only width - 8 columns to draw in. #74 pre-wraps card copy at the measured width and draws each row with truncate, so every character past the real edge is discarded with nothing saying so. A description, the step to take, or the command the reader is invited to run comes back incomplete and looks whole.

Before #74 the renderer wrapped those lines, so the text survived. The floor itself is the same defect tracked in #71: a measured width that is not the drawn width. This is its new consequence.

Requirements

  • Never measure wider than the card can draw. detailWidth returns the real drawable width, and any floor is a floor on that width rather than a number above it.
  • A cut stays visible: text that does not fit ends in the mark, and no row is shortened without one.
  • Tests: at 24 and 20 columns every drawn row of an open card is whole or ends in the mark, and the command is never silently shortened. Each check fails against the current code.

Context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions