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
Rebase tab overhaul: rename + URL routing migration (#180)
* ship: checkpoint before automate/finalize
* ship: iter 1 — address greptile #3133271501 and copilot #4307244389
- Memoize readInitialRouteState in PrsProvider so the four useState
initializers share one window.location read (greptile P2).
- Mirror PRsPage's resolveRouteRebaseSelection inside
readInitialRouteState so the initial selectedRebaseItemId has the
same shape as the post-effect value.
- QueueTab.openRebaseTab now navigates to
?tab=workflows&workflow=rebase to keep URL in sync with state.
- Normalize the "Open Rebase/Merge tab" label to sentence case across
CreatePrModal, IntegrationTab; keep LaneGitActionsPane tooltip title
case to match its sibling tooltips.
- Restore prRebaseResolver.sendMessage displayText — it is used by
agentChatService for the transcript text bubble.
Verified locally: desktop tsc clean; 46 affected tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ship: iter 2 — fix 3 capy-ai bugs, unblock test-desktop(5)
- Wrap 5 CreatePrModal test render sites in MemoryRouter so the
useNavigate() call added in the overhaul no longer trips React
Router's invariant. This is the direct cause of the test-desktop(5)
CI failure and the bug in capy-ai #3133285481.
- In parsePrsRouteState, let hash workflow= win over search workflow=
so BrowserRouter mock-mode URLs like
?tab=workflows&workflow=queue#/prs?...&workflow=rebase resolve to
the hash's workflow. Adds a reproduction test (capy-ai #3133285495).
- In useWorkSessions' URL-filter effect, hold off caching
appliedUrlFilterKeyRef when laneId is specified but lanes haven't
loaded yet, so a later lanes-populated render can still apply the
lane filter instead of early-returning (capy-ai #3133331539).
Verified locally: desktop tsc clean; 47 affected tests pass across
CreatePrModal, prsRouteState, useWorkSessions, PrsContext.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ship: iteration 3 - address hash route precedence
* ship: iteration 5 - address partial URL filter replay
* ship: iteration 6 - reset URL filter cache on navigation
* ship: iteration 7 - handle delayed PR comments
* ship: iteration 8 - align finalize poll cadence
* ship: iteration 10 - stabilize terminal fallback test
* ship: reset iter 1 - preserve valid search route
* ship: reset iter 3 - sync legacy pr routes
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .claude/commands/finalize.md
+42Lines changed: 42 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,14 @@ It guarantees three outcomes:
12
12
2. Docs are current
13
13
3. Local CI checks pass
14
14
15
+
It does **not** guarantee that remote PR review is complete after a push. GitHub's
16
+
first visible check list can look quiet before delayed checks, bot reviews, and
17
+
inline comments arrive. After pushing a finalized branch, hand off to
18
+
`/shipLane` or an equivalent PR poll loop. Use the ship-lane cadence: poll
19
+
immediately after a push, wait 270s if CI has not registered, wait 720s while CI
20
+
is running, and wait 1800s only when CI is done and the PR is just waiting on
21
+
review.
22
+
15
23
**Usage:**`/finalize`
16
24
17
25
## Execution Mode: Autonomous
@@ -412,6 +420,34 @@ Kill selectively only if the parent is clearly gone (PPID == 1 on macOS/Linux).
412
420
413
421
Report killed PIDs in the Phase 4 summary under "Cleanup" so the user can see what happened.
414
422
423
+
### 3k. Remote PR poll handoff
424
+
425
+
If this finalize run is followed by a push or PR update, do not treat the first
426
+
`gh pr checks` result as authoritative proof that remote review is done. Some
427
+
checks and bot review systems appear late or post comments after the initial CI
428
+
surface looks complete. In particular:
429
+
430
+
-`gh pr checks` can omit delayed or still-registering provider checks.
431
+
- Bot reviewers can post inline comments after CI jobs have already gone green.
432
+
- The absence of new comments immediately after a push is not evidence that no
433
+
more comments are coming.
434
+
435
+
Handoff rule:
436
+
437
+
```bash
438
+
# After the branch is pushed, continue with /shipLane or equivalent:
439
+
# - poll PR checks, status rollup, review comments, issue comments, and reviews
440
+
# - poll immediately after a push so early CI registration/failures are visible
441
+
# - if CI has not started yet, wait 270s
442
+
# - if any check is QUEUED/IN_PROGRESS/PENDING, wait 720s
443
+
# - if CI is done and the PR is only waiting on review, wait 1800s
444
+
# - poll again before declaring the PR clean or ready for human merge
445
+
```
446
+
447
+
If `/finalize` is running as a sub-step inside `/shipLane`, return a summary that
448
+
explicitly says remote checks/comments still require the ship-lane poll loop.
449
+
Do not report "PR clean" from `/finalize` alone.
450
+
415
451
---
416
452
417
453
## Phase 4: Summary
@@ -447,6 +483,11 @@ Report killed PIDs in the Phase 4 summary under "Cleanup" so the user can see wh
447
483
### Cleanup:
448
484
- Orphan processes killed: N (PIDs: [list] or "none")
449
485
486
+
### Remote PR Handoff:
487
+
- Post-push polling required: YES
488
+
- Poll loop: `/shipLane` branch-specific cadence
489
+
- Reason: delayed checks and bot comments may arrive after first visible green state
490
+
450
491
### Status: Ready to push / Issues found
451
492
```
452
493
@@ -466,3 +507,4 @@ Before marking complete:
466
507
-[ ] All apps build successfully
467
508
-[ ] Doc validation passed
468
509
-[ ] Orphan worker processes cleaned up (vitest/tsup/tsc) — scoped to apps/ paths only
510
+
-[ ] Remote PR review is not declared clean by finalize alone; after push, `/shipLane` or an equivalent poll loop must use the branch-specific cadence and re-check comments/reviews
Copy file name to clipboardExpand all lines: apps/desktop/src/main/services/prs/prService.ts
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -871,7 +871,7 @@ export function createPrService({
871
871
parentHeadSha: null,
872
872
state: "rebaseFailed",
873
873
conflictCount: 0,
874
-
message: `Auto-rebase failed after '${args.landedLaneName}' merged because ADE could not find a new parent lane. Open the Rebase tab to recover this lane.`,
874
+
message: `Auto-rebase failed after '${args.landedLaneName}' merged because ADE could not find a new parent lane. Open the Rebase/Merge tab to recover this lane.`,
875
875
},child.id);
876
876
}
877
877
return{
@@ -979,8 +979,8 @@ export function createPrService({
979
979
state: "rebaseFailed",
980
980
conflictCount: 0,
981
981
message: rollbackError
982
-
? `Auto-rebase failed after '${args.landedLaneName}' merged: ${childError}. Automatic rollback also failed: ${rollbackError}. Open the Rebase tab to recover this lane.`
983
-
: `Auto-rebase failed after '${args.landedLaneName}' merged: ${childError}. The lane was restored to its pre-rebase state. Open the Rebase tab to recover this lane.`,
982
+
? `Auto-rebase failed after '${args.landedLaneName}' merged: ${childError}. Automatic rollback also failed: ${rollbackError}. Open the Rebase/Merge tab to recover this lane.`
983
+
: `Auto-rebase failed after '${args.landedLaneName}' merged: ${childError}. The lane was restored to its pre-rebase state. Open the Rebase/Merge tab to recover this lane.`,
0 commit comments