feat(tui): TUI personality — Tier 1 (window title, spinner indicators, status bar, gradient logo)#44
Merged
Merged
Conversation
added 4 commits
June 26, 2026 17:58
Phase 1 of tui-personality (Tier 1a):
- model.go: add titleForScreen(m) pure helper mapping each screen to a
'bak — {Screen}' title; set v.WindowTitle (declarative tea.View field,
v2 API) in View(). Progress appends the live step counter ('bak — Backup
3/7'); Restore appends the selected backup id.
- progress.go: the running step row now renders m.spinner.View() (live
rotating frame) instead of the static '⠹' glyph; done=✓, pending=○
unchanged. Store Current/Total for the window title counter.
- health.go: add a spinner.Model field; Init() returns spinner.Tick;
propagate spinner.TickMsg (animate while running, stop when idle);
running check row uses m.spinner.View().
- wizard.go: set v.WindowTitle = 'bak — Wizard' on every View branch.
REQ-TP-001, REQ-TP-002. All TDD red/green; full TUI suite green.
NO-VERIFY: GGA pre-commit failed with 'Argument list too long' (ARG_MAX,
exit 126) on the 8-file diff — a documented GGA technical limitation per
AGENTS.md. Code reviewed against AGENTS.md rules manually (Go idioms, error
wrapping, package-level styles, v2 API, table-driven tests). Tests + go vet
pass. Follow-up: re-run GGA on smaller slices if needed.
Phase 2 of tui-personality (Tier 1b): - components/statusbar.go: stateless RenderStatusBar(width, version, preset, path) hidden below 40 cols; path truncated with ellipsis. Styled with package-level StatusBarStyle (Rose Pine ColorSubtle). - styles/screens.go: add StatusBarStyle package-level var. - styles/logo.go: 5 fixed Foreground styles -> lipgloss.Blend1D gradient (Love->Gold->Rose->Pine->Lavender); settable colorProfile var falls back to plain text (no ANSI) on NoTTY/Ascii profiles. - model.go: renderContent appends the status bar at the bottom of every screen; deps.go adds Preset/BackupPath; cmd/root.go populates them best-effort (config.DefaultPreset + backup.BakDir). - wizard.go: extract wizardView helper (funlen). model.go: extract progressTitle/restoreTitle (gocyclo). REQ-TP-003, REQ-TP-004. TDD red/green; coverage 83-96% per TUI package; golangci-lint clean. NO-VERIFY: GGA pre-commit failed with 'Argument list too long' (ARG_MAX, exit 126) on the 10-file diff -- a documented GGA technical limitation per AGENTS.md. Code reviewed against AGENTS.md rules manually. go test ./..., go vet, and golangci-lint run all pass clean.
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.
Part 1 of 3 of the tui-personality SDD change. This is the foundational, render-only personality layer (~150 lines of behavior) — no state-machine or architectural changes. All additive, testable as pure
Update/Viewfunctions per AGENTS.md TUI rules.What's in this PR (Tier 1)
Phase 1 — Window title + spinning step indicators
tea.View.WindowTitledeclaratively —bak — Main Menu,bak — Backup 3/7(live step counter on running progress),bak — Restore:abc1234(selected id), plus Wizard/Settings/Cloud/Health/Profiles/Backups/Welcome/Shortcuts. Uses the v2View.WindowTitlefield, not the removedtea.SetWindowTitlecommand.m.spinner.View()(the live rotating frame) instead of the static⠹/⣹glyph. Health gained its ownspinner.Model(mirrors progress). Done =✓, pending =○unchanged.Phase 2 — Status bar + gradient logo
components.RenderStatusBar(width, version, preset, path)appended at the bottom of every screen. Hidden below 40 cols; backup path truncated with ellipsis to fit. Styled with a package-levelStatusBarStyle.DepsgainedPreset/BackupPath;cmd/root.gopopulates them best-effort.styles/logo.gonow useslipgloss.Blend1D(Love→Gold→Rose→Pine→Lavender) and falls back to plain text (no ANSI) on no-color profiles.Verification
go test ./...green;go vet ./...clean;golangci-lint run0 issues.Notes / deviations
Blend1D+ color profile (resolves a design open question): verifiedlipgloss.Blend1D(steps, stops...)and thatStyle.Renderdoes not downsample at render time — downsampling is renderer-level. SoRenderLogoconsults a settable package-levelcolorProfile(default TrueColor) for an explicit, unit-testable no-color branch; the bubbletea renderer remains the production safety net.tea.SetWindowTitledoes not exist in bubbletea v2.0.7 — used theView.WindowTitlefield instead (design Decision 1).ScreenWizardin the main Model); itsWizardModel.ViewsetsWindowTitle = "bak — Wizard"directly.Argument list too long(ARG_MAX) on both feat commits — a documented GGA limitation. Bypassed with--no-verify+NO-VERIFY:reason per AGENTS.md;go test,go vet, andgolangci-lintall pass clean.Stacked-PR plan
Per tasks.md (stacked-to-main): PR 1 (this — Tier 1) → PR 2 (Tier 2: viewport dry-run, mouse nav, styled empty states) → PR 3 (Tier 3: paste support). PR 2 will base on
mainafter this merges.Spec
SDD change artifacts (proposal, spec, design, tasks, delta specs) are included in this PR under
openspec/changes/tui-personality/.