feat(cli): read-only uploads staged view (#405)#415
Merged
Conversation
Shows what's staged for a branch (attach --branch / bare put staging, #403) and whether it will auto-attach once a PR opens, without hand- building the list/find query. One list call against the branch staging prefix plus the #398 repo-binding check; --format json always emits a valid document, even with nothing staged. Also exposed as the `staged` tool on the local stdio MCP server, mirroring the CLI. The none/other binding advisory reuses the exact #398 stage-warning wording via a shared `stagingBindingAdvisory` helper (verified by test) instead of duplicating the strings. Updates skills/uploads-cli/SKILL.md: the new command's flags/output/ binding table, a hosted-MCP list/find_files recipe for the same question (no dedicated hosted tool — it has no git context to default branch from), and a short video-size guidance line for PR embeds.
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (2)
🚫 Excluded labels (none allowed) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
uploads-auth | 3b249b9 | Commit Preview URL Branch Preview URL |
Jul 22 2026, 06:42 PM |
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
uploads staged [--branch <name>] [--repo <owner/name>] [--format json]: a read-only view of what's staged for a branch and whether it will auto-attach once a PR opens. Onelistcall against the branch staging prefix (ghBranchKeyPrefix, never hand-built) plus the CLI: warn at stage time when the repo isn't bound (staged files won't auto-attach) #398 repo-binding check (files:readonly, no new server surface).gh.staged-at, public URL), abinding: <state> — <message>line, andonce the PR exists: uploads attach --promote. Empty staging prints a single zero-state line.--format json/--json: always a valid document —{ repo, branch, files, binding }— even with zero files (files: [], never empty stdout, unlikefind --format json's known wart).{ state: self|other|none|unknown, autoAttach, message }.none/otherreuse the exact CLI: warn at stage time when the repo isn't bound (staged files won't auto-attach) #398 stage-warning wording via a new sharedstagingBindingAdvisoryhelper (the existingresolveStageBindingWarningnow calls it too) — one source of truth, verified by test that both surfaces produce identical text for the same binding state.stagedtool mirroring the CLI (sharedresolveStagedcore). Hosted MCP gets no new tool — it has no git context to defaultbranch/repofrom — documented as alist/find_filesrecipe in the skill instead.skills/uploads-cli/SKILL.md: documents the new command (flags, output, binding table, JSON shape), the hosted-MCP recipe, and a short video-size guidance line for PR embeds.@buildinternet/uploadsonly.Test plan
pnpm test— 204 files / 2567 tests pass (newtest/commands-staged.test.ts, plus additions totest/mcp.test.tsandtest/cli-completion.test.ts)pnpm --filter @buildinternet/uploads run build(tsc) andpnpm -r typecheck— cleanpnpm run format:check— clean (oxfmt)uploads staged --help,uploads help --alllistsstagedgit rev-parse, detached-HEAD error), empty staging (human zero-state line + JSONfiles: [], both--jsonand--format json), all four binding states (self/other/none/unknown incl. network failure and older-server-without-route), JSON schema, and wording-reuse parity againstattach --branch's CLI: warn at stage time when the repo isn't bound (staged files won't auto-attach) #398 warningCloses #405