diff --git a/app/src/App.tsx b/app/src/App.tsx index 412be8e..2220612 100644 --- a/app/src/App.tsx +++ b/app/src/App.tsx @@ -717,13 +717,17 @@ function App() { [restackPr], ); - // Open a review's workspace directly (row double-click / Enter, rail footer). - // The Briefing-vs-Diff landing decision lives in the workspace itself. + // Open a review's workspace (row double-click / Enter, rail footer). Routes + // by gate state exactly like the action button: an actionable review opens + // FOR REVIEW (Pending/Reworked → InReview — commenting is only enabled while + // InReview, so a bare navigate would land in a silently read-only diff); + // everything else just navigates. The Briefing-vs-Diff landing decision + // lives in the workspace itself. const handleOpenReview = useCallback( (pr: string) => { - void navigateToDiff(pr); + handleReviewAction(pr); }, - [navigateToDiff], + [handleReviewAction], ); const clearSelection = useCallback(() => { @@ -735,9 +739,11 @@ function App() { const handleRailJump = useCallback( (pr: string, path: string, side: DiffSide, line: number) => { requestDiffJump(pr, path, side, line); - void navigateToDiff(pr); + // Same state-routed open as handleOpenReview: jumping to a finding's + // line is a prelude to commenting on it, which needs InReview. + handleReviewAction(pr); }, - [requestDiffJump, navigateToDiff], + [requestDiffJump, handleReviewAction], ); // Opening a project always routes to its plan gate. When the project has no