feat(tui): restyle board press CTA as a bordered chip#184
Conversation
Swap the board's primary "press" call-to-action from a flat, borderless white pill to a bordered chip (no background fill) so it matches the pinned-card border treatment and reads as a real button. Avoid the border + background-fill combo, which previously produced a visible render gap where the border met the fill on some terminals. Layout updated to match: footerHeight 1->3 (border adds top/bottom rows) and the press width recomputed as label + padding + border. ActionPrimaryDisabled gets a muted border instead of a chip fill. Regenerate the 7 affected board/footer golden snapshots. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthrough
ChangesBordered press chip
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
internal/tui/board.go (1)
904-905: ⚡ Quick winDerive press hitbox width from rendered style instead of hardcoding constants.
pressW := 5 + 4 + 2duplicates style assumptions (label length, padding, border). IfActionPrimarypadding/border or label text changes, click hit-testing can drift from what users see.Suggested change
- // Press chip width = label("press" = 5) + padding(4) + border(2). - pressW := 5 + 4 + 2 + // Keep hitbox in sync with the rendered chip style. + pressW := lipgloss.Width(m.styles.ActionPrimary.Render("press"))🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@internal/tui/board.go` around lines 904 - 905, The pressW variable is hardcoded with magic number constants (5 + 4 + 2) that duplicate style assumptions about label length, padding, and border from the ActionPrimary style. Instead of hardcoding these values, derive the pressW width from the actual rendered style by calculating it from the ActionPrimary component's dimensions after rendering or by extracting the width from the style configuration directly. This ensures hit-testing remains synchronized with the actual visual appearance of the element.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@internal/tui/board.go`:
- Around line 904-905: The pressW variable is hardcoded with magic number
constants (5 + 4 + 2) that duplicate style assumptions about label length,
padding, and border from the ActionPrimary style. Instead of hardcoding these
values, derive the pressW width from the actual rendered style by calculating it
from the ActionPrimary component's dimensions after rendering or by extracting
the width from the style configuration directly. This ensures hit-testing
remains synchronized with the actual visual appearance of the element.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 46a565b7-ef18-4a59-8a53-65edd3d4077b
📒 Files selected for processing (9)
internal/tui/board.gointernal/tui/styles.gointernal/tui/testdata/board_argform_open.goldeninternal/tui/testdata/board_empty.goldeninternal/tui/testdata/board_logs_pane_empty.goldeninternal/tui/testdata/board_pinned_active.goldeninternal/tui/testdata/board_pinned_row_focused.goldeninternal/tui/testdata/board_populated_cursor_on_list_1.goldeninternal/tui/testdata/logs_tailing.golden
What
Restyles the board's primary press call-to-action from a flat, borderless white pill to a bordered chip (no background fill), so it matches the pinned-card border treatment and reads as a real button.
Before / after (golden snapshot):
Why
Changes
styles.go:ActionPrimary→ primary-foreground +NormalBorder()(no bg fill), padding0,2.ActionPrimaryDisabled→ muted border instead of a chip background.board.go:footerHeight1 → 3 (border adds top/bottom rows); press width recomputed as label + padding + border.Testing
go build✅go test ./...✅ (full suite green, including regenerated TUI snapshots)go vet ./internal/tui/...✅🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes