Skip to content

Commit 05a542e

Browse files
fix(mobile): keep recovery announcements in the visible UI
1 parent a86704d commit 05a542e

5 files changed

Lines changed: 4 additions & 25 deletions

File tree

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Component, useEffect, type ReactNode } from "react";
2-
import { AccessibilityInfo, ScrollView, View } from "react-native";
1+
import { Component, type ReactNode } from "react";
2+
import { ScrollView, View } from "react-native";
33

44
import { AppText as Text } from "./AppText";
55
import { MaterialButton } from "./MaterialButton";
@@ -83,17 +83,12 @@ export class RenderErrorBoundary extends Component<
8383

8484
export function RenderFailureView(
8585
props: RenderFailureProps & {
86-
readonly announce?: boolean;
8786
readonly title?: string;
8887
readonly bottomInset?: number;
8988
readonly exit?: { readonly label: string; readonly onPress: () => void };
9089
},
9190
) {
9291
const title = props.title ?? "This screen couldn't be displayed";
93-
useEffect(() => {
94-
if (props.announce !== false) AccessibilityInfo.announceForAccessibility(title);
95-
}, [props.announce, title]);
96-
9792
return (
9893
<ScrollView
9994
className="flex-1 bg-screen"

‎apps/mobile/src/features/layout/AdaptiveWorkspaceLayout.tsx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,6 @@ function AdaptiveWorkspaceLayoutContent(
585585
renderFallback={(fallback) => (
586586
<RenderFailureView
587587
{...fallback}
588-
announce={panes.primarySidebarVisible}
589588
title="The sidebar couldn't be displayed"
590589
exit={{ label: "Open settings", onPress: handleOpenSettings }}
591590
/>

‎apps/mobile/src/features/layout/workspace-inspector-pane.tsx‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,7 @@ export function WorkspaceInspectorPane(props: {
144144
<RenderErrorBoundary
145145
resetKeys={[props.pathname]}
146146
renderFallback={(fallback) => (
147-
<RenderFailureView
148-
{...fallback}
149-
announce={inspectorVisible}
150-
title="The inspector couldn't be displayed"
151-
/>
147+
<RenderFailureView {...fallback} title="The inspector couldn't be displayed" />
152148
)}
153149
>
154150
<InspectorRenderer render={props.renderInspector} />

‎apps/mobile/src/features/threads/ThreadRouteScreen.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,6 @@ function ThreadRouteContent(
605605
<ThreadInspectorContentStack
606606
Files={FilesInspector}
607607
Git={GitInspector}
608-
inspectorVisible={panes.auxiliaryPaneVisible}
609608
mode={inspectorMode}
610609
resetKeys={[routeThreadIdentity, selectedThreadCwd]}
611610
Route={props.renderInspector ? RouteInspector : undefined}
@@ -616,7 +615,6 @@ function ThreadRouteContent(
616615
GitInspector,
617616
RouteInspector,
618617
inspectorMode,
619-
panes.auxiliaryPaneVisible,
620618
props.renderInspector,
621619
routeThreadIdentity,
622620
selectedThreadCwd,

‎apps/mobile/src/features/threads/thread-inspector-content-stack.tsx‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const INSPECTOR_PREWARM_DELAY_MS = 350;
99

1010
function InspectorContentPane(props: {
1111
readonly children: ReactNode;
12-
readonly inspectorVisible: boolean;
1312
readonly mounted: boolean;
1413
readonly resetKeys: readonly [string | null, string | null];
1514
readonly visible: boolean;
@@ -34,11 +33,7 @@ function InspectorContentPane(props: {
3433
<RenderErrorBoundary
3534
resetKeys={props.resetKeys}
3635
renderFallback={(fallback) => (
37-
<RenderFailureView
38-
{...fallback}
39-
announce={props.inspectorVisible && props.visible}
40-
title="The inspector couldn't be displayed"
41-
/>
36+
<RenderFailureView {...fallback} title="The inspector couldn't be displayed" />
4237
)}
4338
>
4439
{props.children}
@@ -50,7 +45,6 @@ function InspectorContentPane(props: {
5045
export function ThreadInspectorContentStack(props: {
5146
readonly Files: ComponentType;
5247
readonly Git: ComponentType;
53-
readonly inspectorVisible: boolean;
5448
readonly mode: ThreadInspectorMode;
5549
readonly resetKeys: readonly [string | null, string | null];
5650
readonly Route?: ComponentType;
@@ -94,15 +88,13 @@ export function ThreadInspectorContentStack(props: {
9488
return (
9589
<View className="flex-1">
9690
<InspectorContentPane
97-
inspectorVisible={props.inspectorVisible}
9891
mounted={mountedModes.has("files") || props.mode === "files"}
9992
resetKeys={props.resetKeys}
10093
visible={props.mode === "files"}
10194
>
10295
<Files />
10396
</InspectorContentPane>
10497
<InspectorContentPane
105-
inspectorVisible={props.inspectorVisible}
10698
mounted={mountedModes.has("git") || props.mode === "git"}
10799
resetKeys={props.resetKeys}
108100
visible={props.mode === "git"}
@@ -111,7 +103,6 @@ export function ThreadInspectorContentStack(props: {
111103
</InspectorContentPane>
112104
{Route ? (
113105
<InspectorContentPane
114-
inspectorVisible={props.inspectorVisible}
115106
mounted={mountedModes.has("route") || props.mode === "route"}
116107
resetKeys={props.resetKeys}
117108
visible={props.mode === "route"}

0 commit comments

Comments
 (0)