Repository navigation
fix(review): list commit scopes newest first and keep the newest on huge prs - #103
Merged
Merged
Conversation
…uge prs Both the review-screen scope switcher and the entry-screen scope picker now show commits newest to oldest. Alt-Up/Down follow the same row order. The chip's k/N still counts oldest to newest, matching the position given to the agent in the first-round prompt. The IPC contract stays oldest first; only the presentation is reversed. The commit list now comes from GraphQL, paging backwards from the newest commit. The REST endpoint only ever returns the oldest 250, so on PRs with hundreds of commits the ones people actually look for were the ones cut off. Truncation now drops the oldest, the total count is exact, and the pinned commit's ordinal accounts for the cut-off ones. The container's commit list is cached in memory with a 60s TTL and dropped on rerun or delete, so reopening the scope menu only recomputes the local scan states instead of hitting gh again. The menu also scrolls its keyboard cursor into view on long lists.
Merged
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.
What
pulls/N/commitsendpoint only ever returns the oldest 250, so on PRs with hundreds of commits the ones people look for were exactly the ones cut off. Truncation now drops the oldest, the total is exact, and the pinned commit's ordinal accounts for the cut-off ones.Why
Newest-first is what people reach for when switching scope; old-to-new pushed the recent commits to the bottom of the list. Once the list was reversed, the REST cap dropping the newest commits became the worst possible truncation direction.
Verification
spike:scopeextended: fake gh pages the GraphQL connection for real; covers cache hit/miss and a 260-commit PR (250 returned, oldest 10 dropped, pinned ordinal 11/260, pinned-outside-list falls back to compare).