Add classic and spacious TUI layouts - #354
Open
TyRichards wants to merge 3 commits into
Open
Conversation
TyRichards
force-pushed
the
feature/tui-layout-style
branch
from
August 28, 2026 04:37
995f96d to
4c8ae9a
Compare
Contributor
There was a problem hiding this comment.
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 on lines
+405
to
+410
| func (c *contentList) effectiveItemGap() int { | ||
| if c.height < 3 { | ||
| return 0 | ||
| } | ||
| return c.itemGap | ||
| } |
Comment on lines
+865
to
+867
| if key == "ctrl+g" && m.canToggleLayout() { | ||
| return m.toggleLayout() | ||
| } |
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") | ||
| } |
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
classiclayouthey tui spaciouswith vertical breathing room around content, between mail rows, and around section headers--remote, which opens an already-running TUIDemo
Testing
make fmt-check vet tidy-check check-surface check-release-lockstepgolangci-lint run ./...make test