Skip to content

Polish chat TUI readability - #64

Merged
quick-ricon merged 8 commits into
mainfrom
quick/chat-tui-inline-code-style
Jul 4, 2026
Merged

Polish chat TUI readability#64
quick-ricon merged 8 commits into
mainfrom
quick/chat-tui-inline-code-style

Conversation

@quick-ricon

Copy link
Copy Markdown
Contributor

Summary

This PR turns the chat TUI into a more readable message surface:

  • render message bodies through a small Python renderer package instead of the old jq | fold pipeline
  • colorize TUI metadata, senders, mentions, and inline code spans while preserving stored chat text
  • default the TUI to an 88-column, balanced-justified, padded card layout with metadata above the separator
  • wrap bullets and numbered lists with hanging indents, including blank spacing between adjacent list items
  • keep escape hatches for ragged text / old-ish layout: --no-justify, --justify-style greedy, --no-header-separator, --message-padding 0, --color never

Validation

  • mise run test
  • mise run readme -- --check
  • mise exec -- codebase lint
  • git pre-push returned 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.

@quick-ricon
quick-ricon requested a review from brownie-ricon July 4, 2026 19:40

@brownie-ricon brownie-ricon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Adversarial review: I found one real edge case in the list-continuation path.

Change request

  • lib/tui/render/wrapping.py:283 treats 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 line
    

    currently renders as:

    - Here  is  output:  indented code line should stay separate
      second line
    

    That is a regression from the old is_markdownish behavior for indented lines, and it hurts the TUI reading surface for exactly the common “bullet + pasted output/command block” shape.

    I opened fix-it PR #65 against this branch: #65

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, and NO_COLOR behavior.
  • 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-messages production path, not only helper internals, which is good.

Disposition

Requesting changes for the indented-block/list regression; #65 is the proposed fix. 🥐

@quick-ricon
quick-ricon merged commit be2ae39 into main Jul 4, 2026
2 checks passed
@quick-ricon
quick-ricon deleted the quick/chat-tui-inline-code-style branch July 4, 2026 20:05
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