fix: make the dashboard honest pagination, auto-refresh, filters, tests - #3
Merged
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
rel="last"from theLinkheader to determine total page countper_page * pages) instead of first-page countsRepoCardDatacarriestotal_open_issuesandtotal_open_prs2. Repo detail pagination + lazy-load + filters
Linkheader cursor — never guesses page numbersIssueParamsgains acreatorfield for server-side author filtering3. Auto-refresh timer
RefreshIntervalsetting wired to an actualsetIntervaltimer4. API layer tests
map_statuscoverage: 2xx, 401, 403, 403+rate-limit, 404, 5xxApiErrorDisplay tested for every variant5. ROADMAP updated
Test plan
cargo check --workspace --target wasm32-unknown-unknown— cleancargo test --workspace --exclude app— 40 tests passapi.github.com