Merge commit 'a8390532f7' as 'ai-context/workbench-ui'

This commit is contained in:
elpresidank 2026-04-05 21:08:02 -05:00
commit 1a72bfdec0
310 changed files with 56430 additions and 0 deletions

View file

@ -0,0 +1,22 @@
import React from "react";
import { Box, Spinner, Text } from "@chakra-ui/react";
/**
* Loading screen displayed while establishing WebSocket connection
*/
export const ConnectionLoadingScreen: React.FC = () => {
return (
<Box
width="100%"
height="100vh"
display="flex"
flexDirection="column"
alignItems="center"
justifyContent="center"
gap={4}
>
<Spinner size="xl" />
<Text color="fg.muted">Connecting to server...</Text>
</Box>
);
};

View file

@ -0,0 +1,39 @@
import React from "react";
import { Box, Spinner, Text } from "@chakra-ui/react";
import { useSettings } from "@trustgraph/react-state";
interface SettingsLoadingBoundaryProps {
children: React.ReactNode;
}
/**
* Loading boundary that waits for settings to load before rendering children
*
* Shows a loading spinner and message while settings are being loaded.
* Once settings are ready, renders children.
*/
export const SettingsLoadingBoundary: React.FC<
SettingsLoadingBoundaryProps
> = ({ children }) => {
const { isLoaded } = useSettings();
// Show loading state while settings load
if (!isLoaded) {
return (
<Box
width="100%"
height="100vh"
display="flex"
flexDirection="column"
alignItems="center"
justifyContent="center"
gap={4}
>
<Spinner size="xl" />
<Text color="fg.muted">Loading settings...</Text>
</Box>
);
}
return <>{children}</>;
};