Repository navigation
feat(datatug-apps): read-only inGitDB/GitHub vault explorer - #32
Merged
Merged
Conversation
Port the standalone Vite SPA "inGitDB GitHub vault viewer" (from the archived sneat-mod-datatug repo, which could not land there) into the rich Angular UI, mirroring the Firestore space-explorer patterns: - VaultExplorerService wraps the read-only subset of @ingitdb/client-github@0.1.2 (loadDatabaseConfig / loadCollectionSchema / loadCollectionRecords / githubApi.getContents) and never calls a write method (putFile / deleteFile / createCommit or the pending-changes stores). - VaultExplorerPageComponent (signals, standalone, Ionic) with a connect form (owner/repo, branch defaulting to main, optional GitHub token as a password field kept in memory only), root-collections list, records table, record JSON view, and nested-subcollection drill-down with breadcrumbs — behavior ported 1:1 from the SPA's ng/src/main.ts. - Routed at /explore-vault (auth-guarded) and linked from the My page next to the Firestore space explorer, labeled read-only. - Unit tests for the service plus its pure helpers (subcollectionNamesFromContents / vaultErrorMessage). Deps: @ingitdb/client-github@0.1.2 with peers axios/idb/@ingr/codec, plus @ingitdb/client@0.1.0 directly so its record/schema types are nameable in ng-packagr's declaration emit (TS2742 otherwise). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FV3pbooAc9UPpNdiaJuKve
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.
What
Ports the working standalone "inGitDB GitHub vault viewer" (a Vite SPA built in the now-archived sneat-mod-datatug repo, where it could not land) into this rich Angular/Ionic UI, superseding that SPA. It mirrors the patterns of the just-merged Firestore space explorer (#31) — same read-only-by-construction headers, standalone signals-based page, lazy route, and My-page entry point.
How it works
VaultExplorerService(libs/datatug/main/src/lib/services/repo/vault-explorer.service.ts) wraps the READ-ONLY subset of@ingitdb/client-github@0.1.2:createIngitDbClient({ token }),loadDatabaseConfig,loadCollectionSchema,loadCollectionRecords, andgithubApi.getContents(to probe record dirs for nested subcollections). It never calls a write method (putFile/deleteFile/createCommitor the pending-changes stores).VaultExplorerPageComponent(.../pages/signed-in/vault-explorer/): connect form (owner/repo, branch defaulting tomain, optional GitHub token as a password field held in memory only — never persisted), root-collections list from.ingitdb/root-collections.yaml, records table (schemacolumns_orderfirst, then extra keys), record JSON view with metadata fields stripped, and drill-down into nested subcollections (.../{recordId}/{subcol}/$records/...per dalgo2ingitdb FORMAT.md) with breadcrumbs. Behavior is a 1:1 port of the SPA'sng/src/main.ts— no new features./explore-vault(auth-guarded) and linked from the My page next to the Firestore space-explorer entry, labeled as the GitHub / inGitDB variant and marked read-only.For a GitHub-backed vault there is no Sneat/DataTug server in the read path at all — the browser talks straight to
api.github.comwith the user's own token, which is the transparency proof behind "own your data".Dependencies
@ingitdb/client-github@0.1.2+ its peers (axios,idb,@ingr/codec), plus@ingitdb/client@0.1.0declared directly so itsCollectionEntry/CollectionSchema/RecordRowtypes are nameable in ng-packagr's declaration emit (TS2742 otherwise).Verification
pnpm nx run-many -t lint,test,build— all green (includes newvault-explorer.service.spec.ts)pnpm nx run datatug-app:e2e— 3/3 Playwright tests pass🤖 Generated with Claude Code
https://claude.ai/code/session_01FV3pbooAc9UPpNdiaJuKve