Skip to content

Sonny: reply rows rewrapped narrower than they were laid get a 4-column lead and lose quote bars #486

Open

Description

@lydakis

Found while fixing the decision card's broken bar (ask composer polish PR).

When the conversation is drawn narrower than a row was laid (the margin opens, or the window shrinks), Screen rewraps any row that did not wrap at lay time with a default " " lead (screen.rs, row.rest.unwrap_or(...)). Decision cards now carry their own hanging lead (Mark::Hangs). Replies still don't, which causes two problems:

  • Reply prose continues at column 4 instead of 2 (• A reply that… / window gets narrower).
  • A quote (▌ ) rewrapped this way loses its bar on the continued rows. Quotes that wrap at lay time keep their bar as of the ask PR.

Fix: give reply rows the same Mark::Hangs, computed where the Markdown renderer knows each row's continuation lead (Markdown::rest()). Codex avoids the problem by laying history cells out again at the new width rather than rewrapping them.

Repro: transcript::reply("…long…\n\n> …long quote…", 100, …) pushed to a Screen rendered at 50 columns.

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

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions