Skip to content

feat: view published Git repositories as repositories - #11

Merged
QuickMythril merged 1 commit into
mainfrom
feat/git-repository-viewer
Jul 28, 2026
Merged

feat: view published Git repositories as repositories#11
QuickMythril merged 1 commit into
mainfrom
feat/git-repository-viewer

Conversation

@QuickMythril

Copy link
Copy Markdown
Member

What

Ports Qortium Home's bounded, read-only Git repository reader into Explore — the first half of moving the Git viewer out of Home (part (a): file tree + blob reader; part (b), branch switching + commit history UI, comes next on top of this).

  • src/qdnGitRepository.ts + src/qdnGitClient.ts ported from Home unchanged in substance: virtual read-only FS over the published file list, layout detection (bare + worktree), path/ref/size/count bounds, 100 MiB cache ceiling, lazy isomorphic-git chunk.
  • scripts/patch-isomorphic-git.mjs carried across in the same PR and wired as postinstall — bounded streaming inflate + delta target-size cap, version-allowlisted (1.38.9 / 1.40.0).
  • New GitRepositoryViewer: when a resource's published files form a Git layout, the detail view shows current branch, latest commit, and the file tree at that commit; clicking a file previews its blob through the shared ContentPreview (classification by filename). Any reader error falls back to the plain published-file view with a note.
  • ContentViewer refactored to expose ContentPreview (render-only) so git blobs and fetched resources share one render path.
  • Version 1.4.7 (QAVS: needs only existing 1.4-level actions — GET_QDN_RESOURCE_METADATA files + FETCH_QDN_RESOURCE path; no new Home bridge action).

Verification

  • 50/50 vitest (9 files), including Home's real-git-fixture suite ported to vitest: worktree + bare reads, unsafe/duplicate path rejection, read caching, and the 17 MiB inflation-bomb case that fails on an unpatched isomorphic-git (proves the postinstall hardening is active).
  • tsc --noEmit + production build clean; isomorphic-git lands in a separate lazy chunk (~167 kB) that only loads when a Git repo is opened.
  • Real render check: headless Chromium against the built app and the live Previewnet fixture GIT_REPOSITORY/QortiumHomeTest/home-git-demo — shows Branch main, latest commit line, and the correct tree (branch-only FEATURE.md absent on main).

No publish from this branch; QDN republish follows merge per the usual flow.

🤖 Generated with Claude Code

Port Qortium Home's bounded read-only Git reader (qdnGitRepository +
qdnGitClient + the install-time isomorphic-git inflation/delta hardening)
into Explore. A resource whose published files form a bare or worktree Git
layout now renders as a repository: current branch, latest commit, and the
file tree at that commit, with in-app blob previews through the shared
content preview. Detection failures fall back to the plain file view.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@QuickMythril
QuickMythril merged commit 9b5a6fe into main Jul 28, 2026
4 checks passed
@QuickMythril
QuickMythril deleted the feat/git-repository-viewer branch July 28, 2026 17: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