Charmbracelet lipgloss UI matching tapes cliui#26
Conversation
Replace raw ANSI escape codes with charmbracelet/lipgloss styling. Adds Step() spinner, styled tables, and ANSI 256 color palette matching the tapes CLI (pkg/cliui).
|
No docs update needed. This PR is a visual/cosmetic refactor that replaces raw ANSI escape codes with charmbracelet/lipgloss styling. The changes affect terminal output appearance only:
No CLI commands, flags, configuration options, or user-facing behavior is changed. The existing README.md remains accurate. PR #26 was opened: Charmbracelet lipgloss UI matching tapes cliui |
- Warn() now colors the full message yellow (not just the ! mark) - Root error handler uses ui.Error() for red ✗ styled output - init command messages match tapes mock wording
- Step() skips spinner animation when output is not a TTY (piped/CI) - Fix shortenHome to use strings.HasPrefix/TrimPrefix - Style version command with ui.Label() for colored output - Add 9 unit tests for Mark, FormatDuration, StateStyle, Table, Step, padRight - Promote charmbracelet/x/term to direct dep for term.IsTerminal
jpmcb
left a comment
There was a problem hiding this comment.
Very very nice: I was thinking we'd want this.
to match the tapes CLI (
pkg/cliui) patterns
I wonder if there's enough here that we'll keep re-using that we hoist up into it's own papercomputeco/cliui package (maybe at least the ANSI colors and sane defaults so the "vibe" is all the same across these tools). I can always pick that up and refactor when this gets in.
Let me know when this is ready to review, excited to get some sexy UI in! 💅🏼
Resolve conflicts: client moved to pkg/daemon/client, EnsureDaemon extracted. Keep lipgloss UI changes + new import paths.
I think |
By the power of Nix, way ahead of you!!! 😂 https://github.com/papercomputeco/skills |
CI was failing because golangci-lint v2 requires a version field.
Explicitly discard fmt.Fprint* return values writing to terminal output.
| paths: | ||
| - third_party$ | ||
| - builtin$ | ||
| - examples$ |
There was a problem hiding this comment.
What's this new golangci lint doing? Fine if we upgrade to version: 2, but unsure what these third_party, builtin, and examples path exclusions are
Summary
Replaces raw ANSI escape codes with charmbracelet/lipgloss styling to match the tapes CLI (
pkg/cliui) patterns — braille dot spinner, ANSI 256 color palette,Step()with elapsed time, styled tables with color-coded state.Commands updated
Screenshots needed for each:
mb upmb downmb pull <name>mb list/mb lsmb status --allmb mixtapes lserrors
Test plan
go run . up— braille spinner, ✓ with elapsed time, dim SSH info with~pathgo run . down— single Step() spinnergo run . destroy— confirmation prompt + Step() spinnergo run . pull opencode-mixtape— Step() spinner for pullgo run . list— styled table, bold headers, green names, colored statego run . status --all— same styled tablego run . mixtapes ls— styled table (no state column)Continue Tasks: 🔄 1 running — View all