Skip to content
This repository was archived by the owner on Apr 13, 2026. It is now read-only.

feat: migrate from tuikit-go to blitui/blit#17

Merged
moneycaringcoder merged 16 commits intomainfrom
feat/migrate-to-blit
Apr 10, 2026
Merged

feat: migrate from tuikit-go to blitui/blit#17
moneycaringcoder merged 16 commits intomainfrom
feat/migrate-to-blit

Conversation

@moneycaringcoder
Copy link
Copy Markdown
Owner

Summary

  • Full migration from github.com/moneycaringcoder/tuikit-go v0.7.1 to github.com/blitui/blit v0.1.0 across all 9 source files and 3 test files
  • New features enabled by blit: Table with search/sort, Tabs for event type filtering, vim-style command bar, theme picker with presets, toast notifications, sparkline EPM, Markdown rendering in detail overlay, LogViewer debug overlay, Signal-driven status bar
  • Bug fixes: Signal.Set deadlock from unbuffered bubbletea channel (goroutine wrapper), shared Content focus clobbering in Tabs (single-slot pattern), missing Themed interface on custom components (invisible table cursor)
  • Zero stale tuikit references remain in code, go.mod, or docs

Upstream issues filed

Test plan

  • go build ./... passes
  • go test ./... passes (ui + updatewire)
  • Manual testing: events render in table, cursor visible with theme colors, tabs switch filters, command bar works, theme picker persists, toasts appear, debug overlay opens, detail overlay renders markdown, status bar updates without deadlock
  • CI passes

Replace github.com/moneycaringcoder/tuikit-go v0.7.1 with
github.com/blitui/blit v0.1.0. This updates all import paths,
the package alias (tuikit -> blit), the tuitest -> btest subpackage,
and the Component.Update signature to include the new blit.Context
parameter.
Add Body field to PullRequest, Issue, and Release structs so the
GitHub API response populates them. Use blit.Markdown() to render
body content with themed formatting in the detail overlay.
Add Theme field to Config for persisting theme selection. On startup,
resolve the configured theme from blit.Presets() or fall back to
DefaultTheme. Register a Picker overlay on ctrl+t that lists all
available themes and saves the selection to config.
Replace status bar closures with blit.NewSignal[string] and
WithStatusBarSignal for dirty-bit coalescing. Keybind handlers
update the right signal after sort/filter/pause state changes.
…mands

Register blit.CommandBar as inline overlay on ':' key. Commands:
add, remove/rm, sort, filter (repo:/type:), clear, theme, quit/q.
Also add SetTypeFilter() public method to EventStream for direct
type filter assignment from command bar and future tabs.
Wrap the EventStream in a Tabs component with All, Pushes, PRs,
Issues, and Local tabs. Each tab sets the type filter via OnChange
callback, sharing a single EventStream instance.
Signal.Set() called from keybind handlers triggers bus.schedule()
which calls tea.Program.Send() on an unbuffered channel from within
the Update handler — the UI goroutine deadlocks trying to send to
itself. WithStatusBar(func() string) closures run during View()
instead, avoiding the channel entirely.

Also removes 1-9 repo filter keybinds that conflicted with Tabs
tab-switching keys. Repo filtering remains available via :filter
command bar.
Signal.Set() from keybind handlers triggers bus.schedule() → p.Send()
on bubbletea's unbuffered channel, deadlocking the UI goroutine.
Wrapping Set() in a goroutine lets the send happen off the UI thread.

WithStatusBarSignal is restored (WithStatusBar closures didn't render
content — likely upstream bug). The 1-9 repo filter keybinds remain
removed to let Tabs own those keys for tab switching.
All 5 tab items shared the same stream pointer. Tabs.SetFocused
iterates all items setting Content.SetFocused — the last non-active
tab always wins with SetFocused(false), so the stream was permanently
unfocused. Keys never reached the table (arrow keys, enter, etc).

Fix: assign stream as Content only to the active tab. OnChange moves
it into the new slot and nils the rest, so SetFocused only touches
the stream once with the correct value.
EventStream, StatusPanel, and DebugOverlay did not implement
blit.Themed, so the App's theme never propagated through Tabs to the
Table, ListView, or LogViewer. The Table rendered its cursor with a
zero-valued Theme (empty colors), making the row selector invisible.
@moneycaringcoder moneycaringcoder merged commit 8824b8b into main Apr 10, 2026
1 check passed
@moneycaringcoder moneycaringcoder deleted the feat/migrate-to-blit branch April 10, 2026 14:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant