fix(config): reconcile stale org/repo scope references - #122
Merged
wgordon17 merged 1 commit intoAug 6, 2026
Conversation
wgordon17
marked this pull request as ready for review
August 6, 2026 15:09
selectedOrgs could retain logins no longer returned by fetchOrgs() (revoked/removed org access), inflating the "N of M selected" counter past its live total. fetchOrgs() itself only fetched a single page, so fixing that counter safely required paginating it first — done via octokit.paginate.iterator, matching fetchRepos(). OrgSelector now prunes stale selectedOrgs entries once a full fetch resolves and notifies the user. customTabs[].orgScope/repoScope had the same class of bug: nothing reconciled them when selectedRepos shrank, unlike monitoredRepos which already did. updateConfig() now prunes both scope arrays the same way. Since scope pruning can empty a tab's scope entirely, and empty scope previously meant "match all repos" (a silent, surprising expansion), empty scope now means "match nothing" instead, with a warning icon on the tab (TabBar and Settings) so it's never a silent state. Added a structural regression test enumerating every config field that derives from selectedRepos, so a future field added without reconciliation fails the suite by default.
wgordon17
force-pushed
the
fix/stale-scope-reconciliation
branch
from
August 6, 2026 15:14
6519341 to
13634e5
Compare
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
selectedOrgscould retain logins no longer returned byfetchOrgs()(revoked/removed access), inflating the "N of M selected" counter past its live total — fixed by paginatingfetchOrgs()fully and pruning stale entries with a notificationcustomTabs[].orgScope/repoScopehad the same missing-reconciliation bug asmonitoredRepos(which already prunes correctly) —updateConfig()now prunes both whenselectedReposshrinks