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:
Claude
2026-08-13 13:48:50 +00:00
parent 25cf6c9f5b
commit 804baadddd
7 changed files with 447 additions and 4 deletions
+12 -3
View File
@@ -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 />;
}