@agimon-ai/po-native 0.0.1-alpha.73 → 0.0.1-alpha.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agimon-ai/po-native",
3
- "version": "0.0.1-alpha.73",
3
+ "version": "0.0.1-alpha.74",
4
4
  "description": "Po for iOS and Android",
5
5
  "homepage": "https://agimon.ai",
6
6
  "bugs": {
@@ -29,17 +29,17 @@
29
29
  "access": "public"
30
30
  },
31
31
  "dependencies": {
32
- "@agimon-ai/po-core": "0.0.0-alpha.193",
33
- "@agimon-ai/po-expo-signing": "0.0.1-alpha.73",
34
- "@agimon-ai/po-identity": "0.0.2-alpha.140",
35
- "@agimon-ai/po-native-components": "0.0.0-alpha.193",
36
- "@agimon-ai/po-native-dashboard": "0.0.0-alpha.65",
37
- "@agimon-ai/po-template-advanced": "0.0.0-alpha.193",
38
- "@agimon-ai/po-template-elegant": "0.0.0-alpha.193",
39
- "@agimon-ai/po-voice": "0.0.0-alpha.193",
40
- "@agimon-ai/po-web-components": "0.0.0-alpha.193",
41
- "@agimon-ai/po-web-dashboard": "0.0.0-alpha.193",
42
- "@agimon-ai/po-web-security": "0.0.0-alpha.193",
32
+ "@agimon-ai/po-core": "0.0.0-alpha.194",
33
+ "@agimon-ai/po-expo-signing": "0.0.1-alpha.74",
34
+ "@agimon-ai/po-identity": "0.0.2-alpha.141",
35
+ "@agimon-ai/po-native-components": "0.0.0-alpha.194",
36
+ "@agimon-ai/po-native-dashboard": "0.0.0-alpha.66",
37
+ "@agimon-ai/po-template-advanced": "0.0.0-alpha.194",
38
+ "@agimon-ai/po-template-elegant": "0.0.0-alpha.194",
39
+ "@agimon-ai/po-voice": "0.0.0-alpha.194",
40
+ "@agimon-ai/po-web-components": "0.0.0-alpha.194",
41
+ "@agimon-ai/po-web-dashboard": "0.0.0-alpha.194",
42
+ "@agimon-ai/po-web-security": "0.0.0-alpha.194",
43
43
  "@better-auth/expo": "1.7.12",
44
44
  "@config-plugins/react-native-webrtc": "15.0.2",
45
45
  "@earendil-works/chord": "1.5.2",
package/src/app/App.tsx CHANGED
@@ -113,7 +113,11 @@ import {
113
113
  sessionSetupActionFor,
114
114
  } from '@agimon-ai/po-web-dashboard/core';
115
115
  import type { SettingsRepository } from '@agimon-ai/po-web-dashboard/types';
116
- import { type BottomTabBarProps, createBottomTabNavigator } from '@react-navigation/bottom-tabs';
116
+ import {
117
+ type BottomTabBarProps,
118
+ type BottomTabNavigationProp,
119
+ createBottomTabNavigator,
120
+ } from '@react-navigation/bottom-tabs';
117
121
  import { useHeaderHeight } from '@react-navigation/elements';
118
122
  import {
119
123
  DarkTheme,
@@ -1357,7 +1361,16 @@ function SessionRoute({
1357
1361
  const tab =
1358
1362
  transientTabs.find((candidate) => candidate.id === detail.params.tabId) ??
1359
1363
  webTabs(ownerSessionId).find((candidate) => candidate.id === detail.params.tabId);
1360
- if (!tab) return <EmptyState title="This activity is no longer available." />;
1364
+ if (!tab)
1365
+ return (
1366
+ <EmptyState
1367
+ size="page"
1368
+ tone="error"
1369
+ title="This activity is no longer available"
1370
+ description="It closed or finished. The conversation keeps everything it produced."
1371
+ action={{ label: 'Go back', onAction: () => child.goBack() }}
1372
+ />
1373
+ );
1361
1374
  let setTabHeader = tabHeaders.current.get(tab.id);
1362
1375
  if (!setTabHeader) {
1363
1376
  const label = tab.label;
@@ -1610,7 +1623,16 @@ function SettingsPanelRoute({ route }: NativeStackScreenProps<Routes, 'SettingsP
1610
1623
  const { hostId } = route.params;
1611
1624
  const panel = useSettingsPanels(hostId).find((candidate) => candidate.id === route.params.id);
1612
1625
  const request = useMemo(() => (hostId === undefined ? requestWithStepUp : apiTransportForHost(hostId)), [hostId]);
1613
- if (!panel) return <EmptyState title="This page is not installed" description="Go back to Settings." />;
1626
+ if (!panel)
1627
+ return (
1628
+ <EmptyState
1629
+ size="page"
1630
+ tone="error"
1631
+ title="This page is not installed"
1632
+ description="The plugin that adds it is off or not on this computer."
1633
+ action={{ label: 'Go back', onAction: () => navigation.goBack() }}
1634
+ />
1635
+ );
1614
1636
  const Panel = panel.component;
1615
1637
  return (
1616
1638
  <SettingsPanelPage {...(panel.detail ? { detail: panel.detail } : {})}>
@@ -1871,12 +1893,21 @@ function PresetsRoute({ route }: NativeStackScreenProps<Routes, 'SettingsPresets
1871
1893
  );
1872
1894
  }
1873
1895
 
1874
- function ContributedSectionRoute({ route }: NativeStackScreenProps<Routes, 'SettingsSection'>) {
1896
+ function ContributedSectionRoute({ route, navigation }: NativeStackScreenProps<Routes, 'SettingsSection'>) {
1875
1897
  const { id, hostId, workspace } = route.params;
1876
1898
  const section = useSettingsSections(workspace ? 'workspace' : 'host', hostId).find(
1877
1899
  (candidate) => candidate.id === id,
1878
1900
  );
1879
- if (!section) return <EmptyState title="This page is not installed" description="Go back to Settings." />;
1901
+ if (!section)
1902
+ return (
1903
+ <EmptyState
1904
+ size="page"
1905
+ tone="error"
1906
+ title="This page is not installed"
1907
+ description="The plugin that adds it is off or not on this computer."
1908
+ action={{ label: 'Go back', onAction: () => navigation.goBack() }}
1909
+ />
1910
+ );
1880
1911
  return <ContributedSection section={section} workspace={workspace} hostId={hostId} />;
1881
1912
  }
1882
1913
 
@@ -2847,7 +2878,16 @@ function useCalendarHostProps(hostStates: readonly HostRuntimeState[], hostId: s
2847
2878
  }
2848
2879
 
2849
2880
  /** Workspace compositions mount eagerly in liveRuntime, independently of session focus. */
2850
- function WorkspaceRoute({ workspaceId, hostStates }: { workspaceId: string; hostStates: readonly HostRuntimeState[] }) {
2881
+ function WorkspaceRoute({
2882
+ workspaceId,
2883
+ hostStates,
2884
+ onReconnect,
2885
+ }: {
2886
+ workspaceId: string;
2887
+ hostStates: readonly HostRuntimeState[];
2888
+ /** Reconnects one computer, as Settings' Retry does; the Workspace page offers it when that computer is offline or failed. */
2889
+ onReconnect: (host: HostRuntimeState['host']) => void;
2890
+ }) {
2851
2891
  const navigation = useNavigation<NativeStackNavigationProp<Routes>>();
2852
2892
  useSyncExternalStore(subscribeWebPluginRegistry, webPluginRegistryRevision);
2853
2893
  const workspace = useStore(workspacesStore, (state) => state.byId[workspaceId]);
@@ -2862,7 +2902,14 @@ function WorkspaceRoute({ workspaceId, hostStates }: { workspaceId: string; host
2862
2902
  const openWorkspace = useOpenWorkspace(owner?.hostId);
2863
2903
  const { loading, error } = useActivityLoad(owner?.hostId, ['catalog', 'host', `workspace:${workspaceId}`]);
2864
2904
  const state = workspacePageState({ hostStatus: host?.status, workspace, loading, error });
2865
- if (!owner || state !== 'ready') return <WorkspaceScreen state={owner ? state : 'missing'} error={error} />;
2905
+ if (!owner || state !== 'ready')
2906
+ return (
2907
+ <WorkspaceScreen
2908
+ state={owner ? state : 'missing'}
2909
+ error={error}
2910
+ {...(host ? { onRetry: () => onReconnect(host.host) } : {})}
2911
+ />
2912
+ );
2866
2913
  const registry = webPluginRegistryForHost(owner.hostId);
2867
2914
  const fills = (slot: string) =>
2868
2915
  [
@@ -2983,7 +3030,16 @@ function PluginPageRoute({
2983
3030
  const calendarHost = useCalendarHostProps(hostStates, pageHostId);
2984
3031
  const openWorkspace = useOpenWorkspace(pageHostId);
2985
3032
  const richRenderers = useMemo(createRichActivityRenderers, []);
2986
- if (!Page) return <EmptyState title="This page is not installed" description="Go back to Home." />;
3033
+ if (!Page)
3034
+ return (
3035
+ <EmptyState
3036
+ size="page"
3037
+ tone="error"
3038
+ title="This page is not installed"
3039
+ description="The plugin that adds it is off or not on this computer."
3040
+ action={{ label: 'Go back', onAction: () => navigation.goBack() }}
3041
+ />
3042
+ );
2987
3043
  const props = {
2988
3044
  ...nativeSlotProps('', {}, () => undefined, undefined, { ...richRenderers, nativeSaveFile }),
2989
3045
  sessionId: null,
@@ -3182,24 +3238,27 @@ function HomeAttentionRoute({
3182
3238
 
3183
3239
  /** Until the phone is connected, the other tabs point back to Home, or offer Restore when it is already paired. */
3184
3240
  function ConnectFirst({ restore }: { restore?: { onRestore: () => void; busy: boolean } }) {
3241
+ // Only the Sessions and Settings tabs draw this, so the nearest navigator is the tab bar.
3242
+ const tabs = useNavigation<BottomTabNavigationProp<TabRoutes>>();
3185
3243
  if (!restore) {
3186
- return <EmptyState title="Not connected yet." description="Connect this phone to Po from Home." />;
3244
+ return (
3245
+ <EmptyState
3246
+ size="page"
3247
+ icon={<HomeIcon size={24} />}
3248
+ title="Not connected yet"
3249
+ description="Connect this phone to Po from Home."
3250
+ action={{ label: 'Go to Home', onAction: () => tabs.navigate('Home') }}
3251
+ />
3252
+ );
3187
3253
  }
3188
3254
  return (
3189
3255
  <EmptyState
3190
- title="Not connected right now."
3256
+ size="page"
3257
+ tone="error"
3258
+ title="Not connected right now"
3191
3259
  description="This phone is paired, but Po on your computer is not reachable."
3192
- >
3193
- <Button
3194
- variant="primary"
3195
- size="md"
3196
- loading={restore.busy}
3197
- loadingLabel="Restoring the connection"
3198
- onPress={restore.onRestore}
3199
- >
3200
- Restore connection
3201
- </Button>
3202
- </EmptyState>
3260
+ action={{ label: 'Restore connection', onAction: restore.onRestore, loading: restore.busy }}
3261
+ />
3203
3262
  );
3204
3263
  }
3205
3264
 
@@ -3807,7 +3866,13 @@ export function App({ nativeHost }: { nativeHost?: (sessionId: string) => Native
3807
3866
  getId={({ params }) => params.workspaceId}
3808
3867
  options={({ route }) => ({ title: route.params.title })}
3809
3868
  >
3810
- {({ route }) => <WorkspaceRoute workspaceId={route.params.workspaceId} hostStates={hostStates} />}
3869
+ {({ route }) => (
3870
+ <WorkspaceRoute
3871
+ workspaceId={route.params.workspaceId}
3872
+ hostStates={hostStates}
3873
+ onReconnect={(saved) => void hosts.current?.connect(saved).catch(() => undefined)}
3874
+ />
3875
+ )}
3811
3876
  </Stack.Screen>
3812
3877
  <Stack.Screen name="CalendarDetail" options={{ title: 'Event details' }}>
3813
3878
  {({ route }) => (
@@ -1,7 +1,7 @@
1
1
  import { encodeBase64 } from '@agimon-ai/po-core/native';
2
2
  import {
3
3
  createStarterProfile,
4
- runCommand,
4
+ invokeModeAction,
5
5
  saveStarterAboutYou,
6
6
  STARTER_POS,
7
7
  type StarterPo,
@@ -18,8 +18,6 @@ import { openFirstSession } from '../services/hostActions';
18
18
  import { listProviders } from '../services/settingsApi';
19
19
  import { rememberFirstSessionWelcome } from './firstSteps';
20
20
 
21
- /** The mode's own activate action, as the mode menu sends it: a mode already on stays on. */
22
- const HELP_COMMAND = 'mode help activate';
23
21
  const NOT_LISTED = 'Your Po is ready, but its conversation has not shown up yet. Pull to refresh Home.';
24
22
 
25
23
  /** The panda as a PNG data URL for the profile; undefined if it cannot be read, so the Po starts without one. */
@@ -100,7 +98,10 @@ export function OnboardingRoute({
100
98
  const { sessionId } = opened;
101
99
  rememberFirstSessionWelcome({ sessionId, poId: chosen.id, name: name.trim(), interests: interests.trim() });
102
100
  if (!(await waitForSession(sessionId))) return fail(NOT_LISTED);
103
- void whenSessionReady(sessionId, () => runCommand(HELP_COMMAND, sessionId));
101
+ // The mode's own activate action over the modes API, as the mode menu sends it: a mode already on stays on.
102
+ void whenSessionReady(sessionId, () =>
103
+ invokeModeAction('help', 'activate', sessionId, apiTransportForHost(hostId)),
104
+ );
104
105
  onOpenSession(sessionId);
105
106
  };
106
107
 
@@ -1,8 +1,10 @@
1
1
  import type { WebPluginSlotProps } from '@agimon-ai/po-core/web';
2
2
  import {
3
3
  Badge,
4
+ BoxIcon,
4
5
  ChevronDownIcon,
5
6
  ChevronRightIcon,
7
+ EmptyState,
6
8
  fontOf,
7
9
  Input,
8
10
  SearchIcon,
@@ -219,14 +221,22 @@ export function ContextFaceView({
219
221
  </View>
220
222
  {children}
221
223
  {rows.length === 0 ? (
222
- <View style={styles.empty}>
223
- <Text style={styles.emptyTitle}>{groups.length === 0 ? 'No composition yet' : 'No matches'}</Text>
224
- <Text style={styles.meta}>
225
- {groups.length === 0
226
- ? 'The session reports its preset, modes and domains once it has started.'
227
- : 'Try a mode, package, tool or skill name.'}
228
- </Text>
229
- </View>
224
+ groups.length === 0 ? (
225
+ <EmptyState
226
+ size="compact"
227
+ icon={<BoxIcon size={16} />}
228
+ title="No composition yet"
229
+ description="The session reports its preset, modes and domains once it has started."
230
+ />
231
+ ) : (
232
+ <EmptyState
233
+ size="compact"
234
+ icon={<SearchIcon size={16} />}
235
+ title="No matches"
236
+ description="Try a mode, package, tool or skill name."
237
+ secondaryAction={{ label: 'Clear search', onAction: () => setSearch('') }}
238
+ />
239
+ )
230
240
  ) : (
231
241
  <View style={[styles.listHead, styles.frame, styles.frameTop]}>
232
242
  <Text style={styles.meta}>Loaded context</Text>
@@ -350,16 +360,6 @@ const styles = StyleSheet.create((theme) => {
350
360
  search: { justifyContent: 'center' },
351
361
  searchInput: { paddingLeft: theme.spacing(9) },
352
362
  searchIcon: { position: 'absolute', left: theme.spacing(3) },
353
- empty: {
354
- gap: theme.spacing(1),
355
- paddingHorizontal: theme.spacing(4),
356
- paddingVertical: theme.spacing(5),
357
- borderRadius: theme.borderRadius.lg,
358
- borderWidth: 1,
359
- borderStyle: 'dashed',
360
- borderColor: theme.colors.border,
361
- },
362
- emptyTitle: { ...text('base', theme.colors.hi), fontWeight: theme.fontWeight.semibold },
363
363
  listHead: {
364
364
  flexDirection: 'row',
365
365
  justifyContent: 'space-between',
@@ -16,6 +16,7 @@ import {
16
16
  sessionStoreFor,
17
17
  useBotWake,
18
18
  setPendingMenu,
19
+ toggleMode,
19
20
  } from '@agimon-ai/po-web-dashboard/core';
20
21
  import { useStore } from '@tanstack/react-store';
21
22
  import { type ComponentProps, type ReactElement, useCallback, useEffect, useMemo, useRef, useState } from 'react';
@@ -208,7 +209,7 @@ function OpenSessionOptionsSheet({ sessionId, open, onOpenChange }: SessionOptio
208
209
  disabled: mode.availability === 'unavailable',
209
210
  hint: mode.availability === 'unavailable' ? mode.unavailableReason || 'Unavailable in this session' : mode.detail,
210
211
  }));
211
- onPick = (id) => whenConnected(sessionId, () => runCommand(`/mode ${id}`, sessionId));
212
+ onPick = (id) => whenConnected(sessionId, () => void toggleMode(id, sessionId, nativeApiTransport));
212
213
  } else if (page === 'model') {
213
214
  body = (
214
215
  <Input
@@ -10,6 +10,7 @@ import {
10
10
  DropdownMenuTrigger,
11
11
  DropdownMenuContent,
12
12
  DropdownMenuItem,
13
+ EmptyState,
13
14
  fontOf,
14
15
  } from '@agimon-ai/po-native-components';
15
16
  import { Text, View } from 'react-native';
@@ -65,8 +66,15 @@ export function ClientDevicesView(p: ClientDevicesViewProps) {
65
66
  </View>
66
67
  </Group>
67
68
  <Group label={`Devices on ${p.hostLabel}`} hint="Names are labels, not access permissions.">
68
- {p.status === 'loading' || !p.devices.length ? (
69
- <Row title={p.status === 'loading' ? 'Loading devices…' : 'No devices recorded yet'} last />
69
+ {p.status === 'loading' ? (
70
+ <Row title="Loading devices…" last />
71
+ ) : !p.devices.length ? (
72
+ <EmptyState
73
+ size="compact"
74
+ surface="plain"
75
+ title="No devices recorded yet"
76
+ description="Phones and computers that sign in to this computer show here."
77
+ />
70
78
  ) : (
71
79
  p.devices.map((device, index) => (
72
80
  <Row
@@ -7,6 +7,7 @@ import {
7
7
  DropdownMenuContent,
8
8
  DropdownMenuItem,
9
9
  DropdownMenuTrigger,
10
+ EmptyState,
10
11
  fontOf,
11
12
  Input,
12
13
  Label,
@@ -76,7 +77,12 @@ export function AccountHostsView({
76
77
  </View>
77
78
  ))
78
79
  ) : (
79
- <Row title="No hosts in this account" last />
80
+ <EmptyState
81
+ size="compact"
82
+ surface="plain"
83
+ title="No hosts in this account"
84
+ description="Computers you add to this account show here."
85
+ />
80
86
  )}
81
87
  </Group>
82
88
  );
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  Button,
3
+ EmptyState,
3
4
  fontOf,
4
5
  Input,
5
6
  Label,
@@ -340,7 +341,12 @@ export function McpServersScreen({
340
341
  {servers ? (
341
342
  <Group label="Servers">
342
343
  {servers.length === 0 ? (
343
- <Row title="No servers yet" description="Servers you add here are available in every repository." last />
344
+ <EmptyState
345
+ size="compact"
346
+ surface="plain"
347
+ title="No servers yet"
348
+ description="Servers you add here are available in every repository."
349
+ />
344
350
  ) : (
345
351
  servers.map((server, index) => (
346
352
  <Row
@@ -1,4 +1,5 @@
1
1
  import {
2
+ BoxIcon,
2
3
  Button,
3
4
  CheckIcon,
4
5
  EmptyState,
@@ -6,6 +7,7 @@ import {
6
7
  InfoStrip,
7
8
  Input,
8
9
  Panel,
10
+ SearchIcon,
9
11
  SegmentedControl,
10
12
  Spinner,
11
13
  StatusBadge,
@@ -116,10 +118,27 @@ export function PluginCatalogScreen(props: PluginCatalogScreenProps) {
116
118
  />
117
119
  </Group>
118
120
  ) : plugins.length === 0 ? (
119
- <EmptyState
120
- title="No plugins match"
121
- description={props.query ? `Nothing matches "${props.query}". Try a shorter word.` : 'Nothing here yet.'}
122
- />
121
+ props.query ? (
122
+ <EmptyState
123
+ icon={<SearchIcon size={20} />}
124
+ title="No plugins match"
125
+ description={`Nothing matches "${props.query}". Try a shorter word.`}
126
+ secondaryAction={{ label: 'Clear search', onAction: () => props.onQueryChange('') }}
127
+ />
128
+ ) : props.category !== ALL_CATEGORIES ? (
129
+ <EmptyState
130
+ icon={<BoxIcon size={20} />}
131
+ title="No plugins in this category"
132
+ description={`Nothing in this category on ${scope.host} yet.`}
133
+ secondaryAction={{ label: 'Show all', onAction: () => props.onCategoryChange(ALL_CATEGORIES) }}
134
+ />
135
+ ) : (
136
+ <EmptyState
137
+ icon={<BoxIcon size={20} />}
138
+ title="No plugins yet"
139
+ description={`${scope.host} has no plugins to offer right now.`}
140
+ />
141
+ )
123
142
  ) : (
124
143
  <Group label="Plugins" hint={`${String(plugins.length)} shown`}>
125
144
  {plugins.map((plugin, index) => (
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  Button,
3
+ EmptyState,
3
4
  fontOf,
4
5
  Input,
5
6
  SegmentedControl,
@@ -87,7 +88,9 @@ export function PresetsScreen(props: PresetsScreenProps) {
87
88
  ) : (
88
89
  <Group label="Presets">
89
90
  {presets.length === 0 ? (
90
- <StateRow
91
+ <EmptyState
92
+ size="compact"
93
+ surface="plain"
91
94
  title="No presets here yet"
92
95
  description={`${scope.label} uses the presets on ${scope.host}. Make one to give it its own.`}
93
96
  />
@@ -2,6 +2,7 @@ import { hostRevisionTopic, hubRevision, subscribeHubRevision } from '@agimon-ai
2
2
  import {
3
3
  Button,
4
4
  Dot,
5
+ EmptyState,
5
6
  fontOf,
6
7
  Input,
7
8
  Sheet,
@@ -368,7 +369,12 @@ export function ProvidersScreen({
368
369
  <Group label="Connected">{rows(connected)}</Group>
369
370
  ) : (
370
371
  <Group label="Connected">
371
- <Row title="Nothing connected yet" description="Pick a provider below. Po takes it from there." last />
372
+ <EmptyState
373
+ size="compact"
374
+ surface="plain"
375
+ title="Nothing connected yet"
376
+ description="Pick a provider below. Po takes it from there."
377
+ />
372
378
  </Group>
373
379
  )
374
380
  ) : null}
@@ -1,5 +1,5 @@
1
1
  import type { RemoteAccessStateView, TunnelConfig } from '@agimon-ai/po-core/remoteContract';
2
- import { Badge, Button, Dot, fontOf, Spinner } from '@agimon-ai/po-native-components';
2
+ import { Badge, Button, Dot, EmptyState, fontOf, Spinner } from '@agimon-ai/po-native-components';
3
3
  import { useCallback, useEffect, useState } from 'react';
4
4
  import { Alert, ScrollView, Text } from 'react-native';
5
5
  import { StyleSheet } from 'react-native-unistyles';
@@ -108,7 +108,14 @@ export function RemoteControlScreen({ remote, error, busy, turnOff, revokeDevice
108
108
  <OnComputer>Tunnel settings and pairing codes change on your computer only.</OnComputer>
109
109
 
110
110
  <Group label="Trusted devices">
111
- {remote.trustedDevices.length === 0 ? <Row title="No trusted devices." last /> : null}
111
+ {remote.trustedDevices.length === 0 ? (
112
+ <EmptyState
113
+ size="compact"
114
+ surface="plain"
115
+ title="No trusted devices"
116
+ description="Devices you pair for remote control show here."
117
+ />
118
+ ) : null}
112
119
  {remote.trustedDevices.map((device, index) => (
113
120
  <Row
114
121
  key={device.id}
@@ -1,4 +1,13 @@
1
- import { EmptyState, fontOf, HostTag, InfoStrip, List, ListRow, LiveDuration } from '@agimon-ai/po-native-components';
1
+ import {
2
+ EmptyState,
3
+ fontOf,
4
+ HostTag,
5
+ InfoStrip,
6
+ List,
7
+ ListRow,
8
+ LiveDuration,
9
+ MessageIcon,
10
+ } from '@agimon-ai/po-native-components';
2
11
  import { Text, View } from 'react-native';
3
12
  import { StyleSheet } from 'react-native-unistyles';
4
13
 
@@ -91,7 +100,14 @@ export function SessionListScreen({ sessions, onOpen, hosts, connections, embedd
91
100
  keyExtractor={(item) => item.id}
92
101
  renderItem={row}
93
102
  header={notes}
94
- empty={<EmptyState title="No sessions yet." description="Start one in Po on your computer." />}
103
+ empty={
104
+ <EmptyState
105
+ size="page"
106
+ icon={<MessageIcon size={24} />}
107
+ title="No sessions yet"
108
+ description="Sessions you start on this phone or on your computer show here."
109
+ />
110
+ }
95
111
  />
96
112
  </View>
97
113
  );
@@ -1,4 +1,4 @@
1
- import { EmptyState, Spinner } from '@agimon-ai/po-native-components';
1
+ import { EmptyState, FolderIcon, MonitorIcon, Spinner } from '@agimon-ai/po-native-components';
2
2
  import { ScrollView, View } from 'react-native';
3
3
  import { StyleSheet } from 'react-native-unistyles';
4
4
 
@@ -6,9 +6,21 @@ import { DashboardTiles, type NativeDashboardTile } from '../components/Dashboar
6
6
  import type { WorkspacePageState } from './workspaceModel';
7
7
 
8
8
  const messages = {
9
- missing: { title: 'Workspace not found', description: 'This workspace or its computer is no longer available.' },
10
- offline: { title: 'This computer is offline', description: 'Reconnect to see this workspace’s tiles.' },
11
- unavailable: { title: 'Workspace unavailable', description: 'Open Po on its computer to check this workspace.' },
9
+ missing: {
10
+ icon: <FolderIcon size={24} />,
11
+ title: 'Workspace not found',
12
+ description: 'This workspace or its computer is no longer available.',
13
+ },
14
+ offline: {
15
+ icon: <MonitorIcon size={24} />,
16
+ title: 'This computer is offline',
17
+ description: 'Reconnect to see this workspace’s tiles.',
18
+ },
19
+ unavailable: {
20
+ icon: <FolderIcon size={24} />,
21
+ title: 'Workspace unavailable',
22
+ description: 'Open Po on its computer to check this workspace.',
23
+ },
12
24
  error: { title: 'Workspace tiles could not load', description: 'Try reconnecting to this computer.' },
13
25
  };
14
26
 
@@ -17,10 +29,13 @@ export function WorkspaceScreen({
17
29
  state,
18
30
  tiles = [],
19
31
  error,
32
+ onRetry,
20
33
  }: {
21
34
  state: WorkspacePageState;
22
35
  tiles?: readonly NativeDashboardTile[];
23
36
  error?: string;
37
+ /** Reconnects to the workspace's computer; absent leaves the offline and failed cards without a button. */
38
+ onRetry?: () => void;
24
39
  }) {
25
40
  return (
26
41
  <ScrollView style={styles.screen} contentContainerStyle={styles.content} contentInsetAdjustmentBehavior="automatic">
@@ -29,9 +44,21 @@ export function WorkspaceScreen({
29
44
  <Spinner label="Loading workspace" />
30
45
  </View>
31
46
  ) : state !== 'ready' ? (
32
- <EmptyState {...messages[state]} {...(state === 'error' && error ? { description: error } : {})} />
47
+ <EmptyState
48
+ size="page"
49
+ {...messages[state]}
50
+ {...(state === 'error' ? { tone: 'error' as const, ...(error ? { description: error } : {}) } : {})}
51
+ {...((state === 'error' || state === 'offline') && onRetry
52
+ ? { action: { label: 'Retry', onAction: onRetry } }
53
+ : {})}
54
+ />
33
55
  ) : tiles.length === 0 ? (
34
- <EmptyState title="No workspace tiles yet" description="Apps that support this workspace appear here." />
56
+ <EmptyState
57
+ size="page"
58
+ icon={<FolderIcon size={24} />}
59
+ title="No workspace tiles yet"
60
+ description="Apps that support this workspace appear here."
61
+ />
35
62
  ) : (
36
63
  <DashboardTiles tiles={tiles} />
37
64
  )}
@@ -3,6 +3,7 @@ import {
3
3
  Button,
4
4
  CheckIcon,
5
5
  Dot,
6
+ EmptyState,
6
7
  fontOf,
7
8
  BranchIcon,
8
9
  FolderIcon,
@@ -335,7 +336,12 @@ export function McpCatalogScreen({ catalog, busy, error, onDiscover, onRetry }:
335
336
  <ErrorLine>{error}</ErrorLine>
336
337
  <Group label="Servers">
337
338
  {catalog.servers.length === 0 ? (
338
- <Row title="No servers yet" description="Add one in Po on your computer, then discover it here." last />
339
+ <EmptyState
340
+ size="compact"
341
+ surface="plain"
342
+ title="No servers yet"
343
+ description="Add one in Po on your computer, then discover it here."
344
+ />
339
345
  ) : (
340
346
  catalog.servers.map((server, index) => {
341
347
  const line = serverLine(server);