Skip to content

Conversation

@digitalghost-dev
Copy link
Owner

@digitalghost-dev digitalghost-dev commented Feb 1, 2026

Summary by CodeRabbit

  • New Features

    • Terminal graphics protocol detection and Kitty rendering support; image rendering now reports protocol.
    • Asynchronous data loading with progress spinners for sets and cards.
  • Style

    • Centralized brand yellow colors for consistent UI highlights.
  • Documentation

    • Updated Docker examples and expanded terminal compatibility table.
  • Chores

    • Version bumped to v1.8.8, toolchain/base image updated, and new dependencies added.
  • Tests

    • Tests updated to cover graphics protocols and loading/message-driven flows.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 1, 2026

📝 Walkthrough

Walkthrough

Bumps release/version metadata (v1.8.7 → v1.8.8), adds terminal image-protocol detection (Kitty/Sixel) and image protocol return, converts several synchronous data fetches to asynchronous message-driven flows with spinners for sets/cards, centralizes yellow styling, and adds a CallTCGData HTTP helper plus related tests and deps.

Changes

Cohort / File(s) Summary
Release & CI
.github/workflows/ci.yml, .goreleaser.yml, Dockerfile, nfpm.yaml, README.md, testdata/main_latest_flag.golden
Bumped version strings from v1.8.7 → v1.8.8 across CI, packaging, Docker, badges and docs; Docker base golang image minor bump.
Go module & deps
go.mod
Updated Go toolchain to go1.24.12 and added direct deps github.com/dolmen-go/kittyimg and github.com/schollz/closestmatch.
Connections / HTTP helper
connections/connection.go, connections/connection_test.go
Added CallTCGData(url string) ([]byte, error) with tests verifying headers, non-200 handling and invalid URL behavior.
Card UI — data flow & async fetch
cmd/card/cardlist.go, cmd/card/setslist.go, cmd/card/cardlist_test.go, cmd/card/setslist_test.go
Refactored SetsList/CardsList to return minimal/loading models; introduced fetch*Cmd commands, spinner-based loading state, message types (setsDataMsg, cardDataMsg), public SetID/SetsIDMap/AllRows/Loading/Spinner fields, and tests updated to simulate message-driven arrivals and error cases.
Card UI — image handling & protocol
cmd/card/cardinfo.go, cmd/card/cardinfo_test.go, cmd/card/imageviewer.go, cmd/card/imageviewer_test.go
Changed CardImage signature to return (imageData string, protocol string, err error); added Kitty and Sixel detection and selection, Kitty rendering integration, protocol carried in image messages, and tests updated to assert protocol presence.
Styling centralization
styling/styling.go, cmd/berry/berry.go, cmd/berry/berry_test.go, cmd/card/design.go, cmd/types/types.go, cmd/types/types_test.go, flags/pokemonflagset.go
Introduced exported yellow color constants (PrimaryYellow, LightYellow, DarkYellow, YellowColor, YellowAdaptive, YellowAdaptive2) and replaced scattered hex colors with centralized styling constants; tests and UI components updated to use them.
Misc UI changes & tests
cmd/card/card.go, cmd/card/cardinfo_test.go, cmd/card/imageviewer_test.go
Enabled alt-screen for certain Bubble Tea programs, updated tests to reflect new signatures and fields, and adjusted error rendering styling in image viewer.
Other small changes
card_data/pipelines/poke_cli_dbt/dbt_project.yml
Bumped dbt project version and added materialized: table under models.poke_cli_dbt.

Sequence Diagram(s)

sequenceDiagram
    participant UI as Client / UI
    participant T as Tea Runtime
    participant Fetch as Fetcher (fetch*Cmd)
    participant Conn as Connections.CallTCGData
    participant API as TCG API

    UI->>T: Init() returns spinner.Tick + fetch*Cmd
    T->>Fetch: run fetch*Cmd(series/set id)
    Fetch->>Conn: CallTCGData(url) (headers + timeout)
    Conn->>API: HTTP GET
    API-->>Conn: 200 + payload
    Conn-->>Fetch: []byte payload
    Fetch-->>T: cardDataMsg / setsDataMsg (rows/maps or error)
    T->>UI: Update(msg) -> populate model, stop spinner, render table
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • 1.8.7 #235 — Overlaps card UI changes and AllRows/CardsList behavior; related async data flow refactors.
  • 1.8.2 #217 — Related changes to card data fetching and test hook (getCardData) plus version bumps.
  • 1.8.0 #203 — Related to CardImage/terminal graphics work (Kitty/Sixel handling and image rendering).

"A rabbit hopped in, nibbling code with glee,
Spun yellow threads of style for all to see.
I fetched the images, chose Kitty or Sixel,
Brought spinners and messages—oh what a tickle!
Release hops forward; carrots for v1.8.8 🥕"

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 22.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title '1.8.8' is a version number that accurately reflects the main change across the PR: a version bump from v1.8.7 to v1.8.8 throughout multiple configuration and source files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 1.8.8

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 1, 2026

Merging this PR will not alter performance

✅ 4 untouched benchmarks


Comparing 1.8.8 (ba386d3) with main (91a0621)

Open in CodSpeed

@codecov
Copy link

codecov bot commented Feb 1, 2026

Codecov Report

❌ Patch coverage is 59.10931% with 101 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/card/cardlist.go 54.08% 43 Missing and 2 partials ⚠️
cmd/card/setslist.go 58.46% 26 Missing and 1 partial ⚠️
cmd/card/cardinfo.go 73.91% 9 Missing and 3 partials ⚠️
cmd/card/imageviewer.go 18.18% 9 Missing ⚠️
connections/connection.go 77.77% 2 Missing and 2 partials ⚠️
cmd/berry/berry.go 33.33% 2 Missing ⚠️
cmd/card/card.go 0.00% 2 Missing ⚠️
Files with missing lines Coverage Δ
cmd/card/design.go 85.71% <ø> (ø)
cmd/types/types.go 83.11% <100.00%> (ø)
flags/pokemonflagset.go 74.87% <100.00%> (ø)
styling/styling.go 85.50% <100.00%> (ø)
cmd/berry/berry.go 58.42% <33.33%> (ø)
cmd/card/card.go 30.50% <0.00%> (ø)
connections/connection.go 87.30% <77.77%> (-3.81%) ⬇️
cmd/card/imageviewer.go 69.09% <18.18%> (-8.00%) ⬇️
cmd/card/cardinfo.go 76.92% <73.91%> (+3.58%) ⬆️
cmd/card/setslist.go 68.60% <58.46%> (-21.94%) ⬇️
... and 1 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@go.mod`:
- Around line 15-16: The go.mod additions introduce two dependencies with
maintenance risk: github.com/schollz/closestmatch (v2.1.0+incompatible) and
github.com/dolmen-go/kittyimg (pseudo-version); update project documentation and
dependency management: add a short note in the repo README or DEPENDENCIES file
referencing these modules (github.com/schollz/closestmatch and
github.com/dolmen-go/kittyimg), set up monitoring (subscribe or add entries to
your vulnerability/monitoring sources such as GitHub Advisory Database and
pkg.go.dev/vuln), and consider replacing them with more actively maintained
alternatives or vendoring a copy if reproducibility is required—if you choose to
replace, search for equivalents and update imports/usages where functions from
closestmatch and kittyimg are referenced.

@digitalghost-dev digitalghost-dev linked an issue Feb 2, 2026 that may be closed by this pull request
@digitalghost-dev digitalghost-dev merged commit 9bd620f into main Feb 2, 2026
8 checks passed
@digitalghost-dev digitalghost-dev deleted the 1.8.8 branch February 2, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update to Go v1.24.12 Reduce duplicated API call logic Add loading screens when loading sets and card lists Support Kitty graphics support

2 participants