mirror of
https://github.com/0xWheatyz/handler.git
synced 2026-09-03 15:16:26 +00:00
feat(app): management foundation - client exposure, manage hub, shared shell
Groundwork for the full admin surface on mobile: the API client gains the user-account and Claude-management types (skills, connectors, plugins, permissions, users/auth, owner fields) plus an unauthenticated authApi helper; AppState exposes the client and the new management screen names; ManageShell/Field/ErrorNotice and a useResource hook give the subscreens one shared page/fetch pattern; Settings gains Manage and Account rows leading to the new hub. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01731mKtVzsfeT4Vi3TvkR48
This commit is contained in:
+12
-3
@@ -27,7 +27,12 @@ import {
|
||||
} from "@expo-google-fonts/spline-sans-mono";
|
||||
|
||||
import { useTheme } from "./src/theme/useTheme";
|
||||
import { AppStateProvider, useAppState } from "./src/state/AppState";
|
||||
import {
|
||||
AppStateProvider,
|
||||
useAppState,
|
||||
type Screen as ScreenName,
|
||||
} from "./src/state/AppState";
|
||||
import { ManageScreen } from "./src/screens/manage/ManageScreen";
|
||||
import { ServerConfigProvider, useServerConfig } from "./src/state/ServerConfig";
|
||||
import { ConnectScreen } from "./src/screens/ConnectScreen";
|
||||
import { FleetScreen } from "./src/screens/FleetScreen";
|
||||
@@ -42,7 +47,9 @@ import { SettingsScreen } from "./src/screens/SettingsScreen";
|
||||
function Router() {
|
||||
const { screen } = useAppState();
|
||||
|
||||
const Screen = {
|
||||
// Partial while the management subscreens land one by one; anything unmapped
|
||||
// falls back to the fleet so a half-wired build never renders undefined.
|
||||
const screens: Partial<Record<ScreenName, () => React.JSX.Element>> = {
|
||||
connect: ConnectScreen,
|
||||
fleet: FleetScreen,
|
||||
detail: AgentDetailScreen,
|
||||
@@ -52,7 +59,9 @@ function Router() {
|
||||
memory: MemoryScreen,
|
||||
log: LogScreen,
|
||||
settings: SettingsScreen,
|
||||
}[screen];
|
||||
manage: ManageScreen,
|
||||
};
|
||||
const Screen = screens[screen] ?? FleetScreen;
|
||||
|
||||
return <Screen />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user