fix(web): paginate approvals page so 100 cards don't render at once#84
Merged
Conversation
Closes the P1 bug from #53. Approvals page now renders the first 10 pending cards by default with a "Show N more (M remaining)" button at the bottom. Clicking the button reveals the next 10 in place — no re-fetch, no scroll jump. Before: with 100 pending items, the page rendered a 29,210px scroll area and the "Recent decisions" section was ~29K pixels below the fold. After: ~3,000px initial render; user pages through if they want more. The pagination state lives in module-scope variables that reset on every renderApprovals() call (full page navigations refresh the cache). Mid-paginate state is intentionally lost on navigation — re-rendering the whole page if approvals change is the simpler model. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds client-side “load more” pagination to the Approvals page to avoid rendering large pending queues (e.g., 100 cards) in one pass and to keep the “Recent decisions” section accessible.
Changes:
- Introduces a pending page size constant and module-scoped caching for the fetched pending approvals.
- Renders only the first N pending approvals by default and adds a “Show more” button to reveal additional batches without refetching.
- Resets the visible pending count on each full
renderApprovals()call.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+93
to
+97
| window.showMoreApprovals = function() { | ||
| visiblePendingCount += PENDING_PAGE_SIZE; | ||
| const list = document.getElementById('pending-list'); | ||
| if (list) list.innerHTML = renderPendingList(cachedPending, visiblePendingCount); | ||
| }; |
This was referenced Apr 26, 2026
jayzalowitz
added a commit
that referenced
this pull request
Apr 27, 2026
…h work (#87) Captures eight PRs (#77, #78, #79, #81, #82, #83, #84, #85, #86) under an [Unreleased] section. No code changes — pure documentation. Bumping VERSION + cutting a tag is left as a separate decision so the release moment stays explicit. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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
Closes the P1 bug from #53. The approvals page rendered every pending card at once — with 100 items the scroll area hit ~29,210px and the "Recent decisions" section was buried below it.
Now: first 10 cards render by default with a "Show N more (M remaining)" button. Click reveals the next 10 in place — no re-fetch, no scroll jump.
Behavior
Test plan
Refs #53 (P1)
🤖 Generated with Claude Code