Skip to content

Commit 1debb1b

Browse files
PR Batch Testerclaude
andcommitted
fix(clients): an interrupted Turn on leaves the question unanswered
Only record the switched-off question as answered when every computer actually switched on, so an interrupted write is asked about again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent e032289 commit 1debb1b

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎apps/mobile/src/components/SwitchedOffEnvironmentsNotice.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,12 @@ export function SwitchedOffEnvironmentsNotice() {
7474
const failed = results.filter(
7575
({ result }) => result._tag === "Failure" && !isAtomCommandInterrupted(result),
7676
);
77-
if (failed.length === 0) {
77+
if (results.every(({ result }) => result._tag === "Success")) {
7878
markReviewed();
7979
return;
8080
}
81+
// An interrupted switch stays unanswered but is not an error to show.
82+
if (failed.length === 0) return;
8183
Alert.alert(
8284
`Could not switch on ${failed.map(({ environment }) => environment.label).join(", ")}`,
8385
"Switch it on in Settings → Environments.",

‎apps/web/src/components/SwitchedOffEnvironmentsNotice.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,12 @@ export function SwitchedOffEnvironmentsNotice() {
6666
const failed = results.filter(
6767
({ result }) => result._tag === "Failure" && !isAtomCommandInterrupted(result),
6868
);
69-
if (failed.length === 0) {
69+
if (results.every(({ result }) => result._tag === "Success")) {
7070
markReviewed();
7171
return;
7272
}
73+
// An interrupted switch stays unanswered but is not an error to show.
74+
if (failed.length === 0) return;
7375
toastManager.add(
7476
stackedThreadToast({
7577
type: "error",

0 commit comments

Comments
 (0)