Polish chat TUI readability - #64
Merged
Merged
Conversation
brownie-ricon
requested changes
Jul 4, 2026
brownie-ricon
left a comment
Contributor
There was a problem hiding this comment.
Adversarial review: I found one real edge case in the list-continuation path.
Change request
-
lib/tui/render/wrapping.py:283treats any indented non-boundary line after a list item as a prose continuation of that list item. That works for hanging-indent wraps, but it also collapses deeper indented literal blocks/code examples into the bullet text. For example, a chat message like:- Here is output: indented code line should stay separate second linecurrently renders as:
- Here is output: indented code line should stay separate second lineThat is a regression from the old
is_markdownishbehavior for indented lines, and it hurts the TUI reading surface for exactly the common “bullet + pasted output/command block” shape.
Stress tests performed
- Ran the full production-ish test path:
mise run test. - Ran generated docs/lint checks:
mise run readme -- --check,mise exec -- codebase lint. - Exercised the real TUI view task coverage already in
test/tasks.bats, including--no-justify,--justify-style greedy, balanced justification,--no-header-separator,--message-padding 0,--color never, andNO_COLORbehavior. - Manually rendered a bullet followed by deeper indented literal lines through
lib/tui/render-messages; that exposed the collapse above.
Surviving concerns
- I did not find another blocker in the renderer split, ANSI reset/color handling, CLI escape hatches, or CI/non-TTY paths. The task-level tests do hit the actual
chat tui:view --once/lib/tui/render-messagesproduction path, not only helper internals, which is good.
Disposition
Requesting changes for the indented-block/list regression; #65 is the proposed fix. 🥐
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
This PR turns the chat TUI into a more readable message surface:
jq | foldpipeline--no-justify,--justify-style greedy,--no-header-separator,--message-padding 0,--color neverValidation
mise run testmise run readme -- --checkmise exec -- codebase lintgit pre-pushreturned WARN only because the local branch had no upstream before pushing; all five local commits have good Quick GPG signatures and the working tree was clean.Notes
This intentionally does not include Ghostty/font integration. We discussed that as a future idea but punted it because it would either affect global Ghostty config or require a separate launcher/config integration.