Home

verycracked / starbase

publicverycracked/Starbase
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

Add GitHub auth UI and repo selector with live visualization

7 months ago

9b93d47
Authored
V.C. Billingsley2/20/2026, 5:49:46 AM
Wire the existing backend OAuth flow to the frontend. The auth bar
in the top-left shows "Sign in with GitHub" when logged out, and the
user's avatar + login when authenticated, with a dropdown menu for
"Visualize a repo" and "Sign out".

The repo selector is a Cmd+K-style overlay that lists the user's
GitHub repos (fetched from /api/repos), supports fuzzy search, and
accepts arbitrary owner/repo input. Selecting a repo triggers
/api/parse which clones it server-side, parses imports with
es-module-lexer, and returns a graph JSON. reloadGraph() hot-swaps
the graph data, rebuilds adjacency/clusters/legend/labels, and flies
the camera to overview position — all without a page reload.

A parse progress overlay with a spinner provides feedback during the
clone+parse cycle. The #authenticated hash from the OAuth callback
is detected in loadFromHash() to trigger a checkAuth() refresh.

This is the right integration point because the auth state naturally
gates access to the GitHub API for repo listing and cloning, and the
overlay pattern matches the existing search palette UX.

Parent43a230b

3 files changed
  • index.html+35−0
  • src/main.js+348−1
  • src/styles.css+351−0