Skip to content

fix: make the dashboard honest pagination, auto-refresh, filters, tests - #3

Merged
suradet-ps merged 6 commits into
mainfrom
fix/dashboard-honesty
Aug 6, 2026
Merged

fix: make the dashboard honest pagination, auto-refresh, filters, tests#3
suradet-ps merged 6 commits into
mainfrom
fix/dashboard-honesty

Conversation

@suradet-ps

Copy link
Copy Markdown
Owner

Summary

Fixes the most impactful bugs in Lepo: incomplete data, dead auto-refresh, wasted rate-limit calls, and missing filters. Also adds comprehensive API layer tests.

Changes

1. Dashboard pagination

  • Parse rel="last" from the Link header to determine total page count
  • Dashboard cards display upper-bound totals (per_page * pages) instead of first-page counts
  • RepoCardData carries total_open_issues and total_open_prs

2. Repo detail pagination + lazy-load + filters

  • "Load more" button following the Link header cursor — never guesses page numbers
  • Lazy-load tabs: only fetches the active tab; switching tabs triggers the fetch
  • Missing filters wired: label, author (creator), sort, and state all exposed in the toolbar
  • IssueParams gains a creator field for server-side author filtering

3. Auto-refresh timer

  • RefreshInterval setting wired to an actual setInterval timer
  • Dashboard re-fetches at the configured interval (1/5/15 min)
  • Pauses when rate limit is nearly exhausted (< 10 remaining)
  • Timer cancelled and recreated when the interval setting changes

4. API layer tests

  • 40 offline tests (up from 19 serde-only tests)
  • map_status coverage: 2xx, 401, 403, 403+rate-limit, 404, 5xx
  • ApiError Display tested for every variant
  • Pagination edge cases: next-only, empty, single-page, from_headers
  • Query-string encoding with labels, creator, sort

5. ROADMAP updated

  • Sections 1 and 2 marked complete

Test plan

  • cargo check --workspace --target wasm32-unknown-unknown — clean
  • cargo test --workspace --exclude app — 40 tests pass
  • No test hits api.github.com

Parse rel=last from the Link header to determine total page count. Dashboard cards now display the upper-bound total (per_page * pages) instead of the first-page count. RepoCardData carries total_open_issues and total_open_prs fields.
Add Load More button following Link header cursor. Only fetch the active tab (lazy-load). Expose label, author (creator), sort, and state filters in the toolbar. IssueParams gains a creator field for server-side author filtering.
Connect RefreshInterval setting to an actual JS setInterval timer. The dashboard re-fetches at the configured interval (1/5/15 min). Pauses when rate limit is nearly exhausted (< 10 remaining). Timer is cancelled and recreated when the interval setting changes.
…on edge cases

Cover all map_status branches (2xx, 401, 403, 403+rate-limit, 404, 5xx). Test ApiError Display for every variant. Add pagination edge cases: next-only, empty, single-page, from_headers. Total: 40 offline tests, zero network calls.
@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lepo Ready Ready Preview Aug 6, 2026 6:26am

@suradet-ps suradet-ps changed the title fix: make the dashboard honest — pagination, auto-refresh, filters, tests fix: make the dashboard honest pagination, auto-refresh, filters, tests Aug 6, 2026
@suradet-ps
suradet-ps merged commit eace30c into main Aug 6, 2026
7 of 8 checks passed
@suradet-ps
suradet-ps deleted the fix/dashboard-honesty branch August 6, 2026 06:20
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.

1 participant