Skip to content

feat(board,browser): add --repo to view a remote repository's backlog#662

Open
ademczuk wants to merge 3 commits into
MrLesk:mainfrom
ademczuk:feat/remote-repo-dashboard
Open

feat(board,browser): add --repo to view a remote repository's backlog#662
ademczuk wants to merge 3 commits into
MrLesk:mainfrom
ademczuk:feat/remote-repo-dashboard

Conversation

@ademczuk

Copy link
Copy Markdown

Summary

backlog board --repo <owner/name> and backlog browser --repo <owner/name> render another repository's backlog/ 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:

  • The repo is cloned into a local cache (~/.backlog/remotes/<host>/<owner>/<name>) with a shallow, blobless, sparse checkout of only the backlog/ folder. Later runs fetch and hard-reset to refresh.
  • Everything downstream is unchanged: the cache dir is handed to the existing Core(projectRoot), so task parsing, the TUI board, and the web UI all work as-is.
  • Private repos work through your existing git credentials (the clone reuses your credential helper).
  • --ref <branch/tag> picks a ref, --no-refresh uses the cached snapshot offline, BACKLOG_REMOTE_CACHE overrides 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:

  • New src/remote/remote-repo.ts: spec parsing (owner/name, https, ssh), cache resolution, clone/refresh.
  • src/cli.ts: shared resolveViewRoot() plus the new options on board and browser. With no --repo, the existing local path is untouched.
  • src/server/index.ts: optional remoteSnapshot flag exposed at GET /api/remote-snapshot, kept out of /api/config so it never lands in config.yml.
  • src/web: RemoteSnapshotBanner component.
  • Tests in 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

  • I have created a corresponding task in backlog/tasks/
  • The task has clear acceptance criteria
  • I have added an implementation plan to the task
  • All acceptance criteria in the task are marked as completed

Testing

  • bunx tsc --noEmit is clean.
  • New and touched-area suites pass: src/test/remote-repo.test.ts (8 tests: spec parsing for owner/name, https, ssh forms, cache-dir env override, and a local file:// integration test that clones a seeded backlog and loads it through Core), plus the board and core suites (63 tests, no regressions).
  • Verified live against a public Backlog.md project: it clones the backlog, renders the full board, the refresh and --no-refresh paths work, and running board/browser with no --repo behaves exactly as before.

ademczuk added 2 commits May 28, 2026 23:53
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.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

- 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.
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