Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

AdaptiveWorkspaceLayout.tsx

615 lines22.5 KB

1import type {
2 EnvironmentProject,
3 EnvironmentThreadShell,
4} from "@t3tools/client-runtime/state/shell";
5import { EnvironmentId, ThreadId, type SidebarProjectGroupingMode } from "@t3tools/contracts";
6import { useAtomValue } from "@effect/atom-react";
7import { useFocusEffect } from "@react-navigation/native";
8import {
9 NavigationContext,
10 NavigationRouteContext,
11 StackActions,
12 useNavigation,
13} from "@react-navigation/native";
14import {
15 createContext,
16 use,
17 useCallback,
18 useEffect,
19 useMemo,
20 useRef,
21 useState,
22 type ReactNode,
23} from "react";
24import { useWindowDimensions, View } from "react-native";
25import Animated, {
26 useAnimatedStyle,
27 useDerivedValue,
28 useSharedValue,
29 withTiming,
30} from "react-native-reanimated";
31import { AsyncResult } from "effect/unstable/reactivity";
32​
33import {
34 deriveFileInspectorPaneLayout,
35 deriveLayout,
36 deriveWorkspacePaneLayout,
37 type FileInspectorPaneLayout,
38 type Layout,
39 type WorkspaceAuxiliaryPaneRole,
40 type WorkspacePaneLayout,
41} from "../../lib/layout";
42import { resolveThreadSelectionNavigationAction } from "../../lib/adaptive-navigation";
43import { scopedThreadKey } from "../../lib/scopedEntities";
44import { mobilePreferencesAtom } from "../../state/preferences";
45import {
46 DEFAULT_MOBILE_PROJECT_GROUPING_SETTINGS,
47 resolveMobileProjectGroupingSettings,
48} from "../../state/project-grouping";
49import {
50 parseActiveThreadPath,
51 useHardwareKeyboardCommand,
52} from "../keyboard/hardwareKeyboardCommands";
53import { AndroidHomeFabLayout } from "../home/AndroidHomeFab";
54import { HomeListOptionsProvider } from "../home/home-list-options";
55import { useAppearancePreferences } from "../settings/appearance/AppearancePreferencesProvider";
56import { ThreadNavigationSidebar } from "../threads/ThreadNavigationSidebar";
57import { WORKSPACE_PANE_TIMING } from "./workspace-pane-animation";
58import { WorkspaceInspectorPane } from "./workspace-inspector-pane";
59import { WorkspaceContentWidthContext } from "./workspace-content-width";
60​
61interface AdaptiveWorkspaceContextValue {
62 readonly layout: Layout;
63 readonly panes: WorkspacePaneLayout;
64 readonly fileInspector: FileInspectorPaneLayout;
65 readonly primarySidebarSearchQuery: string;
66 readonly activateAuxiliaryPaneRole: (role: WorkspaceAuxiliaryPaneRole) => () => void;
67 /**
68 * Route screens hand their inspector pane content to the workspace so it
69 * renders BESIDE the navigator (outside the native stack header) instead of
70 * inside the route. Returns a deactivate callback: the pane animates closed
71 * (content kept mounted for the exit transition) unless a newer
72 * registration already took over — stale deactivates never clobber it.
73 * Prefer useRegisterWorkspaceInspector over calling this directly.
74 */
75 readonly registerWorkspaceInspector: (render: () => ReactNode) => () => void;
76 readonly setPrimarySidebarSearchQuery: (query: string) => void;
77 readonly showAuxiliaryPane: (role: WorkspaceAuxiliaryPaneRole) => void;
78 readonly toggleAuxiliaryPane: () => void;
79 readonly togglePrimarySidebar: () => void;
80 readonly setAuxiliaryPaneWidth: (width: number) => void;
82​
83const compactLayout = deriveLayout({ width: 0, height: 0 });
84const compactPanes = deriveWorkspacePaneLayout({
85 layout: compactLayout,
86 viewportWidth: 0,
87 primarySidebarPreferredVisible: true,
88 auxiliaryPanePreferredVisible: true,
89});
90const compactFileInspector = deriveFileInspectorPaneLayout({
91 layout: compactLayout,
92 viewportWidth: 0,
93});
94const AdaptiveWorkspaceContext = createContext<AdaptiveWorkspaceContextValue>({
95 layout: compactLayout,
96 panes: compactPanes,
97 fileInspector: compactFileInspector,
98 primarySidebarSearchQuery: "",
99 activateAuxiliaryPaneRole: () => () => undefined,
100 registerWorkspaceInspector: () => () => undefined,
101 setPrimarySidebarSearchQuery: () => undefined,
102 showAuxiliaryPane: () => undefined,
103 toggleAuxiliaryPane: () => undefined,
104 togglePrimarySidebar: () => undefined,
105 setAuxiliaryPaneWidth: () => undefined,
106});
107​
108export function useAdaptiveWorkspaceLayout(): AdaptiveWorkspaceContextValue {
109 return use(AdaptiveWorkspaceContext);
111​
112export function useAdaptiveWorkspacePaneRole(role: WorkspaceAuxiliaryPaneRole) {
113 const { activateAuxiliaryPaneRole } = useAdaptiveWorkspaceLayout();
114​
115 useFocusEffect(
116 useCallback(() => activateAuxiliaryPaneRole(role), [activateAuxiliaryPaneRole, role]),
117 );
119​
120/**
121 * Register this screen's inspector pane content with the workspace column.
122 *
123 * The column renders BESIDE the navigator — outside any screen — so the
124 * registering screen's navigation and route contexts are captured here and
125 * re-provided around the portal content. Without them, useNavigation/useRoute
126 * inside the pane (e.g. GitOverviewSheet via useThreadSelection) throw
127 * "Couldn't find a route object".
128 *
129 * Registration is FOCUS-scoped, driven by navigation events rather than the
130 * screen's own render cycle: react-native-screens freezes blurred screens, so
131 * a cleanup that depends on the blurred subtree re-rendering never runs and
132 * would leak the pane into the next route. Blur deactivates the pane (it
133 * animates closed, or is replaced seamlessly when the next route registers in
134 * the same commit); focus re-registers it.
135 */
136export function useRegisterWorkspaceInspector(render: (() => ReactNode) | undefined) {
137 const { registerWorkspaceInspector } = useAdaptiveWorkspaceLayout();
138 // Raw context values (not the useNavigation/useRoute wrappers) so the
139 // portal re-provides exactly what this screen sees.
140 const navigation = use(NavigationContext);
141 const route = use(NavigationRouteContext);
142​
143 const wrappedRender = useMemo(() => {
144 if (render === undefined) {
145 return undefined;
146 }
147 return () => (
148 <NavigationContext.Provider value={navigation}>
149 <NavigationRouteContext.Provider value={route}>{render()}</NavigationRouteContext.Provider>
150 </NavigationContext.Provider>
151 );
152 }, [navigation, render, route]);
153​
154 const wrappedRenderRef = useRef(wrappedRender);
155 wrappedRenderRef.current = wrappedRender;
156 const focusedRef = useRef(false);
157 const deactivateRef = useRef<(() => void) | null>(null);
158​
159 const syncRegistration = useCallback(() => {
160 if (!focusedRef.current || wrappedRenderRef.current === undefined) {
161 deactivateRef.current?.();
162 return;
163 }
164 deactivateRef.current = registerWorkspaceInspector(wrappedRenderRef.current);
165 }, [registerWorkspaceInspector]);
166​
167 // Focus lifecycle. Blur/focus events fire even when the blurred subtree is
168 // frozen (events are navigation-driven, renders are not).
169 useFocusEffect(
170 useCallback(() => {
171 focusedRef.current = true;
172 syncRegistration();
173 return () => {
174 focusedRef.current = false;
175 syncRegistration();
176 };
177 }, [syncRegistration]),
178 );
179​
180 // Content changes while focused re-register in place.
181 useEffect(() => {
182 if (focusedRef.current) {
183 syncRegistration();
184 }
185 }, [syncRegistration, wrappedRender]);
186​
187 // Unmount: hand the pane back (owner-guarded, so a route that already
188 // took over is unaffected).
189 useEffect(
190 () => () => {
191 deactivateRef.current?.();
192 deactivateRef.current = null;
193 },
194 [],
195 );
197​
198export function AdaptiveWorkspaceLayout(props: {
199 readonly children: ReactNode;
200 readonly pathname: string;
201}) {
202 const preferencesResult = useAtomValue(mobilePreferencesAtom);
203 if (!AsyncResult.isSuccess(preferencesResult)) {
204 return AsyncResult.isFailure(preferencesResult) ? (
205 <AdaptiveWorkspaceLayoutContent
206 {...props}
207 projectGroupingMode={DEFAULT_MOBILE_PROJECT_GROUPING_SETTINGS.sidebarProjectGroupingMode}
208 />
209 ) : null;
210 }
211 const groupingSettings = resolveMobileProjectGroupingSettings(preferencesResult.value);
212 return (
213 <AdaptiveWorkspaceLayoutContent
214 {...props}
215 projectGroupingMode={groupingSettings.sidebarProjectGroupingMode}
216 />
217 );
219​
220function AdaptiveWorkspaceLayoutContent(
221 props: {
222 readonly children: ReactNode;
223 readonly pathname: string;
224 } & {
225 readonly projectGroupingMode: SidebarProjectGroupingMode;
226 },
227) {
228 const projectGroupingMode = props.projectGroupingMode;
229 const { materialYouStyleLayoutActive } = useAppearancePreferences();
230 const { width, height } = useWindowDimensions();
231 const pathname = props.pathname;
232 const navigation = useNavigation();
233 const activeRoleOwner = useRef<symbol | null>(null);
234 const [primarySidebarPreferredVisible, setPrimarySidebarPreferredVisible] = useState(true);
235 const [supplementaryPanePreferredVisible, setSupplementaryPanePreferredVisible] = useState(true);
236 const [supplementaryPanePreferredWidth, setSupplementaryPanePreferredWidth] = useState<
237 number | null
238 >(null);
239 const [fileInspectorPreferredVisible, setFileInspectorPreferredVisible] = useState(true);
240 const [fileInspectorPreferredWidth, setFileInspectorPreferredWidth] = useState<number | null>(
241 null,
242 );
243 const [primarySidebarSearchQuery, setPrimarySidebarSearchQuery] = useState("");
244 const [focusedAuxiliaryPaneRole, setFocusedAuxiliaryPaneRole] =
245 useState<WorkspaceAuxiliaryPaneRole | null>(null);
246 const baseLayout = useMemo(() => deriveLayout({ width, height }), [height, width]);
247 const layout = baseLayout;
248 // In split layouts the sidebar IS the thread list — it renders on every
249 // route, including Home (which shows an empty-detail pane instead of the
250 // compact list).
251 const shouldRenderPrimarySidebar = layout.usesSplitView;
252 const fileInspector = useMemo(
253 () =>
254 deriveFileInspectorPaneLayout({
255 layout,
256 viewportWidth: width,
257 preferredWidth: fileInspectorPreferredWidth ?? undefined,
258 reservedLeadingWidth:
259 shouldRenderPrimarySidebar && primarySidebarPreferredVisible
260 ? (layout.listPaneWidth ?? 0)
261 : 0,
262 }),
263 [
264 fileInspectorPreferredWidth,
265 layout,
266 primarySidebarPreferredVisible,
267 shouldRenderPrimarySidebar,
268 width,
269 ],
270 );
271 const auxiliaryPaneRole: WorkspaceAuxiliaryPaneRole =
272 focusedAuxiliaryPaneRole ?? (/\/files(?:\/|$)/.test(pathname) ? "inspector" : "supplementary");
273 const auxiliaryPanePreferredVisible =
274 auxiliaryPaneRole === "inspector"
275 ? fileInspectorPreferredVisible
276 : supplementaryPanePreferredVisible;
277 const auxiliaryPanePreferredWidth =
278 auxiliaryPaneRole === "inspector"
279 ? fileInspectorPreferredWidth
280 : supplementaryPanePreferredWidth;
281 const panes = useMemo(
282 () =>
283 deriveWorkspacePaneLayout({
284 layout,
285 viewportWidth: width,
286 primarySidebarPreferredVisible,
287 auxiliaryPanePreferredVisible,
288 auxiliaryPaneRole,
289 auxiliaryPanePreferredWidth: auxiliaryPanePreferredWidth ?? undefined,
290 }),
291 [
292 auxiliaryPanePreferredVisible,
293 auxiliaryPaneRole,
294 auxiliaryPanePreferredWidth,
295 layout,
296 primarySidebarPreferredVisible,
297 width,
298 ],
299 );
300 const activeThread = parseActiveThreadPath(pathname);
301 const environmentId = activeThread?.environmentId ?? null;
302 const threadId = activeThread?.threadId ?? null;
303 const selectedThreadKey = useMemo(() => {
304 if (environmentId === null || threadId === null) {
305 return null;
306 }
307 try {
308 return scopedThreadKey(EnvironmentId.make(environmentId), ThreadId.make(threadId));
309 } catch {
310 return null;
311 }
312 }, [environmentId, threadId]);
313 // Wrapped in an object: bare functions in useState would be treated as
314 // lazy initializers/updaters. `active: false` keeps the outgoing route's
315 // content mounted so the pane can animate closed (or be replaced
316 // seamlessly by the next route's registration in the same commit).
317 const [workspaceInspector, setWorkspaceInspector] = useState<{
318 readonly render: () => ReactNode;
319 readonly active: boolean;
320 } | null>(null);
321 const workspaceInspectorOwner = useRef<symbol | null>(null);
322 const registerWorkspaceInspector = useCallback((render: () => ReactNode) => {
323 const owner = Symbol("workspace-inspector");
324 workspaceInspectorOwner.current = owner;
325 setWorkspaceInspector({ render, active: true });
326​
327 return () => {
328 // During a push/replace the outgoing screen deactivates AFTER the
329 // incoming screen registered — only the current owner may deactivate.
330 if (workspaceInspectorOwner.current !== owner) {
331 return;
332 }
333 setWorkspaceInspector((current) => (current === null ? null : { ...current, active: false }));
334 };
335 }, []);
336 // Once the close animation settles, drop the stale content entirely.
337 const handleWorkspaceInspectorClosed = useCallback(() => {
338 setWorkspaceInspector((current) => (current !== null && !current.active ? null : current));
339 }, []);
340 const activateAuxiliaryPaneRole = useCallback((role: WorkspaceAuxiliaryPaneRole) => {
341 const owner = Symbol(role);
342 activeRoleOwner.current = owner;
343 setFocusedAuxiliaryPaneRole(role);
344​
345 return () => {
346 if (activeRoleOwner.current !== owner) {
347 return;
348 }
349 activeRoleOwner.current = null;
350 setFocusedAuxiliaryPaneRole(null);
351 };
352 }, []);
353 const togglePrimarySidebar = useCallback(() => {
354 if (!panes.primarySidebarVisible && panes.primarySidebarSuppressedByAuxiliary) {
355 setFileInspectorPreferredVisible(false);
356 setPrimarySidebarPreferredVisible(true);
357 return;
358 }
359 setPrimarySidebarPreferredVisible((current) => !current);
360 }, [panes.primarySidebarSuppressedByAuxiliary, panes.primarySidebarVisible]);
361 const revealPrimarySidebar = useCallback(() => {
362 if (panes.primarySidebarSuppressedByAuxiliary) {
363 setFileInspectorPreferredVisible(false);
364 }
365 setPrimarySidebarPreferredVisible(true);
366 }, [panes.primarySidebarSuppressedByAuxiliary]);
367 const handleToggleSidebarCommand = useCallback(() => {
368 togglePrimarySidebar();
369 return true;
370 }, [togglePrimarySidebar]);
371 useHardwareKeyboardCommand("toggleSidebar", handleToggleSidebarCommand);
372 const showAuxiliaryPane = useCallback((role: WorkspaceAuxiliaryPaneRole) => {
373 if (role === "inspector") {
374 setFocusedAuxiliaryPaneRole("inspector");
375 setFileInspectorPreferredVisible(true);
376 return;
377 }
378 setFocusedAuxiliaryPaneRole("supplementary");
379 setSupplementaryPanePreferredVisible(true);
380 }, []);
381 const handleOpenFilesCommand = useCallback(() => {
382 const activeThread = parseActiveThreadPath(pathname);
383 if (!layout.usesSplitView || !fileInspector.supported || activeThread === null) {
384 return false;
385 }
386 showAuxiliaryPane("inspector");
387 if (/\/files(?:\/|$)/.test(pathname)) {
388 return true;
389 }
390 navigation.navigate("ThreadFiles", activeThread);
391 return true;
392 }, [fileInspector.supported, layout.usesSplitView, pathname, navigation, showAuxiliaryPane]);
393 useHardwareKeyboardCommand("files", handleOpenFilesCommand);
394 const toggleAuxiliaryPane = useCallback(() => {
395 if (auxiliaryPaneRole === "inspector") {
396 setFileInspectorPreferredVisible((current) => !current);
397 return;
398 }
399 setSupplementaryPanePreferredVisible((current) => !current);
400 }, [auxiliaryPaneRole]);
401 const setAuxiliaryPaneWidth = useCallback(
402 (nextWidth: number) => {
403 if (auxiliaryPaneRole === "inspector") {
404 setFileInspectorPreferredWidth(nextWidth);
405 return;
406 }
407 setSupplementaryPanePreferredWidth(nextWidth);
408 },
409 [auxiliaryPaneRole],
410 );
411 const contextValue = useMemo(
412 () => ({
413 layout,
414 panes,
415 fileInspector,
416 primarySidebarSearchQuery,
417 activateAuxiliaryPaneRole,
418 registerWorkspaceInspector,
419 setPrimarySidebarSearchQuery,
420 showAuxiliaryPane,
421 toggleAuxiliaryPane,
422 togglePrimarySidebar,
423 setAuxiliaryPaneWidth,
424 }),
425 [
426 activateAuxiliaryPaneRole,
427 fileInspector,
428 layout,
429 panes,
430 primarySidebarSearchQuery,
431 registerWorkspaceInspector,
432 showAuxiliaryPane,
433 setPrimarySidebarSearchQuery,
434 setAuxiliaryPaneWidth,
435 toggleAuxiliaryPane,
436 togglePrimarySidebar,
437 ],
438 );
439​
440 const handleOpenSettings = useCallback(() => {
441 navigation.navigate("SettingsSheet", {
442 screen: "SettingsContent",
443 params: { screen: "Settings" },
444 });
445 }, [navigation]);
446​
447 const handleStartNewTask = useCallback(() => {
448 navigation.navigate("NewTaskSheet", { screen: "NewTask" });
449 }, [navigation]);
450​
451 // Minted here (root stack navigation) so the sidebar pane stays free of
452 // navigation hooks — on iOS it renders inside an independent nav tree.
453 const handleOpenEnvironmentSettings = useCallback(() => {
454 navigation.navigate("SettingsSheet", {
455 screen: "SettingsContent",
456 params: { screen: "SettingsEnvironments" },
457 });
458 }, [navigation]);
459​
460 const handleNewThreadOnBranch = useCallback(
461 (thread: EnvironmentThreadShell) => {
462 navigation.navigate("NewTaskSheet", {
463 screen: "NewTaskDraft",
464 params: {
465 environmentId: String(thread.environmentId),
466 projectId: String(thread.projectId),
467 branch: thread.branch,
468 worktreePath: thread.worktreePath,
469 },
470 });
471 },
472 [navigation],
473 );
474​
475 const handleNewThreadInProject = useCallback(
476 (project: EnvironmentProject) => {
477 navigation.navigate("NewTaskSheet", {
478 screen: "NewTaskDraft",
479 params: {
480 environmentId: String(project.environmentId),
481 projectId: String(project.id),
482 title: project.title,
483 },
484 });
485 },
486 [navigation],
487 );
488​
489 const renderedSidebarWidth = useSharedValue(
490 panes.primarySidebarVisible ? (layout.listPaneWidth ?? 0) : 0,
491 );
492 useEffect(() => {
493 const targetWidth = panes.primarySidebarVisible ? (layout.listPaneWidth ?? 0) : 0;
494 renderedSidebarWidth.value = withTiming(targetWidth, WORKSPACE_PANE_TIMING);
495 }, [layout.listPaneWidth, panes.primarySidebarVisible, renderedSidebarWidth]);
496 const sidebarAnimatedStyle = useAnimatedStyle(() => ({
497 opacity: Math.min(1, renderedSidebarWidth.value / 80),
498 width: renderedSidebarWidth.value,
499 }));
500​
501 // Freeze the content pane at its SETTLED width while the side panes
502 // animate. The navigator (native header + markdown feed) lays out ONCE per
503 // pane toggle instead of re-measuring on every animation frame — the
504 // animating columns merely clip/reveal it over a matching background.
505 // Continuously re-wrapping the chat feed was the main source of dropped
506 // frames during sidebar/inspector transitions.
507 const inspectorColumnTargetWidth =
508 workspaceInspector !== null && workspaceInspector.active && panes.auxiliaryPaneVisible
509 ? (panes.auxiliaryPaneWidth ?? 0)
510 : 0;
511 const contentSettledWidth = layout.usesSplitView
512 ? Math.max(0, panes.contentPaneWidth - inspectorColumnTargetWidth)
513 : null;
514 const renderedInspectorWidth = useSharedValue(inspectorColumnTargetWidth);
515 const renderedContentWidth = useDerivedValue(() =>
516 Math.max(0, width - renderedSidebarWidth.value - renderedInspectorWidth.value),
517 );
518​
519 const handleSelectThread = useCallback(
520 (thread: EnvironmentThreadShell) => {
521 const params = {
522 environmentId: String(thread.environmentId),
523 threadId: String(thread.id),
524 };
525 const navigationAction = resolveThreadSelectionNavigationAction({
526 usesSplitView: layout.usesSplitView,
527 pathname,
528 });
529 if (navigationAction === "set-params") {
530 const nextThreadKey = scopedThreadKey(thread.environmentId, thread.id);
531 if (nextThreadKey === selectedThreadKey) {
532 return;
533 }
534 setFileInspectorPreferredVisible(false);
535 navigation.navigate("Thread", params);
536 return;
537 }
538 if (navigationAction === "replace") {
539 setFileInspectorPreferredVisible(false);
540 navigation.dispatch(StackActions.replace("Thread", params));
541 return;
542 }
543 navigation.navigate("Thread", params);
544 },
545 [layout.usesSplitView, pathname, navigation, selectedThreadKey],
546 );
547​
548 return (
549 <HomeListOptionsProvider projectGroupingMode={projectGroupingMode}>
550 <AdaptiveWorkspaceContext.Provider value={contextValue}>
551 <View testID="adaptive-workspace-layout" className="flex-1 flex-row">
552 {shouldRenderPrimarySidebar && layout.listPaneWidth !== null ? (
553 <Animated.View
554 className="self-stretch overflow-hidden"
555 accessibilityElementsHidden={!panes.primarySidebarVisible}
556 collapsable={false}
557 importantForAccessibility={
558 panes.primarySidebarVisible ? "auto" : "no-hide-descendants"
559 }
560 pointerEvents={panes.primarySidebarVisible ? "auto" : "none"}
561 style={sidebarAnimatedStyle}
562 >
563 <View className="flex-1" style={{ width: layout.listPaneWidth }}>
564 <AndroidHomeFabLayout onStartNewTask={handleStartNewTask}>
565 <ThreadNavigationSidebar
566 width={layout.listPaneWidth}
567 visible={panes.primarySidebarVisible}
568 onRequestVisibility={revealPrimarySidebar}
569 selectedThreadKey={selectedThreadKey}
570 onOpenSettings={handleOpenSettings}
571 onOpenEnvironmentSettings={handleOpenEnvironmentSettings}
572 onNewThreadInProject={handleNewThreadInProject}
573 onNewThreadOnBranch={handleNewThreadOnBranch}
574 onSelectThread={handleSelectThread}
575 onSearchQueryChange={setPrimarySidebarSearchQuery}
576 searchQuery={primarySidebarSearchQuery}
577 />
578 </AndroidHomeFabLayout>
579 </View>
580 </Animated.View>
581 ) : null}
582 <View
583 className={
584 materialYouStyleLayoutActive
585 ? "flex-1 overflow-hidden bg-header"
586 : "flex-1 overflow-hidden bg-screen"
587 }
588 collapsable={false}
589 >
590 <View
591 collapsable={false}
592 style={
593 contentSettledWidth !== null ? { flex: 1, width: contentSettledWidth } : { flex: 1 }
594 }
595 >
596 <WorkspaceContentWidthContext
597 value={layout.usesSplitView ? renderedContentWidth : null}
598 >
599 {props.children}
600 </WorkspaceContentWidthContext>
601 </View>
602 </View>
603 <WorkspaceInspectorPane
604 renderedInspectorWidth={renderedInspectorWidth}
605 active={workspaceInspector?.active ?? false}
606 panes={panes}
607 renderInspector={workspaceInspector?.render}
608 setAuxiliaryPaneWidth={setAuxiliaryPaneWidth}
609 onClosed={handleWorkspaceInspectorClosed}
610 />
611 </View>
612 </AdaptiveWorkspaceContext.Provider>
613 </HomeListOptionsProvider>
614 );