feat: flag unpushed commits in the workspace commit range#604
Conversation
roborev: Combined Review (
|
The workspace Compare commit-range list gave no sign of which commits were
local-only, so a maintainer could not tell which commits still needed pushing
before they would appear on the remote or PR. Divergence tracking already
compares the worktree against @{upstream}, but only as an aggregate ahead/behind
count; the per-commit list carried no push status.
The workspace commits endpoint now annotates each commit with whether it is
reachable from the branch's upstream, derived from a single rev-list of
@{upstream}..HEAD and gated by the same git subprocess limiter the divergence
probe uses. A branch with no upstream has pushed nothing, so every commit is
treated as unpushed; a probe failure degrades to omitting the flag rather than
failing the whole list. Pull request commit lists are unaffected because push
status is omitted when unknown. The commit picker marks unpushed rows with an
amber dot.
Validation: go test ./internal/workspace -shuffle=on; go test
./internal/server/workspacetest -run TestWorkspaceCommitsFlagsUnpushedCommitsE2E
-shuffle=on; go build ./...; ui-package-typecheck (svelte-check 0 errors/0
warnings); full frontend unit suite (vp test run --project unit) 2673 passed.
Generated with Claude Code (Opus 4.8)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The initial cut treated a missing upstream as "everything unpushed," but workspaces created from fork pull request heads have no upstream while their commits already exist on the fork's remote. That marked already-pushed PR commits as "Not pushed to remote" -- a false signal roborev flagged. Push status is now omitted (left unknown) when the branch has no upstream tracking ref, mirroring how the divergence probe withholds ahead/behind counts in the same state; the dot only appears for branches where pushed-vs-unpushed is actually determinable. The new tests predated main's switch from the aliased `Assert` testify import to the lowercase `assert` package, so they broke the build once rebased onto current main; they now follow the lowercase convention. The Go API client is regenerated against current main. Validation: go test ./internal/workspace -run 'TestWorktreeUnpushedSHAs|TestWorktreeDivergence' -shuffle=on; go test ./internal/server/workspacetest -run TestWorkspaceCommitsFlagsUnpushedCommitsE2E -shuffle=on; go build ./...; full frontend unit suite (vp test run --project unit) 2683 passed. Generated with Claude Code (Opus 4.8) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
31c583b to
15b49f9
Compare
The no-upstream branch of getWorkspaceCommits (omit `pushed` rather than mark every commit unpushed) had only unit coverage of the git helper returning ok=false, so the API-visible behavior could regress back to a false "Not pushed to remote" without a full-stack failure -- roborev flagged the gap. This adds an internal/server/workspacetest e2e case that drops a ready workspace's upstream and asserts GetWorkspaceCommits returns every commit with `pushed` omitted, complementing the existing has-upstream case. Validation: go test ./internal/server/workspacetest -run 'TestWorkspaceCommitsOmitsPushStatusWithoutUpstreamE2E|TestWorkspaceCommitsFlagsUnpushedCommitsE2E' -shuffle=on. Generated with Claude Code (Opus 4.8) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
roborev: Combined Review (
|
roborev: Combined Review (
|
…ker-image * upstream/main: (24 commits) fix(deps): update javascript dependencies (kenn-io#603) feat: flag unpushed commits in the workspace commit range (kenn-io#604) fix(deps): update go dependencies (kenn-io#602) fix: match diff patches by file path (kenn-io#601) feat: launch Kata task workspaces (kenn-io#598) fix: scope GitHub App tokens by owner (kenn-io#597) fix: lazy-load markdown fence highlighting (kenn-io#599) fix: reduce active PR refresh budget spend (kenn-io#595) Fix reviews repo picker outside-click dismissal (kenn-io#596) Fix repo browser directory selection (kenn-io#593) Resize repo browser rails (kenn-io#592) fix: make repo browser refs searchable (kenn-io#594) feat: add repo browser entry points (kenn-io#584) feat: add repo browser source view (kenn-io#583) feat: add repo browser UI state boundary (kenn-io#582) feat: add repo source browser API (kenn-io#581) docs: define repo source browser (kenn-io#580) feat: keep recently active PRs fresh (kenn-io#590) Require provider-qualified repository identity (kenn-io#587) fix: start notification loops immediately (kenn-io#576) ...
The workspace Compare → Commit range list now indicates which commits have not been pushed yet, so you can tell at a glance what still needs pushing before it lands on the remote or PR.
generated by a clanker