You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PR Code tab: per-commit diffs, viewed marks that reset on push, stacked-PR actions, several PRs per thread #1527
src/components/PrWorkspacePanel.tsx shows PR detail, comments and merge, but no file diff, so reviewing someone else's PR (or a worker's) means leaving the app. A thread links exactly one PR (prNumber: number | null, src/shared/ipc.ts:547). Stacks are only hinted at by the size-cap message (worktrees-pr.js:1591).
Proposal (M–L), in order:
Code tab in the PR workspace: the PR diff using the 0.24 per-file lazy diff renderer, with an all-commits / single-commit picker.
Viewed marks per file, stored per PR + head SHA. After a push, files that changed since they were marked flip to "Changed".
Several PRs per thread (prNumbers[]), including PRs in other repos. The agent can link one with a link_pull_request MCP tool.
Stack actions: detect a chain of PRs whose bases point at each other. "Rebase stack" and "Merge stack" (bottom-up, retargeting the next base to main before deleting the old one; see the stacked-PR lesson in memory).
Auto-settle a thread when all its linked PRs are merged or closed.
Implementing in the issue order: Code tab on the 0.24 lazy per-file renderer, viewed marks keyed per PR + head/blob SHA, prLinks[] (keeping prNumber as primary), link_pull_request MCP, stack rebase/merge, then settle only when every linked PR is merged or closed.
Landed on coder/pr-code-tab-per-commit-diffs-viewed-mark-f635f7 (uncommitted)
Code tab — PrCodeTab uses the 0.24 lazy FileHunks renderer plus an all-commits / single-commit picker (git.prDiff).
Viewed marks — stored per repo#number + head SHA (blob SHA when GitHub sends one). Same blob stays Viewed after a later head; a changed blob flips to Changed.
Several PRs per thread — prLinks[] additive; prNumber stays primary. link_pull_request MCP tool is always registered. Other-repo slugs via -R.
Stack actions — detect base→head chains. Merge is bottom-up and retargets the next PR onto the bottom PR's base (usually main) immediately after each merge. Rebase uses a temp worktree + --force-with-lease.
Auto-settle — only when every linked PR is MERGED/CLOSED.
Fix while verifying:prStack.defaultBase used the viewed PR's base, so opening the top of a stack would retarget onto a sibling. Now stack[0].baseRefName. Secret-block test was a false fail from inherited CODER_GUARDRAILS_PATH; the suite unsets it.
Implemented on coder/pr-code-tab-per-commit-diffs-viewed-mark-f635f7: Code tab + viewed marks + prLinks + link_pull_request + stack rebase/merge (bottom-up, retarget next onto the stack bottom base) + settle only when every linked PR is terminal.
Activity
currentbits commentedon Oct 11, 2026
Implementing in the issue order: Code tab on the 0.24 lazy per-file renderer, viewed marks keyed per PR + head/blob SHA,
prLinks[](keepingprNumberas primary),link_pull_requestMCP, stack rebase/merge, then settle only when every linked PR is merged or closed.currentbits commentedon Oct 11, 2026
Landed on
coder/pr-code-tab-per-commit-diffs-viewed-mark-f635f7(uncommitted)PrCodeTabuses the 0.24 lazyFileHunksrenderer plus an all-commits / single-commit picker (git.prDiff).repo#number+ head SHA (blob SHA when GitHub sends one). Same blob stays Viewed after a later head; a changed blob flips to Changed.prLinks[]additive;prNumberstays primary.link_pull_requestMCP tool is always registered. Other-repo slugs via-R.--force-with-lease.Fix while verifying:
prStack.defaultBaseused the viewed PR's base, so opening the top of a stack would retarget onto a sibling. Nowstack[0].baseRefName. Secret-block test was a false fail from inheritedCODER_GUARDRAILS_PATH; the suite unsets it.Verified:
electron/test/pr-workspace.test.js(incl. merge-stack retarget + secret-block),electron/test/pr-links.test.js, renderer helpers +test/prCodeTab.test.tsx. Preload IPC--checkclean.currentbits commentedon Oct 11, 2026
Implemented on coder/pr-code-tab-per-commit-diffs-viewed-mark-f635f7: Code tab + viewed marks + prLinks + link_pull_request + stack rebase/merge (bottom-up, retarget next onto the stack bottom base) + settle only when every linked PR is terminal.
currentbits commentedon Oct 11, 2026
PR: #1602