feat(web): browse git repos in-browser via isomorphic-git#554
Merged
Conversation
…states Display branch/tag refs from kind:30618 events, HEAD commit SHA, channel link from sprout-channel tag, and proper loading/empty states. No new backend APIs — leverages existing Nostr event types. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Clone repos into IndexedDB using isomorphic-git + LightningFS, then render file tree, commit history, and README (as markdown) on the repo detail page. NIP-98 auth headers authenticate the smart HTTP transport. - Add git-client.ts wrapper (clone, tree, blob, log, readme) - Add React Query hooks (useGitClone, useGitTree, useGitLog, etc.) - Add UI sections: RepoTreeSection, RepoCommitsSection, RepoReadmeSection - Update RepoDetailPage with two-column sidebar layout and error banner - Export getEphemeralKey from nostr-client for NIP-98 signing - Add NIP-98 HTTP auth helper (nip98.ts) - Patch isomorphic-git exports map to resolve ESM build in Vite - Add Buffer polyfill (feross/buffer) for browser compatibility - Document SPROUT_GIT_REPO_PATH in .env.example - Add sprout.db to .gitignore Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Split the repo detail page into two tabs: "Code" (file tree + README) and "Commits" (commit history), matching the standard GitHub-style repo page pattern. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Install @tailwindcss/typography so prose classes actually style the rendered markdown (headings, lists, code blocks, links) - Extract triplicated relativeTime() into shared/lib/relative-time.ts - Remove debug console.log/error statements from git clone hook Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
Author
This was referenced May 28, 2026
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
exportsmap (root export missing"import"condition) via pnpm patch so Vite resolves to the browser-safe ESM buildBufferpolyfill (feross/buffer) — isomorphic-git needs it for pack-file parsing even in the ESM buildChanges
web/src/features/repos/git-client.ts— isomorphic-git wrapper (clone, tree, blob, log, readme)web/src/features/repos/use-git-browse.ts— React Query hooksweb/src/features/repos/ui/RepoTreeSection.tsx— file tree componentweb/src/features/repos/ui/RepoCommitsSection.tsx— commits listweb/src/features/repos/ui/RepoReadmeSection.tsx— README markdown rendererweb/src/features/repos/ui/RepoDetailPage.tsx— two-column sidebar layout, error banner, git browse integrationweb/src/shared/lib/nip98.ts— NIP-98 HTTP auth helperweb/src/shared/lib/nostr-client.ts— exportedgetEphemeralKeypatches/isomorphic-git.patch— fix missingimportcondition in exports map.env.example— documentSPROUT_GIT_REPO_PATH.gitignore— addsprout.dbTest plan
just relayandjust web, navigate to a repo detail page[git-clone] successlogcreateHash,Buffer) in console🤖 Generated with Claude Code