Skip to content

fix: browse and install from the catalog without GitHub sign-in - #28

Merged
MotherSphere merged 1 commit into
mainfrom
fix/anonymous-catalog
Jul 20, 2026
Merged

MotherSphere merged 1 commit into
mainfrom
fix/anonymous-catalog

Conversation

@MotherSphere

@MotherSphere MotherSphere commented Jul 20, 2026 •

Copy link
Copy Markdown
Member

Why

The UI says everywhere that signing in to GitHub is optional ("Public GitHub API (60 req/h)", "Connect GitHub (optional)" in the welcome flow), but the catalog lived inside GitHubState::Connected: every fetch path required a token and the repositories were only stored while signed in. A first launch showed an empty store until OAuth was done, and signing out lost the catalog.

Changes

  • The catalog moves out of GitHubState into a field of its own on the App: it is public data, independent of the session. Signing in only raises the rate limit.
  • Boot: the on-disk repository cache is loaded immediately (an instant grid that also works offline), then a fetch always starts, authenticated when a token is saved and anonymous otherwise. Cached icons are decoded at boot instead of waiting for the first network round trip.
  • Refresh works while signed out (anonymous fetch). Sign-in completion sets is_fetching_repos like every other fetch path, which closes a double-fetch window.
  • An error toast only when the catalog is EMPTY: with a cached catalog on screen, a network failure goes to the status line. Otherwise every offline boot would raise an error toast.

Testing

  • cargo build and clippy --all-targets clean, 88 tests pass.
  • End-to-end anonymous mode: launched with empty XDG directories and an unreachable keyring (so no token), the catalog fills from the anonymous fetch (Grape, D1Gg2r and orCAL detected in the logs).

The welcome flow and the GitHub panel both promise that signing in is
optional ('Public GitHub API (60 req/h)'), but the catalog lived inside
GitHubState::Connected: every fetch path required a token and repos were
only stored while connected, so a first-run user saw an empty Hive until
they completed OAuth - and a signed-out user lost the catalog entirely.

- The catalog moves out of GitHubState into its own App field: public
  data, independent of the session. Signing in only raises the rate
  limit and unlocks account features.
- Boot now loads the on-disk repos cache immediately (instant, offline-
  friendly grid) and always starts a fetch - authenticated when a token
  is saved, anonymous otherwise. Cached repo icons are decoded at boot
  too, instead of waiting for the first network round-trip.
- Refresh works while signed out (anonymous fetch), and login completion
  now sets is_fetching_repos like every other fetch path, closing the
  duplicate-fetch window.
- A failed fetch only raises an error toast when the catalog is EMPTY;
  with a cached catalog showing, the failure lands in the status line -
  otherwise every offline boot would toast an error.

Verified end-to-end: a boot with clean XDG dirs and no reachable keyring
(no token) populates the catalog anonymously.
@MotherSphere
MotherSphere merged commit 8d9f691 into main Jul 20, 2026
3 checks passed
@MotherSphere
MotherSphere deleted the fix/anonymous-catalog branch July 20, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant