Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand All @@ -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
Expand Down
Loading