MVP polish: selection clamp, graceful shutdown, pagination docs, README #2

Merged
bryan merged 6 commits from v0-warpup into main 2026-03-09 14:40:52 +00:00
Owner

Summary

MVP polish pass — four targeted fixes:

Selection index clamp

selected_index could exceed the PR list length when async data arrived with fewer results than the previous scroll position. Added clamp_selection() called after every PrsLoaded event. Also added prev_tab() (Shift-Tab) for backwards tab cycling.

Graceful event loop shutdown

The spawn_blocking event reader ran an infinite loop with no exit path. Added a tokio::sync::watch channel as shutdown signal — EventHandler::shutdown() sets the flag and joins the task handle before ratatui::restore(), ensuring clean terminal teardown.

Pagination limit indicator

PR fetching is capped at 50 per repo (single API page). Changed the UI to detect per-repo truncation and show a ⚠ showing first 50 per repo footer on the table block when any repo hits the limit. Added explanatory comment at the page_size(50) call.

README

Install, config TOML example, tea CLI fallback, keybindings table, pagination note.

Commits

  • d5aa6a4 fix: clamp selected_index after PR data loads
  • 7e27b81 fix: graceful shutdown for event reader thread
  • e3052c5 docs: pagination limit indicator and code comment
  • 6791872 docs: add README
## Summary MVP polish pass — four targeted fixes: ### Selection index clamp `selected_index` could exceed the PR list length when async data arrived with fewer results than the previous scroll position. Added `clamp_selection()` called after every `PrsLoaded` event. Also added `prev_tab()` (Shift-Tab) for backwards tab cycling. ### Graceful event loop shutdown The `spawn_blocking` event reader ran an infinite loop with no exit path. Added a `tokio::sync::watch` channel as shutdown signal — `EventHandler::shutdown()` sets the flag and joins the task handle before `ratatui::restore()`, ensuring clean terminal teardown. ### Pagination limit indicator PR fetching is capped at 50 per repo (single API page). Changed the UI to detect per-repo truncation and show a `⚠ showing first 50 per repo` footer on the table block when any repo hits the limit. Added explanatory comment at the `page_size(50)` call. ### README Install, config TOML example, tea CLI fallback, keybindings table, pagination note. ## Commits - `d5aa6a4` fix: clamp selected_index after PR data loads - `7e27b81` fix: graceful shutdown for event reader thread - `e3052c5` docs: pagination limit indicator and code comment - `6791872` docs: add README
selected_index could exceed PR list length when async data arrived with
fewer results than the previous selection position. Add clamp_selection()
called after PrsLoaded events. Also add prev_tab (Shift-Tab) navigation.
Add watch channel as shutdown signal to the spawn_blocking event loop.
EventHandler::shutdown() signals the channel and joins the task handle,
ensuring the terminal reader exits cleanly before ratatui::restore().
Per-repo truncation check in UI — shows footer warning when any single
repo returns 50 PRs (the API page size cap). Adds explanatory comment
at the fetch_prs call site.
bryan merged commit 9d47129a03 into main 2026-03-09 14:40:52 +00:00
bryan deleted branch v0-warpup 2026-03-09 14:40:52 +00:00
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bryan/fj-dash-og!2
No description provided.