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

@TyRichardsTyRichards 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
TyRichardsforce-pushed the feature/tui-layout-style branch from 995f96d to 4c8ae9aCompareAugust 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 ownerAugust 28, 2026 06:07
CopilotAI balanced review requested due to automatic review settings August 28, 2026 06:07

CopilotAI 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
FileDescription
README.mdDocuments layout selection and switching.
internal/cmd/tui.goParses and validates layout arguments.
internal/cmd/root_test.goTests CLI layout selection.
internal/tui/layout.goDefines layouts and responsive metrics.
internal/tui/layout_test.goTests layout rendering and toggling.
internal/tui/tui.goIntegrates layout sizing and switching.
internal/tui/tui_test.goAdds Ctrl+G test input support.
internal/tui/content.goAdds spacing between mail rows and sections.
internal/tui/mail.goApplies layout gaps to mail lists.
internal/tui/toast.goSizes toasts against content width.
internal/tui/section_view.goShares layout metrics with views.
internal/tui/accounts.goSizes account modals to content width.
internal/tui/accounts_test.goUpdates model construction calls.

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

Comment on lines +405 to +410
func (c *contentList) effectiveItemGap() int {
if c.height < 3 {
return 0
}
return c.itemGap
}
Comment threadinternal/tui/tui.go
Comment on lines +865 to +867
if key == "ctrl+g" && m.canToggleLayout() {
return m.toggleLayout()
}
Comment threadinternal/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 freeto 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

@TyRichards