Skip to content

Commit 6a2cbfe

Browse files
committed
Fixes stale single-file scope when re-entering resolve mode
A per-file resolve entry sets `resolveFocusedFilePaths`, but exiting the mode never cleared it — every other piece of engagement state is reset in `hideMode` except this one. A later session started from the details header's Resolve chip (which doesn't pass a scope) then silently reused the previous session's single-file focus instead of targeting all conflicted files. Clears the focus on resolve-mode exit, scoped to the exiting mode so a compose→resolve switch can't wipe a focus the entry point just set.
1 parent c5510eb commit 6a2cbfe

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/webviews/apps/plus/graph/components/detailsWorkflowController.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,11 @@ export class DetailsWorkflowController implements ReactiveController {
646646
this.review.invalidateErrorRecovery();
647647
} else if (exitingMode === 'compose') {
648648
this.compose.invalidateErrorRecovery();
649+
} else if (exitingMode === 'resolve') {
650+
// The focused-file scope is an input of the engagement that set it (per-file/multi-select
651+
// entry points) — clear it on exit so a later chip-initiated session defaults back to all
652+
// conflicted files instead of silently re-scoping to the previous session's file(s).
653+
this.actions.state.resolveFocusedFilePaths.set(undefined);
649654
}
650655
// On repo-switch, the caller (Trigger 1 in hostUpdate) will follow up with the new
651656
// repo's selection arriving. Refetching here uses `host.currentSelection()` which is

0 commit comments

Comments
 (0)