Repository navigation
Closed
Labels
Description
Problem
The Codev sidebar's Pull Requests view (packages/vscode/src/views/pull-requests.ts) renders data.pendingPRs in whatever order Tower returns them. The reviewer has no fast scan-path: their own PRs and the ones that need their attention sit interleaved with everyone else's. Draft PRs are indistinguishable from ready ones.
Current state
views/pull-requests.ts:18mapsdata.pendingPRsto flat tree items, no sorting, no per-PR partitioning.OverviewData.currentUseris already populated (packages/codev/src/agent-farm/servers/overview.ts:122, viafetchCurrentUserCached) and is consumed today byviews/backlog.ts:43for the assignee icon swap. The "me" identity is already a solved problem — reuse it.PROverview(overview.ts:76) and the underlyingPrListItemconcept type (packages/codev/src/lib/forge-contracts.ts:57) don't currently carryreviewRequestsorisDraft. The GraphQL needed already exists inpackages/codev/src/lib/team-github.ts:119,122(used by the Team view), so the fields are reachable — they just aren't flowed through thepr-listconcept.
Proposed behavior
Single flat list, no group headers. Sort comparator:
- Mine first —
pr.author === currentUser. - Then review-requested —
currentUseris inpr.reviewRequests. - Then everything else — repo-wide PRs the reviewer is neither author nor reviewer on.
- Within each bucket, secondary sort by
createdAtdescending.
A PR that's both mine and has me as a reviewer counts as mine (sort key 0). Drafts appear in their natural bucket with a (draft) suffix on the title (or a distinct icon overlay — implementer's call as long as it's visible).
Acceptance criteria
-
PrListItem(forge-contracts.ts) gainsreviewRequests: string[]andisDraft: boolean. - The
pr-listforge concept fetches both fields from GitHub and emits them. -
PROverview(overview.ts:76) carries both fields through to the client. -
views/pull-requests.tssortsdata.pendingPRsusing the comparator above, withdata.currentUseras the identity source — no new "me" lookup needed. - Drafts are visually distinguishable in the row (badge or icon).
- No group headers / collapsible sections in the UI — flat sorted list.
- When
currentUseris null (gh unavailable / not authenticated), fall back to a stable createdAt-desc sort and skip the "mine"/"review-requested" partitioning silently.
Out of scope
- Splitting into multiple expandable sections (intentionally — see proposed behavior).
- Hiding "other" PRs (intentionally — all PRs remain visible, just sorted last).
- Notifications when a PR enters the "review-requested" bucket.
Activity
amrmelsayed commentedon Jun 7, 2026
On it! Working on this with the PIR protocol (plan + dev-approval gates before PR).
[PIR #787] Plan draft
[PIR #787] Flow reviewRequests + isDraft through pr-list forge concept
[PIR #787] Carry reviewRequests + isDraft through OverviewPR mapping
[PIR #787] Sort PR sidebar (mine/review-requested/others) + draft badge
[PIR #787] Update builder thread for implement phase
[PIR #787] Correct thread note: test failures were stale artifacts
[PIR #787] Populate gitlab reviewRequests + isDraft from real glab fi…
[PIR #787] Update thread: gitlab fields now populated from glab
[PIR #787] Document verified rationale for gitea reviewRequests/isDra…
[PIR #787] Update thread: gitea verified against docs, defaults correct
[PIR #787] Review + retrospective
vscode CHANGELOG + release notes: #787 PR sidebar sort + draft badge