feat(board,browser): add --repo to view a remote repository's backlog#662
Open
ademczuk wants to merge 3 commits into
Open
feat(board,browser): add --repo to view a remote repository's backlog#662ademczuk wants to merge 3 commits into
ademczuk wants to merge 3 commits into
Conversation
Add `backlog board --repo <owner/name>` and `backlog browser --repo <owner/name>` to render another repo's backlog/ folder without cloning it by hand. The remote is cloned into ~/.backlog/remotes (sparse-checkout of backlog/ only) and refreshed each run. --ref selects a branch/tag, --no-refresh uses the cached snapshot. Private repos work through the user's existing git credentials. - New src/remote/remote-repo.ts: spec parsing, cache resolution, clone/refresh - cli.ts: shared resolveViewRoot() resolver plus options on board and browser - server: optional remoteSnapshot flag exposed at /api/remote-snapshot - web: read-only snapshot banner (RemoteSnapshotBanner) - tests: src/test/remote-repo.test.ts; README + ADVANCED-CONFIG updated Read-only snapshot: web UI edits write to the local cache only, not pushed upstream.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
- Authenticate clone/fetch via BACKLOG_REMOTE_TOKEN (then GH_TOKEN, GITHUB_TOKEN) using a scoped http.<host>.extraheader, so private repos work when the default git credential is not the right account. The token is never written to the cache config or remote URL. - Retry directory removal before re-clone (Windows pending-delete locks can make git clone fail with "already exists"); fall back to a fresh sibling cache path if the canonical one cannot be cleared, so a view is never blocked. - Add authArgs unit tests; document BACKLOG_REMOTE_TOKEN in README and ADVANCED-CONFIG.
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
backlog board --repo <owner/name>andbacklog browser --repo <owner/name>render another repository'sbacklog/folder without cloning it by hand. Useful for reviewing a teammate's board, checking a dependency's roadmap, or browsing any public Backlog.md project.How it works:
~/.backlog/remotes/<host>/<owner>/<name>) with a shallow, blobless, sparse checkout of only thebacklog/folder. Later runs fetch and hard-reset to refresh.Core(projectRoot), so task parsing, the TUI board, and the web UI all work as-is.--ref <branch/tag>picks a ref,--no-refreshuses the cached snapshot offline,BACKLOG_REMOTE_CACHEoverrides the cache root.Read-only intent: the terminal board is read-only by nature. The web UI stays editable, but edits write to the local cache only and are not pushed to the source repo. A web header banner and a terminal line make that clear.
Scope of changes:
src/remote/remote-repo.ts: spec parsing (owner/name, https, ssh), cache resolution, clone/refresh.src/cli.ts: sharedresolveViewRoot()plus the new options onboardandbrowser. With no--repo, the existing local path is untouched.src/server/index.ts: optionalremoteSnapshotflag exposed atGET /api/remote-snapshot, kept out of/api/configso it never lands inconfig.yml.src/web:RemoteSnapshotBannercomponent.src/test/remote-repo.test.ts, README and ADVANCED-CONFIG updated.I am happy to adjust the approach, the flag names, or the read-only behavior if you would prefer something different.
Related Tasks
closes BACK-466
Task Checklist
backlog/tasks/Testing
bunx tsc --noEmitis clean.src/test/remote-repo.test.ts(8 tests: spec parsing for owner/name, https, ssh forms, cache-dir env override, and a localfile://integration test that clones a seeded backlog and loads it through Core), plus the board and core suites (63 tests, no regressions).--no-refreshpaths work, and runningboard/browserwith no--repobehaves exactly as before.