Skip to content

Add classic and spacious TUI layouts - #354

Open
TyRichards wants to merge 3 commits into
basecamp:mainfrom
TyRichards:feature/tui-layout-style
Open

Add classic and spacious TUI layouts#354
TyRichards wants to merge 3 commits into
basecamp:mainfrom
TyRichards:feature/tui-layout-style

Conversation

@TyRichards

@TyRichards TyRichards commented Aug 28, 2026

Copy link
Copy Markdown

Summary

  • keep the current edge-to-edge TUI as the default classic layout
  • add hey tui spacious with vertical breathing room around content, between mail rows, and around section headers
  • streamline the spacious footer while preserving the full terminal width
  • let readers switch live with Ctrl+G and collapse the added spacing automatically on narrow terminals
  • reject layout arguments for --remote, which opens an already-running TUI

Demo

Switching between classic and spacious TUI layouts

Testing

  • make fmt-check vet tidy-check check-surface check-release-lockstep
  • golangci-lint run ./...
  • make test

@TyRichards
TyRichards force-pushed the feature/tui-layout-style branch from 995f96d to 4c8ae9a Compare August 28, 2026 04:37
@TyRichards
TyRichards marked this pull request as ready for review August 28, 2026 06:07
@TyRichards
TyRichards requested a review from a team as a code owner August 28, 2026 06:07
Copilot AI balanced review requested due to automatic review settings August 28, 2026 06:07

Copilot AI 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.

Pull request overview

Adds selectable classic and spacious TUI layouts with runtime switching and responsive spacing.

Changes:

  • Adds layout selection and Ctrl+G toggling.
  • Introduces spacious content, row, header, and footer spacing.
  • Documents and tests layout behavior.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
README.md Documents layout selection and switching.
internal/cmd/tui.go Parses and validates layout arguments.
internal/cmd/root_test.go Tests CLI layout selection.
internal/tui/layout.go Defines layouts and responsive metrics.
internal/tui/layout_test.go Tests layout rendering and toggling.
internal/tui/tui.go Integrates layout sizing and switching.
internal/tui/tui_test.go Adds Ctrl+G test input support.
internal/tui/content.go Adds spacing between mail rows and sections.
internal/tui/mail.go Applies layout gaps to mail lists.
internal/tui/toast.go Sizes toasts against content width.
internal/tui/section_view.go Shares layout metrics with views.
internal/tui/accounts.go Sizes account modals to content width.
internal/tui/accounts_test.go Updates model construction calls.

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

Comment thread internal/tui/content.go
Comment on lines +405 to +410
func (c *contentList) effectiveItemGap() int {
if c.height < 3 {
return 0
}
return c.itemGap
}
Comment thread internal/tui/tui.go
Comment on lines +865 to +867
if key == "ctrl+g" && m.canToggleLayout() {
return m.toggleLayout()
}
Comment thread internal/cmd/tui.go
Comment on lines +62 to +64
if remote && len(args) == 1 {
return apierr.ErrUsage("a layout cannot be selected when opening an existing TUI with --remote")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants