Repository navigation
Browse only searches what you have checked out - #299
Merged
Merged
Conversation
A query with no scope searched all of public GitHub (579 thousand "bugs nobody touched" on a fresh install). Browse now works inside what is checked out: BrowseCheckouts reads the orgs of the repo records, a query with no place runs inside every one of them (chunked to GitHub's 256 characters, counts added up), and BrowseFetch refuses any org or repo with no checkout (notCheckedOut) or no checkout at all (unbounded) before anything is sent. Also: the cache prune for orgs outside the checkouts, compact counts, the rail's seeded scopes as pure functions, and the palette dimming orgs with no checkout. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…and the quiet cache prune The list says "Check out a repo first" or "<name> isn't checked out" with a button into Add or clone (prefilled), counts are dashes for what is not searched, the rail leads with All checkouts and the checked-out orgs, counts are compact, and the cache drops other orgs' items shortly after launch. docs/github/browse.md and the browse-fresh and browse-none shots. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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.
Why
On a fresh machine Browse's starter queries counted and listed issues from all of GitHub (rail counts like 579.689 and 143.037.165, and a list of issues from repos the user has nothing to do with). The queries carried no org or repo, and nothing was scoped, so the search was unbounded.
What
Browse works inside what is checked out.
repos(BrowseCheckouts: no network, nothing stored, always live).org:qualifiers for every checked-out org, chunked to 240 characters (at most 6 groups), counts summed, lists merged newest first. The scope chip reads "All checkouts · N orgs".BrowseFetch.searchandcounttake a requiredcheckouts:and thrownotCheckedOutorunbounded, so no call site can forget. Arepo:qualifier is allowed when its org has a checkout. The list shows " isn't checked out. Browse searches orgs and repos you have checked out. Clone it, then it shows up here." with a button that opens Add or clone prefilled; with nothing checked out it says "Check out a repo first".BrowseStore.prune(keepingOrgs:)removes cached items and reads for orgs with no checkout, in 500-row batches at utility priority, shortly after launch and when the checkouts change. It does nothing while the repo list is empty (so it cannot wipe the cache before repos load), never touches saved queries or pinned scopes, and touchesbrowse.sqliteonly, neverattention.sqlite.Behaviour changes to know
Verified
mise run lint, the full suite (2961 tests; 252 Browse, with new bounded, prune and rail/number suites), 9 mutations of the new logic each failing the suite, a full appswift build.org:anduser:counts were checked equal for personal accounts against real GitHub (read-only). Not run locally: bundle, tutor check, text check (CI runs them); the two new shots (github/browse-fresh,github/browse-none) are defined but not rendered; no live run of the chunked search against the real viewer.🤖 Generated with Claude Code