@agimon-ai/po-web-dashboard 0.0.0-alpha.205 → 0.0.0-alpha.207

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.
@@ -191,6 +191,7 @@ function HomePage({ onShowSessions, navigationToggle = "mobile", bare, hosts: su
191
191
  key: hostId,
192
192
  request: dashboardRequests[hostId]
193
193
  },
194
+ openSession: (sessionId) => props.openSession?.(require_hostIdentity.qualifyHostId(hostId, sessionId)),
194
195
  openPage: (pageId, itemId) => {
195
196
  navigate({
196
197
  to: "/page/$pageId",
@@ -1 +1 @@
1
- {"version":3,"file":"HomePage.cjs","names":["useT","Button","SidebarIcon","Select","SelectTrigger","SelectValue","SelectContent","SelectItem","useState","EmptyState","ServerIcon","GridIcon","DashboardTileGrid","splitHostId","webPluginRegistryForHost","HOST_SLOTS","hostSlotFillsAcrossHosts","useWebPluginRegistry","useMemo","registeredWebPluginHostIds","useSyncExternalStore","usePluginSlotProps","useNavigate","useStore","workspaceHostLabelsStore","sessionsStore","useRailEntries","workspacesStore","useSessionAvatars","accountStore","providerStatusStore","refreshProviderStatus","fetchWithStepUpForHost","homePageRoute","qualifyHostId","Badge","dashboardTileFills","legacyHomeAppFills","dashboardTileFillsAcrossHosts","homeAppEntries","createElement","parseDashboardTileData","useHomeReads","pluginHomeContributions","homeActivity","CtaCard","HomeActivity"],"sources":["../../../src/web/components/HomePage.tsx"],"sourcesContent":["import { useT, type HomeAttentionCountSource } from '@agimon-ai/po-core/web';\nimport {\n Badge,\n Button,\n CtaCard,\n EmptyState,\n type EmptyStateProps,\n GridIcon,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n ServerIcon,\n SidebarIcon,\n} from '@agimon-ai/po-web-components';\nimport { fetchWithStepUpForHost } from '@agimon-ai/po-web-security/browser';\nimport { useNavigate } from '@tanstack/react-router';\nimport { useStore } from '@tanstack/react-store';\nimport { createElement, useEffect, useMemo, useState, useSyncExternalStore, type ReactNode } from 'react';\n\nimport { homeActivity, type HomeHostRead, type HomeTarget } from '../lib/homeActivity';\nimport { homeAppEntries, homePageRoute } from '../lib/homeApps';\nimport { qualifyHostId, splitHostId } from '../lib/hostIdentity';\nimport {\n dashboardTileFills,\n dashboardTileFillsAcrossHosts,\n hostSlotFillsAcrossHosts,\n pluginHomeContributions,\n registeredWebPluginHostIds,\n webPluginRegistryForHost,\n HOST_SLOTS,\n legacyHomeAppFills,\n parseDashboardTileData,\n type InstalledHomeContribution,\n} from '../lib/pluginRegistry';\nimport { accountStore } from '../stores/accountStore';\nimport { providerStatusStore, refreshProviderStatus } from '../stores/providerStatusStore';\nimport { sessionsStore, useRailEntries } from '../stores/sessionsStore';\nimport { setDockOpen, setDockTab } from '../stores/uiStore';\nimport { useHomeReads } from '../stores/useHomeReads';\nimport { usePluginSlotProps } from '../stores/usePluginSlotProps';\nimport { useSessionAvatars } from '../stores/useSessionAvatars';\nimport { useWebPluginRegistry } from '../stores/useWebPluginRegistry';\nimport { workspaceHostLabelsStore, workspacesStore } from '../stores/workspacesStore';\nimport { DashboardTileGrid, type DashboardTileView } from './DashboardTileGrid';\nimport { HomeActivity } from './HomeActivity';\n\nexport interface HomeHost {\n id: string;\n name: string;\n connected?: boolean;\n person?: { issuer: string; subject: string };\n /** Local plugin ids admitted by the shell's package fingerprint check. Missing means none. */\n admittedPluginIds?: readonly string[];\n openOnHostUrl?: string;\n}\n\nexport interface HomeViewProps {\n hosts?: readonly HomeHost[];\n tiles?: readonly (DashboardTileView & { hostId?: string })[];\n /** Legacy callers may still supply full cards; new callers supply ordered tiles instead. */\n main?: readonly ReactNode[];\n side?: readonly ReactNode[];\n title?: string;\n emptyTitle?: string;\n emptyDescription?: string;\n /** How the empty card reads: a whole page for a missing workspace, an error tone with Retry for a failed load. */\n empty?: Pick<EmptyStateProps, 'size' | 'tone' | 'icon' | 'action'>;\n onShowSessions?: () => void;\n navigationToggle?: 'mobile' | 'always';\n /** Drawn on a template's own background, such as a desktop: no page background and no heading. */\n bare?: boolean;\n}\n\nfunction SessionsToggle({\n onShowSessions,\n navigationToggle,\n}: {\n onShowSessions: () => void;\n navigationToggle: 'mobile' | 'always';\n}) {\n const t = useT();\n return (\n <div className={`shrink-0 px-3 pt-2 ${navigationToggle === 'mobile' ? 'md:hidden' : ''}`}>\n <Button\n variant=\"ghost\"\n size=\"icon-md\"\n data-testid=\"mobile-sessions-open\"\n title={t('webDashboard.common.showSessions', 'Show sessions')}\n aria-label={t('webDashboard.common.showSessions', 'Show sessions')}\n onClick={onShowSessions}\n className=\"rounded-lg bg-po-panel/60 text-po-text hover:bg-po-panel hover:text-po-hi\"\n >\n <SidebarIcon aria-hidden className=\"size-4\" />\n </Button>\n </div>\n );\n}\n\n/** Shown only with more than one host: a single host has nothing to filter. */\nfunction HostFilter({\n hosts,\n value,\n onChange,\n}: {\n hosts: readonly HomeHost[];\n value: string;\n onChange: (value: string) => void;\n}) {\n const t = useT();\n if (hosts.length < 2) return null;\n return (\n <Select value={value} onValueChange={onChange}>\n <SelectTrigger aria-label={t('webDashboard.home.filterByHost', 'Filter by host')} className=\"w-fit\">\n <SelectValue>\n {value === 'all'\n ? t('webDashboard.home.allHosts', 'All hosts')\n : hosts.find((host) => host.id === value)?.name}\n </SelectValue>\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"all\">{t('webDashboard.home.allHosts', 'All hosts')}</SelectItem>\n {hosts.map((host) => (\n <SelectItem key={host.id} value={host.id}>\n {host.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n );\n}\n\n/** The Workspace dashboard frame, independent of plugins, navigation and data loading. */\nexport function HomeView({\n tiles,\n hosts = [],\n main = [],\n side = [],\n title: suppliedTitle,\n emptyTitle: suppliedEmptyTitle,\n emptyDescription: suppliedEmptyDescription,\n empty,\n onShowSessions,\n navigationToggle = 'mobile',\n bare = false,\n}: HomeViewProps) {\n const t = useT();\n const title = suppliedTitle ?? t('webDashboard.home.title', 'Home');\n const emptyTitle = suppliedEmptyTitle ?? t('webDashboard.home.emptyTitle', 'Nothing on Home yet');\n const emptyDescription =\n suppliedEmptyDescription ?? t('webDashboard.home.emptyDescription', 'Apps you add show up here.');\n const [hostFilter, setHostFilter] = useState('all');\n const all = tiles ?? [\n ...main.map((body, index): DashboardTileView => ({ id: `main-${index}`, size: 'wide', body, legacy: true })),\n ...side.map((body, index): DashboardTileView => ({ id: `side-${index}`, size: 'small', body, legacy: true })),\n ];\n const entries = all.filter((tile) => hostFilter === 'all' || ('hostId' in tile && tile.hostId === hostFilter));\n return (\n <section\n aria-label={title}\n data-testid=\"home-page\"\n className={`flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto font-sans text-base text-po-text ${bare ? '' : 'bg-po-bg'}`}\n >\n {onShowSessions ? <SessionsToggle onShowSessions={onShowSessions} navigationToggle={navigationToggle} /> : null}\n <div className=\"mx-auto flex w-full max-w-6xl flex-col gap-6 px-4 py-6 md:px-8 md:py-8\">\n {bare ? null : <h1 className=\"text-2xl font-semibold text-po-hi\">{title}</h1>}\n <HostFilter hosts={hosts} value={hostFilter} onChange={setHostFilter} />\n {entries.length === 0 && all.length > 0 ? (\n // The filter hides every app; Home itself is not empty.\n <EmptyState\n icon={<ServerIcon />}\n title={t('webDashboard.home.noHostAppsTitle', 'No apps on this host')}\n description={t(\n 'webDashboard.home.noHostAppsDescription',\n 'Apps from your other hosts are hidden by the host filter.',\n )}\n secondaryAction={{\n label: t('webDashboard.home.showAllHosts', 'Show all hosts'),\n onAction: () => setHostFilter('all'),\n }}\n />\n ) : entries.length === 0 ? (\n <EmptyState icon={<GridIcon />} title={emptyTitle} description={emptyDescription} {...empty} />\n ) : (\n <DashboardTileGrid tiles={entries} />\n )}\n </div>\n </section>\n );\n}\n\ntype HostTile = DashboardTileView & { hostId?: string };\n\nconst unique = (entries: readonly InstalledHomeContribution[]) => [\n ...new Map(entries.map((entry) => [JSON.stringify([entry.pluginId, entry.id, entry.mount]), entry])).values(),\n];\n\nfunction homePluginAdmitted(hosts: readonly Omit<HomeHost, 'name'>[], hostId: string, pluginId: string): boolean {\n return (\n hosts.find(({ id }) => id === hostId)?.admittedPluginIds?.includes(splitHostId(pluginId)?.localId ?? pluginId) ===\n true\n );\n}\nfunction homeAttentionFills(hosts: readonly Omit<HomeHost, 'name'>[]) {\n const local = hosts.find(({ id }) => id === 'local');\n return [\n ...(hosts.length === 0 || local !== undefined\n ? webPluginRegistryForHost()\n .hostSlotFills(HOST_SLOTS.homeAttention)\n .map((fill) => ({\n fill,\n hostId: local?.id,\n key: JSON.stringify([fill.pluginId, fill.id]),\n }))\n : []),\n ...hostSlotFillsAcrossHosts(\n hosts.filter(({ id }) => id !== 'local'),\n HOST_SLOTS.homeAttention,\n (hostId, pluginId) => homePluginAdmitted(hosts, hostId, pluginId),\n ),\n ];\n}\n\nfunction isHomeAttentionCountSource(data: unknown): data is HomeAttentionCountSource {\n return (\n typeof data === 'object' &&\n data !== null &&\n 'subscribe' in data &&\n typeof data.subscribe === 'function' &&\n 'getSnapshot' in data &&\n typeof data.getSnapshot === 'function'\n );\n}\n\n/** Subscribe while away from Home too; resolving a card, not visiting Home, changes the count. */\nexport function useHomeAttentionCount(hosts?: readonly HomeHost[]): number {\n const revision = useWebPluginRegistry();\n const { subscribe, getSnapshot } = useMemo(() => {\n const sources = new Set(\n homeAttentionFills(hosts ?? registeredWebPluginHostIds().map((id) => ({ id })))\n .filter(({ fill }) => fill.component !== undefined)\n .map(({ fill }) => fill.data)\n .filter(isHomeAttentionCountSource),\n );\n return {\n subscribe: (listener: () => void) => {\n const stops = Array.from(sources, (source) => source.subscribe(listener));\n return () => stops.forEach((stop) => stop());\n },\n getSnapshot: () => {\n let total = 0;\n for (const source of sources) {\n const count = source.getSnapshot();\n if (Number.isSafeInteger(count) && count > 0) total += count;\n }\n return total;\n },\n };\n }, [hosts, revision]);\n return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);\n}\n\n/** Home joins host fills and session facts independently of the focused session or workspace. */\nexport function HomePage({\n onShowSessions,\n navigationToggle = 'mobile',\n bare,\n hosts: suppliedHosts,\n}: {\n onShowSessions?: () => void;\n navigationToggle?: 'mobile' | 'always';\n bare?: boolean;\n hosts?: readonly HomeHost[];\n}) {\n const t = useT();\n const props = usePluginSlotProps(null);\n const navigate = useNavigate();\n const labels = useStore(workspaceHostLabelsStore, (state) => state);\n const [hostFilter, setHostFilter] = useState('all');\n const [showEarlier, setShowEarlier] = useState(false);\n const order = useStore(sessionsStore, (state) => state.order);\n const byId = useRailEntries();\n const workspaceOrder = useStore(workspacesStore, (state) => state.order);\n const avatarUrls = useSessionAvatars(order, byId);\n const account = useStore(accountStore, (state) => state);\n const providerConnected = useStore(providerStatusStore, (state) => state.connected);\n useEffect(() => {\n void refreshProviderStatus().catch((error: unknown) => console.warn('Provider status unavailable.', error));\n }, []);\n const coordinatorName =\n order.map((id) => byId[id]?.summary).find((summary) => summary?.sessionProvenance === 'coordinator')?.name ??\n t('webDashboard.home.yourAgent', 'Your agent');\n const hosts: readonly HomeHost[] =\n suppliedHosts ??\n registeredWebPluginHostIds().map((id) => ({\n id,\n name: labels[id] ?? t('webDashboard.home.computer', 'Computer {id}', { id: id.slice(0, 8) }),\n }));\n const several = hosts.length > 1;\n const remoteHosts = hosts.filter((host) => host.id !== 'local');\n const localHost = hosts.find((host) => host.id === 'local');\n const visible = (hostId: string | undefined) => hostFilter === 'all' || (hostId ?? 'local') === hostFilter;\n const admitted = (hostId: string, pluginId: string) => homePluginAdmitted(hosts, hostId, pluginId);\n const dashboardRequests = useMemo(\n () => Object.fromEntries(remoteHosts.map(({ id }) => [id, fetchWithStepUpForHost(id)])),\n [hosts],\n );\n const forHost = (hostId: string | undefined) =>\n hostId === undefined || hostId === 'local'\n ? props\n : {\n ...props,\n dashboardApi: { key: hostId, request: dashboardRequests[hostId] },\n openPage: (pageId: string, itemId?: string) => {\n void navigate({\n to: '/page/$pageId',\n params: { pageId: homePageRoute(hostId, pageId).pageId },\n ...(itemId === undefined ? {} : { search: { item: itemId } }),\n });\n },\n openSettings: (section: string) => {\n void navigate({ to: '/settings/$section', params: { section: qualifyHostId(hostId, section) } });\n },\n };\n // ponytail: an attention card left idle on another host still shows its host badge; render the badge inside the card when one renders nothing often.\n const tag = (hostId: string | undefined, body: ReactNode) =>\n hostId === undefined || !several ? (\n body\n ) : (\n <>\n <Badge>{hosts.find((host) => host.id === hostId)?.name ?? hostId}</Badge>\n {body}\n </>\n );\n const localFills =\n hosts.length === 0 || localHost !== undefined\n ? [...dashboardTileFills({ scope: 'host' }), ...legacyHomeAppFills()].map((fill) => ({\n fill,\n hostId: localHost?.id,\n key: JSON.stringify([fill.pluginId, fill.id]),\n }))\n : [];\n const fills = [\n ...localFills,\n ...dashboardTileFillsAcrossHosts(remoteHosts, admitted),\n ...homeAppEntries(remoteHosts, (id) =>\n webPluginRegistryForHost(id)\n .legacyHomeAppFills()\n .filter((fill) => admitted(id, fill.pluginId)),\n ),\n ].sort((left, right) => left.fill.order - right.fill.order || left.key.localeCompare(right.key));\n // What waits on the person leads the main column; each fill draws its own frame and hides when idle.\n const attention: HostTile[] = homeAttentionFills(hosts).flatMap(({ fill, hostId, key }) =>\n fill.component === undefined\n ? []\n : [\n {\n id: key,\n ...(hostId === undefined ? {} : { hostId }),\n size: 'wide' as const,\n column: 'main' as const,\n legacy: true,\n body: tag(hostId, createElement(fill.component, forHost(hostId))),\n },\n ],\n );\n const tiles: HostTile[] = [];\n for (const { fill, hostId, key } of fills) {\n const component = fill.component;\n if (component === undefined) continue;\n const data = parseDashboardTileData(fill.data);\n const destination = data?.open;\n const hostProps = forHost(hostId);\n const open = destination?.kind === 'page' ? hostProps.openPage : hostProps.openSettings;\n const side =\n data === null ? (fill.data as { column?: unknown } | undefined)?.column === 'side' : data.column === 'side';\n tiles.push({\n id: key,\n ...(hostId === undefined ? {} : { hostId }),\n size: data === null ? (side ? 'small' : 'wide') : (data.size ?? 'small'),\n column: side ? 'side' : 'main',\n ...(data === null\n ? { legacy: true }\n : {\n title: t(\n `plugin.${splitHostId(fill.pluginId)?.localId ?? fill.pluginId}.dashboardTiles.${fill.id}.label`,\n data.title,\n ),\n icon: data.icon,\n }),\n ...(destination === undefined || open === undefined\n ? {}\n : {\n onOpen: () => open(destination.id),\n }),\n body: tag(hostId, createElement(component, hostProps)),\n });\n }\n for (const host of remoteHosts) {\n const registry = webPluginRegistryForHost(host.id);\n const rejected = [\n ...registry.dashboardTileFills({ scope: 'host' }),\n ...registry.legacyHomeAppFills(),\n ...registry.hostSlotFills(HOST_SLOTS.homeAttention),\n ].some((fill) => !admitted(host.id, fill.pluginId));\n if (!rejected && host.openOnHostUrl === undefined) continue;\n const url = host.openOnHostUrl;\n tiles.push({\n id: `open-on-host:${host.id}`,\n hostId: host.id,\n column: 'main',\n title: t('webDashboard.home.openOnHost', 'Open on {host}', { host: host.name }),\n body:\n url && /^https?:\\/\\//u.test(url) ? (\n <a href={url} className=\"text-po-green underline\">\n {t('webDashboard.home.openOnHost', 'Open on {host}', { host: host.name })}\n </a>\n ) : (\n <p>{t('webDashboard.home.openOnHost', 'Open on {host}', { host: host.name })}</p>\n ),\n });\n }\n\n // Session facts and each host's Home read, joined by the pure model.\n const readHosts = hosts.length === 0 ? [{ id: 'local', name: t('webDashboard.home.thisHost', 'This host') }] : hosts;\n const reads = useHomeReads(readHosts.map((host) => (host.id === 'local' ? undefined : host.id)));\n const hostReads: HomeHostRead[] = readHosts\n .filter((host) => visible(host.id))\n .map((host) => {\n const local = host.id === 'local';\n const read = reads[local ? '' : host.id];\n const workspaces = workspaceOrder.filter((id) => (splitHostId(id)?.hostId ?? 'local') === host.id);\n const contributions = unique([\n ...(local\n ? pluginHomeContributions({ scope: 'host' })\n : webPluginRegistryForHost(host.id).pluginHomeContributions({ scope: 'host' })),\n ...workspaces.flatMap((workspaceId) => pluginHomeContributions({ scope: 'workspace', workspaceId })),\n ]).filter((entry) => local || admitted(host.id, entry.pluginId));\n return {\n ...(local ? {} : { hostId: host.id }),\n label: host.name,\n loading: read?.loading ?? true,\n ...(read?.snapshot === undefined ? {} : { snapshot: read.snapshot }),\n ...(read?.error === undefined ? {} : { error: read.error }),\n contributions: contributions.map((entry) => ({\n ...entry,\n data: { ...entry.data, label: entry.data.translateLabel?.(t) ?? entry.data.label },\n })),\n };\n });\n const model = homeActivity({\n now: Date.now(),\n showEarlier,\n hosts: hostReads,\n sessions: order.flatMap((id) => {\n // Renders on what the rail shows; the recency sort reads `updatedAt` fresh from the store.\n const entry = sessionsStore.state.byId[id] ?? byId[id];\n if (entry === undefined || !visible(splitHostId(id)?.hostId)) return [];\n const avatarUrl = avatarUrls[id];\n return [{ id, entry, ...(avatarUrl === undefined ? {} : { avatarUrl }) }];\n }),\n });\n const open = (target: HomeTarget) => () => {\n if (target.destination !== undefined) {\n setDockTab(target.sessionId, 'activity');\n setDockOpen(true);\n }\n void navigate({ to: '/session/$sessionId', params: { sessionId: target.sessionId } });\n };\n\n const lead = attention.filter((tile) => visible(tile.hostId));\n // Gentle asks: the person's choice to make whenever they like, never a blocker.\n const asks = (\n <>\n {providerConnected === false ? (\n <CtaCard\n data-testid=\"home-provider-ask\"\n artwork=\"/mascot/cta-provider.png\"\n title={t('webDashboard.home.providerAskTitle', '{agent} needs a provider', { agent: coordinatorName })}\n description={t(\n 'webDashboard.home.providerAskDescription',\n 'Pick the AI that does the thinking. {agent} handles the rest.',\n { agent: coordinatorName },\n )}\n action={t('webDashboard.home.connectProvider', 'Connect provider')}\n onAction={() => void navigate({ to: '/settings/$section', params: { section: 'providers' } })}\n />\n ) : null}\n {account.bridge && account.openAccount && account.checked && !account.status.signedIn ? (\n <CtaCard\n data-testid=\"home-sign-in-ask\"\n artwork=\"/mascot/cta-sign-in.png\"\n title={t('webDashboard.home.signInAskTitle', 'Your cloud sessions, here too')}\n description={t(\n 'webDashboard.home.signInAskDescription',\n 'Sign in to Po Cloud. Sessions on this computer stay as they are.',\n )}\n action={t('webDashboard.account.signIn', 'Sign in with Po')}\n onAction={account.openAccount}\n />\n ) : null}\n </>\n );\n const asking = providerConnected === false || (account.bridge !== undefined && !account.status.signedIn);\n const shown = tiles.filter((tile) => visible(tile.hostId));\n const mainTiles = shown.filter((tile) => tile.column !== 'side');\n const sideTiles = shown.filter((tile) => tile.column === 'side');\n return (\n <HomeActivity\n summary={model.summary}\n activity={model.activity.map(({ target, ...row }) => ({ ...row, onOpen: open(target) }))}\n waiting={model.waiting.map(({ target, ...row }) => ({ ...row, onOpen: open(target) }))}\n coverage={model.coverage}\n {...(model.earlier ? { onShowEarlier: () => setShowEarlier(true) } : {})}\n {...(bare === undefined ? {} : { bare })}\n toolbar={\n onShowSessions ? <SessionsToggle onShowSessions={onShowSessions} navigationToggle={navigationToggle} /> : null\n }\n controls={<HostFilter hosts={hosts} value={hostFilter} onChange={setHostFilter} />}\n lead={\n lead.length > 0 || asking ? (\n <>\n {asking ? <div className=\"flex flex-col gap-3\">{asks}</div> : null}\n {lead.length > 0 ? (\n // Idle attention cards render nothing; the group then takes no room in the column.\n <div className=\"hidden has-[[data-tile-id]:not(:empty)]:block\">\n <DashboardTileGrid tiles={lead} />\n </div>\n ) : null}\n </>\n ) : null\n }\n main={mainTiles.length > 0 ? <DashboardTileGrid tiles={mainTiles} /> : null}\n aside={sideTiles.length > 0 ? <DashboardTileGrid tiles={sideTiles} /> : null}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA2EA,SAAS,eAAe,EACtB,gBACA,oBAIC;CACD,MAAM,KAAA,GAAIA,uBAAAA,KAAAA,CAAK;CACf,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,WAAW,sBAAsB,qBAAqB,WAAW,cAAc;EAClF,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,6BAAAA,QAAD;GACE,SAAQ;GACR,MAAK;GACL,eAAY;GACZ,OAAO,EAAE,oCAAoC,eAAe;GAC5D,cAAY,EAAE,oCAAoC,eAAe;GACjE,SAAS;GACT,WAAU;GAEV,UAAA,iBAAA,GAAA,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,CAACA,0BAAAA,mBAAD,EAAmB,OAAO,UAAY,CAAA,IAAI;EACvE,OAAO,UAAU,SAAS,IAAI,iBAAA,GAAA,kBAAA,IAAA,CAACA,0BAAAA,mBAAD,EAAmB,OAAO,UAAY,CAAA,IAAI;CACzE,CAAA;AAEL"}
1
+ {"version":3,"file":"HomePage.cjs","names":["useT","Button","SidebarIcon","Select","SelectTrigger","SelectValue","SelectContent","SelectItem","useState","EmptyState","ServerIcon","GridIcon","DashboardTileGrid","splitHostId","webPluginRegistryForHost","HOST_SLOTS","hostSlotFillsAcrossHosts","useWebPluginRegistry","useMemo","registeredWebPluginHostIds","useSyncExternalStore","usePluginSlotProps","useNavigate","useStore","workspaceHostLabelsStore","sessionsStore","useRailEntries","workspacesStore","useSessionAvatars","accountStore","providerStatusStore","refreshProviderStatus","fetchWithStepUpForHost","qualifyHostId","homePageRoute","Badge","dashboardTileFills","legacyHomeAppFills","dashboardTileFillsAcrossHosts","homeAppEntries","createElement","parseDashboardTileData","useHomeReads","pluginHomeContributions","homeActivity","CtaCard","HomeActivity"],"sources":["../../../src/web/components/HomePage.tsx"],"sourcesContent":["import { useT, type HomeAttentionCountSource } from '@agimon-ai/po-core/web';\nimport {\n Badge,\n Button,\n CtaCard,\n EmptyState,\n type EmptyStateProps,\n GridIcon,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n ServerIcon,\n SidebarIcon,\n} from '@agimon-ai/po-web-components';\nimport { fetchWithStepUpForHost } from '@agimon-ai/po-web-security/browser';\nimport { useNavigate } from '@tanstack/react-router';\nimport { useStore } from '@tanstack/react-store';\nimport { createElement, useEffect, useMemo, useState, useSyncExternalStore, type ReactNode } from 'react';\n\nimport { homeActivity, type HomeHostRead, type HomeTarget } from '../lib/homeActivity';\nimport { homeAppEntries, homePageRoute } from '../lib/homeApps';\nimport { qualifyHostId, splitHostId } from '../lib/hostIdentity';\nimport {\n dashboardTileFills,\n dashboardTileFillsAcrossHosts,\n hostSlotFillsAcrossHosts,\n pluginHomeContributions,\n registeredWebPluginHostIds,\n webPluginRegistryForHost,\n HOST_SLOTS,\n legacyHomeAppFills,\n parseDashboardTileData,\n type InstalledHomeContribution,\n} from '../lib/pluginRegistry';\nimport { accountStore } from '../stores/accountStore';\nimport { providerStatusStore, refreshProviderStatus } from '../stores/providerStatusStore';\nimport { sessionsStore, useRailEntries } from '../stores/sessionsStore';\nimport { setDockOpen, setDockTab } from '../stores/uiStore';\nimport { useHomeReads } from '../stores/useHomeReads';\nimport { usePluginSlotProps } from '../stores/usePluginSlotProps';\nimport { useSessionAvatars } from '../stores/useSessionAvatars';\nimport { useWebPluginRegistry } from '../stores/useWebPluginRegistry';\nimport { workspaceHostLabelsStore, workspacesStore } from '../stores/workspacesStore';\nimport { DashboardTileGrid, type DashboardTileView } from './DashboardTileGrid';\nimport { HomeActivity } from './HomeActivity';\n\nexport interface HomeHost {\n id: string;\n name: string;\n connected?: boolean;\n person?: { issuer: string; subject: string };\n /** Local plugin ids admitted by the shell's package fingerprint check. Missing means none. */\n admittedPluginIds?: readonly string[];\n openOnHostUrl?: string;\n}\n\nexport interface HomeViewProps {\n hosts?: readonly HomeHost[];\n tiles?: readonly (DashboardTileView & { hostId?: string })[];\n /** Legacy callers may still supply full cards; new callers supply ordered tiles instead. */\n main?: readonly ReactNode[];\n side?: readonly ReactNode[];\n title?: string;\n emptyTitle?: string;\n emptyDescription?: string;\n /** How the empty card reads: a whole page for a missing workspace, an error tone with Retry for a failed load. */\n empty?: Pick<EmptyStateProps, 'size' | 'tone' | 'icon' | 'action'>;\n onShowSessions?: () => void;\n navigationToggle?: 'mobile' | 'always';\n /** Drawn on a template's own background, such as a desktop: no page background and no heading. */\n bare?: boolean;\n}\n\nfunction SessionsToggle({\n onShowSessions,\n navigationToggle,\n}: {\n onShowSessions: () => void;\n navigationToggle: 'mobile' | 'always';\n}) {\n const t = useT();\n return (\n <div className={`shrink-0 px-3 pt-2 ${navigationToggle === 'mobile' ? 'md:hidden' : ''}`}>\n <Button\n variant=\"ghost\"\n size=\"icon-md\"\n data-testid=\"mobile-sessions-open\"\n title={t('webDashboard.common.showSessions', 'Show sessions')}\n aria-label={t('webDashboard.common.showSessions', 'Show sessions')}\n onClick={onShowSessions}\n className=\"rounded-lg bg-po-panel/60 text-po-text hover:bg-po-panel hover:text-po-hi\"\n >\n <SidebarIcon aria-hidden className=\"size-4\" />\n </Button>\n </div>\n );\n}\n\n/** Shown only with more than one host: a single host has nothing to filter. */\nfunction HostFilter({\n hosts,\n value,\n onChange,\n}: {\n hosts: readonly HomeHost[];\n value: string;\n onChange: (value: string) => void;\n}) {\n const t = useT();\n if (hosts.length < 2) return null;\n return (\n <Select value={value} onValueChange={onChange}>\n <SelectTrigger aria-label={t('webDashboard.home.filterByHost', 'Filter by host')} className=\"w-fit\">\n <SelectValue>\n {value === 'all'\n ? t('webDashboard.home.allHosts', 'All hosts')\n : hosts.find((host) => host.id === value)?.name}\n </SelectValue>\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"all\">{t('webDashboard.home.allHosts', 'All hosts')}</SelectItem>\n {hosts.map((host) => (\n <SelectItem key={host.id} value={host.id}>\n {host.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n );\n}\n\n/** The Workspace dashboard frame, independent of plugins, navigation and data loading. */\nexport function HomeView({\n tiles,\n hosts = [],\n main = [],\n side = [],\n title: suppliedTitle,\n emptyTitle: suppliedEmptyTitle,\n emptyDescription: suppliedEmptyDescription,\n empty,\n onShowSessions,\n navigationToggle = 'mobile',\n bare = false,\n}: HomeViewProps) {\n const t = useT();\n const title = suppliedTitle ?? t('webDashboard.home.title', 'Home');\n const emptyTitle = suppliedEmptyTitle ?? t('webDashboard.home.emptyTitle', 'Nothing on Home yet');\n const emptyDescription =\n suppliedEmptyDescription ?? t('webDashboard.home.emptyDescription', 'Apps you add show up here.');\n const [hostFilter, setHostFilter] = useState('all');\n const all = tiles ?? [\n ...main.map((body, index): DashboardTileView => ({ id: `main-${index}`, size: 'wide', body, legacy: true })),\n ...side.map((body, index): DashboardTileView => ({ id: `side-${index}`, size: 'small', body, legacy: true })),\n ];\n const entries = all.filter((tile) => hostFilter === 'all' || ('hostId' in tile && tile.hostId === hostFilter));\n return (\n <section\n aria-label={title}\n data-testid=\"home-page\"\n className={`flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto font-sans text-base text-po-text ${bare ? '' : 'bg-po-bg'}`}\n >\n {onShowSessions ? <SessionsToggle onShowSessions={onShowSessions} navigationToggle={navigationToggle} /> : null}\n <div className=\"mx-auto flex w-full max-w-6xl flex-col gap-6 px-4 py-6 md:px-8 md:py-8\">\n {bare ? null : <h1 className=\"text-2xl font-semibold text-po-hi\">{title}</h1>}\n <HostFilter hosts={hosts} value={hostFilter} onChange={setHostFilter} />\n {entries.length === 0 && all.length > 0 ? (\n // The filter hides every app; Home itself is not empty.\n <EmptyState\n icon={<ServerIcon />}\n title={t('webDashboard.home.noHostAppsTitle', 'No apps on this host')}\n description={t(\n 'webDashboard.home.noHostAppsDescription',\n 'Apps from your other hosts are hidden by the host filter.',\n )}\n secondaryAction={{\n label: t('webDashboard.home.showAllHosts', 'Show all hosts'),\n onAction: () => setHostFilter('all'),\n }}\n />\n ) : entries.length === 0 ? (\n <EmptyState icon={<GridIcon />} title={emptyTitle} description={emptyDescription} {...empty} />\n ) : (\n <DashboardTileGrid tiles={entries} />\n )}\n </div>\n </section>\n );\n}\n\ntype HostTile = DashboardTileView & { hostId?: string };\n\nconst unique = (entries: readonly InstalledHomeContribution[]) => [\n ...new Map(entries.map((entry) => [JSON.stringify([entry.pluginId, entry.id, entry.mount]), entry])).values(),\n];\n\nfunction homePluginAdmitted(hosts: readonly Omit<HomeHost, 'name'>[], hostId: string, pluginId: string): boolean {\n return (\n hosts.find(({ id }) => id === hostId)?.admittedPluginIds?.includes(splitHostId(pluginId)?.localId ?? pluginId) ===\n true\n );\n}\nfunction homeAttentionFills(hosts: readonly Omit<HomeHost, 'name'>[]) {\n const local = hosts.find(({ id }) => id === 'local');\n return [\n ...(hosts.length === 0 || local !== undefined\n ? webPluginRegistryForHost()\n .hostSlotFills(HOST_SLOTS.homeAttention)\n .map((fill) => ({\n fill,\n hostId: local?.id,\n key: JSON.stringify([fill.pluginId, fill.id]),\n }))\n : []),\n ...hostSlotFillsAcrossHosts(\n hosts.filter(({ id }) => id !== 'local'),\n HOST_SLOTS.homeAttention,\n (hostId, pluginId) => homePluginAdmitted(hosts, hostId, pluginId),\n ),\n ];\n}\n\nfunction isHomeAttentionCountSource(data: unknown): data is HomeAttentionCountSource {\n return (\n typeof data === 'object' &&\n data !== null &&\n 'subscribe' in data &&\n typeof data.subscribe === 'function' &&\n 'getSnapshot' in data &&\n typeof data.getSnapshot === 'function'\n );\n}\n\n/** Subscribe while away from Home too; resolving a card, not visiting Home, changes the count. */\nexport function useHomeAttentionCount(hosts?: readonly HomeHost[]): number {\n const revision = useWebPluginRegistry();\n const { subscribe, getSnapshot } = useMemo(() => {\n const sources = new Set(\n homeAttentionFills(hosts ?? registeredWebPluginHostIds().map((id) => ({ id })))\n .filter(({ fill }) => fill.component !== undefined)\n .map(({ fill }) => fill.data)\n .filter(isHomeAttentionCountSource),\n );\n return {\n subscribe: (listener: () => void) => {\n const stops = Array.from(sources, (source) => source.subscribe(listener));\n return () => stops.forEach((stop) => stop());\n },\n getSnapshot: () => {\n let total = 0;\n for (const source of sources) {\n const count = source.getSnapshot();\n if (Number.isSafeInteger(count) && count > 0) total += count;\n }\n return total;\n },\n };\n }, [hosts, revision]);\n return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);\n}\n\n/** Home joins host fills and session facts independently of the focused session or workspace. */\nexport function HomePage({\n onShowSessions,\n navigationToggle = 'mobile',\n bare,\n hosts: suppliedHosts,\n}: {\n onShowSessions?: () => void;\n navigationToggle?: 'mobile' | 'always';\n bare?: boolean;\n hosts?: readonly HomeHost[];\n}) {\n const t = useT();\n const props = usePluginSlotProps(null);\n const navigate = useNavigate();\n const labels = useStore(workspaceHostLabelsStore, (state) => state);\n const [hostFilter, setHostFilter] = useState('all');\n const [showEarlier, setShowEarlier] = useState(false);\n const order = useStore(sessionsStore, (state) => state.order);\n const byId = useRailEntries();\n const workspaceOrder = useStore(workspacesStore, (state) => state.order);\n const avatarUrls = useSessionAvatars(order, byId);\n const account = useStore(accountStore, (state) => state);\n const providerConnected = useStore(providerStatusStore, (state) => state.connected);\n useEffect(() => {\n void refreshProviderStatus().catch((error: unknown) => console.warn('Provider status unavailable.', error));\n }, []);\n const coordinatorName =\n order.map((id) => byId[id]?.summary).find((summary) => summary?.sessionProvenance === 'coordinator')?.name ??\n t('webDashboard.home.yourAgent', 'Your agent');\n const hosts: readonly HomeHost[] =\n suppliedHosts ??\n registeredWebPluginHostIds().map((id) => ({\n id,\n name: labels[id] ?? t('webDashboard.home.computer', 'Computer {id}', { id: id.slice(0, 8) }),\n }));\n const several = hosts.length > 1;\n const remoteHosts = hosts.filter((host) => host.id !== 'local');\n const localHost = hosts.find((host) => host.id === 'local');\n const visible = (hostId: string | undefined) => hostFilter === 'all' || (hostId ?? 'local') === hostFilter;\n const admitted = (hostId: string, pluginId: string) => homePluginAdmitted(hosts, hostId, pluginId);\n const dashboardRequests = useMemo(\n () => Object.fromEntries(remoteHosts.map(({ id }) => [id, fetchWithStepUpForHost(id)])),\n [hosts],\n );\n const forHost = (hostId: string | undefined) =>\n hostId === undefined || hostId === 'local'\n ? props\n : {\n ...props,\n dashboardApi: { key: hostId, request: dashboardRequests[hostId] },\n // A remote host's fills know only its local session ids; the rail keys them by host.\n openSession: (sessionId: string) => props.openSession?.(qualifyHostId(hostId, sessionId)),\n openPage: (pageId: string, itemId?: string) => {\n void navigate({\n to: '/page/$pageId',\n params: { pageId: homePageRoute(hostId, pageId).pageId },\n ...(itemId === undefined ? {} : { search: { item: itemId } }),\n });\n },\n openSettings: (section: string) => {\n void navigate({ to: '/settings/$section', params: { section: qualifyHostId(hostId, section) } });\n },\n };\n // ponytail: an attention card left idle on another host still shows its host badge; render the badge inside the card when one renders nothing often.\n const tag = (hostId: string | undefined, body: ReactNode) =>\n hostId === undefined || !several ? (\n body\n ) : (\n <>\n <Badge>{hosts.find((host) => host.id === hostId)?.name ?? hostId}</Badge>\n {body}\n </>\n );\n const localFills =\n hosts.length === 0 || localHost !== undefined\n ? [...dashboardTileFills({ scope: 'host' }), ...legacyHomeAppFills()].map((fill) => ({\n fill,\n hostId: localHost?.id,\n key: JSON.stringify([fill.pluginId, fill.id]),\n }))\n : [];\n const fills = [\n ...localFills,\n ...dashboardTileFillsAcrossHosts(remoteHosts, admitted),\n ...homeAppEntries(remoteHosts, (id) =>\n webPluginRegistryForHost(id)\n .legacyHomeAppFills()\n .filter((fill) => admitted(id, fill.pluginId)),\n ),\n ].sort((left, right) => left.fill.order - right.fill.order || left.key.localeCompare(right.key));\n // What waits on the person leads the main column; each fill draws its own frame and hides when idle.\n const attention: HostTile[] = homeAttentionFills(hosts).flatMap(({ fill, hostId, key }) =>\n fill.component === undefined\n ? []\n : [\n {\n id: key,\n ...(hostId === undefined ? {} : { hostId }),\n size: 'wide' as const,\n column: 'main' as const,\n legacy: true,\n body: tag(hostId, createElement(fill.component, forHost(hostId))),\n },\n ],\n );\n const tiles: HostTile[] = [];\n for (const { fill, hostId, key } of fills) {\n const component = fill.component;\n if (component === undefined) continue;\n const data = parseDashboardTileData(fill.data);\n const destination = data?.open;\n const hostProps = forHost(hostId);\n const open = destination?.kind === 'page' ? hostProps.openPage : hostProps.openSettings;\n const side =\n data === null ? (fill.data as { column?: unknown } | undefined)?.column === 'side' : data.column === 'side';\n tiles.push({\n id: key,\n ...(hostId === undefined ? {} : { hostId }),\n size: data === null ? (side ? 'small' : 'wide') : (data.size ?? 'small'),\n column: side ? 'side' : 'main',\n ...(data === null\n ? { legacy: true }\n : {\n title: t(\n `plugin.${splitHostId(fill.pluginId)?.localId ?? fill.pluginId}.dashboardTiles.${fill.id}.label`,\n data.title,\n ),\n icon: data.icon,\n }),\n ...(destination === undefined || open === undefined\n ? {}\n : {\n onOpen: () => open(destination.id),\n }),\n body: tag(hostId, createElement(component, hostProps)),\n });\n }\n for (const host of remoteHosts) {\n const registry = webPluginRegistryForHost(host.id);\n const rejected = [\n ...registry.dashboardTileFills({ scope: 'host' }),\n ...registry.legacyHomeAppFills(),\n ...registry.hostSlotFills(HOST_SLOTS.homeAttention),\n ].some((fill) => !admitted(host.id, fill.pluginId));\n if (!rejected && host.openOnHostUrl === undefined) continue;\n const url = host.openOnHostUrl;\n tiles.push({\n id: `open-on-host:${host.id}`,\n hostId: host.id,\n column: 'main',\n title: t('webDashboard.home.openOnHost', 'Open on {host}', { host: host.name }),\n body:\n url && /^https?:\\/\\//u.test(url) ? (\n <a href={url} className=\"text-po-green underline\">\n {t('webDashboard.home.openOnHost', 'Open on {host}', { host: host.name })}\n </a>\n ) : (\n <p>{t('webDashboard.home.openOnHost', 'Open on {host}', { host: host.name })}</p>\n ),\n });\n }\n\n // Session facts and each host's Home read, joined by the pure model.\n const readHosts = hosts.length === 0 ? [{ id: 'local', name: t('webDashboard.home.thisHost', 'This host') }] : hosts;\n const reads = useHomeReads(readHosts.map((host) => (host.id === 'local' ? undefined : host.id)));\n const hostReads: HomeHostRead[] = readHosts\n .filter((host) => visible(host.id))\n .map((host) => {\n const local = host.id === 'local';\n const read = reads[local ? '' : host.id];\n const workspaces = workspaceOrder.filter((id) => (splitHostId(id)?.hostId ?? 'local') === host.id);\n const contributions = unique([\n ...(local\n ? pluginHomeContributions({ scope: 'host' })\n : webPluginRegistryForHost(host.id).pluginHomeContributions({ scope: 'host' })),\n ...workspaces.flatMap((workspaceId) => pluginHomeContributions({ scope: 'workspace', workspaceId })),\n ]).filter((entry) => local || admitted(host.id, entry.pluginId));\n return {\n ...(local ? {} : { hostId: host.id }),\n label: host.name,\n loading: read?.loading ?? true,\n ...(read?.snapshot === undefined ? {} : { snapshot: read.snapshot }),\n ...(read?.error === undefined ? {} : { error: read.error }),\n contributions: contributions.map((entry) => ({\n ...entry,\n data: { ...entry.data, label: entry.data.translateLabel?.(t) ?? entry.data.label },\n })),\n };\n });\n const model = homeActivity({\n now: Date.now(),\n showEarlier,\n hosts: hostReads,\n sessions: order.flatMap((id) => {\n // Renders on what the rail shows; the recency sort reads `updatedAt` fresh from the store.\n const entry = sessionsStore.state.byId[id] ?? byId[id];\n if (entry === undefined || !visible(splitHostId(id)?.hostId)) return [];\n const avatarUrl = avatarUrls[id];\n return [{ id, entry, ...(avatarUrl === undefined ? {} : { avatarUrl }) }];\n }),\n });\n const open = (target: HomeTarget) => () => {\n if (target.destination !== undefined) {\n setDockTab(target.sessionId, 'activity');\n setDockOpen(true);\n }\n void navigate({ to: '/session/$sessionId', params: { sessionId: target.sessionId } });\n };\n\n const lead = attention.filter((tile) => visible(tile.hostId));\n // Gentle asks: the person's choice to make whenever they like, never a blocker.\n const asks = (\n <>\n {providerConnected === false ? (\n <CtaCard\n data-testid=\"home-provider-ask\"\n artwork=\"/mascot/cta-provider.png\"\n title={t('webDashboard.home.providerAskTitle', '{agent} needs a provider', { agent: coordinatorName })}\n description={t(\n 'webDashboard.home.providerAskDescription',\n 'Pick the AI that does the thinking. {agent} handles the rest.',\n { agent: coordinatorName },\n )}\n action={t('webDashboard.home.connectProvider', 'Connect provider')}\n onAction={() => void navigate({ to: '/settings/$section', params: { section: 'providers' } })}\n />\n ) : null}\n {account.bridge && account.openAccount && account.checked && !account.status.signedIn ? (\n <CtaCard\n data-testid=\"home-sign-in-ask\"\n artwork=\"/mascot/cta-sign-in.png\"\n title={t('webDashboard.home.signInAskTitle', 'Your cloud sessions, here too')}\n description={t(\n 'webDashboard.home.signInAskDescription',\n 'Sign in to Po Cloud. Sessions on this computer stay as they are.',\n )}\n action={t('webDashboard.account.signIn', 'Sign in with Po')}\n onAction={account.openAccount}\n />\n ) : null}\n </>\n );\n const asking = providerConnected === false || (account.bridge !== undefined && !account.status.signedIn);\n const shown = tiles.filter((tile) => visible(tile.hostId));\n const mainTiles = shown.filter((tile) => tile.column !== 'side');\n const sideTiles = shown.filter((tile) => tile.column === 'side');\n return (\n <HomeActivity\n summary={model.summary}\n activity={model.activity.map(({ target, ...row }) => ({ ...row, onOpen: open(target) }))}\n waiting={model.waiting.map(({ target, ...row }) => ({ ...row, onOpen: open(target) }))}\n coverage={model.coverage}\n {...(model.earlier ? { onShowEarlier: () => setShowEarlier(true) } : {})}\n {...(bare === undefined ? {} : { bare })}\n toolbar={\n onShowSessions ? <SessionsToggle onShowSessions={onShowSessions} navigationToggle={navigationToggle} /> : null\n }\n controls={<HostFilter hosts={hosts} value={hostFilter} onChange={setHostFilter} />}\n lead={\n lead.length > 0 || asking ? (\n <>\n {asking ? <div className=\"flex flex-col gap-3\">{asks}</div> : null}\n {lead.length > 0 ? (\n // Idle attention cards render nothing; the group then takes no room in the column.\n <div className=\"hidden has-[[data-tile-id]:not(:empty)]:block\">\n <DashboardTileGrid tiles={lead} />\n </div>\n ) : null}\n </>\n ) : null\n }\n main={mainTiles.length > 0 ? <DashboardTileGrid tiles={mainTiles} /> : null}\n aside={sideTiles.length > 0 ? <DashboardTileGrid tiles={sideTiles} /> : null}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA2EA,SAAS,eAAe,EACtB,gBACA,oBAIC;CACD,MAAM,KAAA,GAAIA,uBAAAA,KAAAA,CAAK;CACf,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,WAAW,sBAAsB,qBAAqB,WAAW,cAAc;EAClF,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,6BAAAA,QAAD;GACE,SAAQ;GACR,MAAK;GACL,eAAY;GACZ,OAAO,EAAE,oCAAoC,eAAe;GAC5D,cAAY,EAAE,oCAAoC,eAAe;GACjE,SAAS;GACT,WAAU;GAEV,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,6BAAAA,aAAD;IAAa,eAAA;IAAY,WAAU;GAAU,CAAA;EACvC,CAAA;CACL,CAAA;AAET;;AAGA,SAAS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CAAA,IAAI;EACvE,OAAO,UAAU,SAAS,IAAI,iBAAA,GAAA,kBAAA,IAAA,CAACA,0BAAAA,mBAAD,EAAmB,OAAO,UAAY,CAAA,IAAI;CACzE,CAAA;AAEL"}
@@ -191,6 +191,7 @@ function HomePage({ onShowSessions, navigationToggle = "mobile", bare, hosts: su
191
191
  key: hostId,
192
192
  request: dashboardRequests[hostId]
193
193
  },
194
+ openSession: (sessionId) => props.openSession?.(qualifyHostId(hostId, sessionId)),
194
195
  openPage: (pageId, itemId) => {
195
196
  navigate({
196
197
  to: "/page/$pageId",
@@ -1 +1 @@
1
- {"version":3,"file":"HomePage.mjs","names":["HOST_SLOTS"],"sources":["../../../src/web/components/HomePage.tsx"],"sourcesContent":["import { useT, type HomeAttentionCountSource } from '@agimon-ai/po-core/web';\nimport {\n Badge,\n Button,\n CtaCard,\n EmptyState,\n type EmptyStateProps,\n GridIcon,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n ServerIcon,\n SidebarIcon,\n} from '@agimon-ai/po-web-components';\nimport { fetchWithStepUpForHost } from '@agimon-ai/po-web-security/browser';\nimport { useNavigate } from '@tanstack/react-router';\nimport { useStore } from '@tanstack/react-store';\nimport { createElement, useEffect, useMemo, useState, useSyncExternalStore, type ReactNode } from 'react';\n\nimport { homeActivity, type HomeHostRead, type HomeTarget } from '../lib/homeActivity';\nimport { homeAppEntries, homePageRoute } from '../lib/homeApps';\nimport { qualifyHostId, splitHostId } from '../lib/hostIdentity';\nimport {\n dashboardTileFills,\n dashboardTileFillsAcrossHosts,\n hostSlotFillsAcrossHosts,\n pluginHomeContributions,\n registeredWebPluginHostIds,\n webPluginRegistryForHost,\n HOST_SLOTS,\n legacyHomeAppFills,\n parseDashboardTileData,\n type InstalledHomeContribution,\n} from '../lib/pluginRegistry';\nimport { accountStore } from '../stores/accountStore';\nimport { providerStatusStore, refreshProviderStatus } from '../stores/providerStatusStore';\nimport { sessionsStore, useRailEntries } from '../stores/sessionsStore';\nimport { setDockOpen, setDockTab } from '../stores/uiStore';\nimport { useHomeReads } from '../stores/useHomeReads';\nimport { usePluginSlotProps } from '../stores/usePluginSlotProps';\nimport { useSessionAvatars } from '../stores/useSessionAvatars';\nimport { useWebPluginRegistry } from '../stores/useWebPluginRegistry';\nimport { workspaceHostLabelsStore, workspacesStore } from '../stores/workspacesStore';\nimport { DashboardTileGrid, type DashboardTileView } from './DashboardTileGrid';\nimport { HomeActivity } from './HomeActivity';\n\nexport interface HomeHost {\n id: string;\n name: string;\n connected?: boolean;\n person?: { issuer: string; subject: string };\n /** Local plugin ids admitted by the shell's package fingerprint check. Missing means none. */\n admittedPluginIds?: readonly string[];\n openOnHostUrl?: string;\n}\n\nexport interface HomeViewProps {\n hosts?: readonly HomeHost[];\n tiles?: readonly (DashboardTileView & { hostId?: string })[];\n /** Legacy callers may still supply full cards; new callers supply ordered tiles instead. */\n main?: readonly ReactNode[];\n side?: readonly ReactNode[];\n title?: string;\n emptyTitle?: string;\n emptyDescription?: string;\n /** How the empty card reads: a whole page for a missing workspace, an error tone with Retry for a failed load. */\n empty?: Pick<EmptyStateProps, 'size' | 'tone' | 'icon' | 'action'>;\n onShowSessions?: () => void;\n navigationToggle?: 'mobile' | 'always';\n /** Drawn on a template's own background, such as a desktop: no page background and no heading. */\n bare?: boolean;\n}\n\nfunction SessionsToggle({\n onShowSessions,\n navigationToggle,\n}: {\n onShowSessions: () => void;\n navigationToggle: 'mobile' | 'always';\n}) {\n const t = useT();\n return (\n <div className={`shrink-0 px-3 pt-2 ${navigationToggle === 'mobile' ? 'md:hidden' : ''}`}>\n <Button\n variant=\"ghost\"\n size=\"icon-md\"\n data-testid=\"mobile-sessions-open\"\n title={t('webDashboard.common.showSessions', 'Show sessions')}\n aria-label={t('webDashboard.common.showSessions', 'Show sessions')}\n onClick={onShowSessions}\n className=\"rounded-lg bg-po-panel/60 text-po-text hover:bg-po-panel hover:text-po-hi\"\n >\n <SidebarIcon aria-hidden className=\"size-4\" />\n </Button>\n </div>\n );\n}\n\n/** Shown only with more than one host: a single host has nothing to filter. */\nfunction HostFilter({\n hosts,\n value,\n onChange,\n}: {\n hosts: readonly HomeHost[];\n value: string;\n onChange: (value: string) => void;\n}) {\n const t = useT();\n if (hosts.length < 2) return null;\n return (\n <Select value={value} onValueChange={onChange}>\n <SelectTrigger aria-label={t('webDashboard.home.filterByHost', 'Filter by host')} className=\"w-fit\">\n <SelectValue>\n {value === 'all'\n ? t('webDashboard.home.allHosts', 'All hosts')\n : hosts.find((host) => host.id === value)?.name}\n </SelectValue>\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"all\">{t('webDashboard.home.allHosts', 'All hosts')}</SelectItem>\n {hosts.map((host) => (\n <SelectItem key={host.id} value={host.id}>\n {host.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n );\n}\n\n/** The Workspace dashboard frame, independent of plugins, navigation and data loading. */\nexport function HomeView({\n tiles,\n hosts = [],\n main = [],\n side = [],\n title: suppliedTitle,\n emptyTitle: suppliedEmptyTitle,\n emptyDescription: suppliedEmptyDescription,\n empty,\n onShowSessions,\n navigationToggle = 'mobile',\n bare = false,\n}: HomeViewProps) {\n const t = useT();\n const title = suppliedTitle ?? t('webDashboard.home.title', 'Home');\n const emptyTitle = suppliedEmptyTitle ?? t('webDashboard.home.emptyTitle', 'Nothing on Home yet');\n const emptyDescription =\n suppliedEmptyDescription ?? t('webDashboard.home.emptyDescription', 'Apps you add show up here.');\n const [hostFilter, setHostFilter] = useState('all');\n const all = tiles ?? [\n ...main.map((body, index): DashboardTileView => ({ id: `main-${index}`, size: 'wide', body, legacy: true })),\n ...side.map((body, index): DashboardTileView => ({ id: `side-${index}`, size: 'small', body, legacy: true })),\n ];\n const entries = all.filter((tile) => hostFilter === 'all' || ('hostId' in tile && tile.hostId === hostFilter));\n return (\n <section\n aria-label={title}\n data-testid=\"home-page\"\n className={`flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto font-sans text-base text-po-text ${bare ? '' : 'bg-po-bg'}`}\n >\n {onShowSessions ? <SessionsToggle onShowSessions={onShowSessions} navigationToggle={navigationToggle} /> : null}\n <div className=\"mx-auto flex w-full max-w-6xl flex-col gap-6 px-4 py-6 md:px-8 md:py-8\">\n {bare ? null : <h1 className=\"text-2xl font-semibold text-po-hi\">{title}</h1>}\n <HostFilter hosts={hosts} value={hostFilter} onChange={setHostFilter} />\n {entries.length === 0 && all.length > 0 ? (\n // The filter hides every app; Home itself is not empty.\n <EmptyState\n icon={<ServerIcon />}\n title={t('webDashboard.home.noHostAppsTitle', 'No apps on this host')}\n description={t(\n 'webDashboard.home.noHostAppsDescription',\n 'Apps from your other hosts are hidden by the host filter.',\n )}\n secondaryAction={{\n label: t('webDashboard.home.showAllHosts', 'Show all hosts'),\n onAction: () => setHostFilter('all'),\n }}\n />\n ) : entries.length === 0 ? (\n <EmptyState icon={<GridIcon />} title={emptyTitle} description={emptyDescription} {...empty} />\n ) : (\n <DashboardTileGrid tiles={entries} />\n )}\n </div>\n </section>\n );\n}\n\ntype HostTile = DashboardTileView & { hostId?: string };\n\nconst unique = (entries: readonly InstalledHomeContribution[]) => [\n ...new Map(entries.map((entry) => [JSON.stringify([entry.pluginId, entry.id, entry.mount]), entry])).values(),\n];\n\nfunction homePluginAdmitted(hosts: readonly Omit<HomeHost, 'name'>[], hostId: string, pluginId: string): boolean {\n return (\n hosts.find(({ id }) => id === hostId)?.admittedPluginIds?.includes(splitHostId(pluginId)?.localId ?? pluginId) ===\n true\n );\n}\nfunction homeAttentionFills(hosts: readonly Omit<HomeHost, 'name'>[]) {\n const local = hosts.find(({ id }) => id === 'local');\n return [\n ...(hosts.length === 0 || local !== undefined\n ? webPluginRegistryForHost()\n .hostSlotFills(HOST_SLOTS.homeAttention)\n .map((fill) => ({\n fill,\n hostId: local?.id,\n key: JSON.stringify([fill.pluginId, fill.id]),\n }))\n : []),\n ...hostSlotFillsAcrossHosts(\n hosts.filter(({ id }) => id !== 'local'),\n HOST_SLOTS.homeAttention,\n (hostId, pluginId) => homePluginAdmitted(hosts, hostId, pluginId),\n ),\n ];\n}\n\nfunction isHomeAttentionCountSource(data: unknown): data is HomeAttentionCountSource {\n return (\n typeof data === 'object' &&\n data !== null &&\n 'subscribe' in data &&\n typeof data.subscribe === 'function' &&\n 'getSnapshot' in data &&\n typeof data.getSnapshot === 'function'\n );\n}\n\n/** Subscribe while away from Home too; resolving a card, not visiting Home, changes the count. */\nexport function useHomeAttentionCount(hosts?: readonly HomeHost[]): number {\n const revision = useWebPluginRegistry();\n const { subscribe, getSnapshot } = useMemo(() => {\n const sources = new Set(\n homeAttentionFills(hosts ?? registeredWebPluginHostIds().map((id) => ({ id })))\n .filter(({ fill }) => fill.component !== undefined)\n .map(({ fill }) => fill.data)\n .filter(isHomeAttentionCountSource),\n );\n return {\n subscribe: (listener: () => void) => {\n const stops = Array.from(sources, (source) => source.subscribe(listener));\n return () => stops.forEach((stop) => stop());\n },\n getSnapshot: () => {\n let total = 0;\n for (const source of sources) {\n const count = source.getSnapshot();\n if (Number.isSafeInteger(count) && count > 0) total += count;\n }\n return total;\n },\n };\n }, [hosts, revision]);\n return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);\n}\n\n/** Home joins host fills and session facts independently of the focused session or workspace. */\nexport function HomePage({\n onShowSessions,\n navigationToggle = 'mobile',\n bare,\n hosts: suppliedHosts,\n}: {\n onShowSessions?: () => void;\n navigationToggle?: 'mobile' | 'always';\n bare?: boolean;\n hosts?: readonly HomeHost[];\n}) {\n const t = useT();\n const props = usePluginSlotProps(null);\n const navigate = useNavigate();\n const labels = useStore(workspaceHostLabelsStore, (state) => state);\n const [hostFilter, setHostFilter] = useState('all');\n const [showEarlier, setShowEarlier] = useState(false);\n const order = useStore(sessionsStore, (state) => state.order);\n const byId = useRailEntries();\n const workspaceOrder = useStore(workspacesStore, (state) => state.order);\n const avatarUrls = useSessionAvatars(order, byId);\n const account = useStore(accountStore, (state) => state);\n const providerConnected = useStore(providerStatusStore, (state) => state.connected);\n useEffect(() => {\n void refreshProviderStatus().catch((error: unknown) => console.warn('Provider status unavailable.', error));\n }, []);\n const coordinatorName =\n order.map((id) => byId[id]?.summary).find((summary) => summary?.sessionProvenance === 'coordinator')?.name ??\n t('webDashboard.home.yourAgent', 'Your agent');\n const hosts: readonly HomeHost[] =\n suppliedHosts ??\n registeredWebPluginHostIds().map((id) => ({\n id,\n name: labels[id] ?? t('webDashboard.home.computer', 'Computer {id}', { id: id.slice(0, 8) }),\n }));\n const several = hosts.length > 1;\n const remoteHosts = hosts.filter((host) => host.id !== 'local');\n const localHost = hosts.find((host) => host.id === 'local');\n const visible = (hostId: string | undefined) => hostFilter === 'all' || (hostId ?? 'local') === hostFilter;\n const admitted = (hostId: string, pluginId: string) => homePluginAdmitted(hosts, hostId, pluginId);\n const dashboardRequests = useMemo(\n () => Object.fromEntries(remoteHosts.map(({ id }) => [id, fetchWithStepUpForHost(id)])),\n [hosts],\n );\n const forHost = (hostId: string | undefined) =>\n hostId === undefined || hostId === 'local'\n ? props\n : {\n ...props,\n dashboardApi: { key: hostId, request: dashboardRequests[hostId] },\n openPage: (pageId: string, itemId?: string) => {\n void navigate({\n to: '/page/$pageId',\n params: { pageId: homePageRoute(hostId, pageId).pageId },\n ...(itemId === undefined ? {} : { search: { item: itemId } }),\n });\n },\n openSettings: (section: string) => {\n void navigate({ to: '/settings/$section', params: { section: qualifyHostId(hostId, section) } });\n },\n };\n // ponytail: an attention card left idle on another host still shows its host badge; render the badge inside the card when one renders nothing often.\n const tag = (hostId: string | undefined, body: ReactNode) =>\n hostId === undefined || !several ? (\n body\n ) : (\n <>\n <Badge>{hosts.find((host) => host.id === hostId)?.name ?? hostId}</Badge>\n {body}\n </>\n );\n const localFills =\n hosts.length === 0 || localHost !== undefined\n ? [...dashboardTileFills({ scope: 'host' }), ...legacyHomeAppFills()].map((fill) => ({\n fill,\n hostId: localHost?.id,\n key: JSON.stringify([fill.pluginId, fill.id]),\n }))\n : [];\n const fills = [\n ...localFills,\n ...dashboardTileFillsAcrossHosts(remoteHosts, admitted),\n ...homeAppEntries(remoteHosts, (id) =>\n webPluginRegistryForHost(id)\n .legacyHomeAppFills()\n .filter((fill) => admitted(id, fill.pluginId)),\n ),\n ].sort((left, right) => left.fill.order - right.fill.order || left.key.localeCompare(right.key));\n // What waits on the person leads the main column; each fill draws its own frame and hides when idle.\n const attention: HostTile[] = homeAttentionFills(hosts).flatMap(({ fill, hostId, key }) =>\n fill.component === undefined\n ? []\n : [\n {\n id: key,\n ...(hostId === undefined ? {} : { hostId }),\n size: 'wide' as const,\n column: 'main' as const,\n legacy: true,\n body: tag(hostId, createElement(fill.component, forHost(hostId))),\n },\n ],\n );\n const tiles: HostTile[] = [];\n for (const { fill, hostId, key } of fills) {\n const component = fill.component;\n if (component === undefined) continue;\n const data = parseDashboardTileData(fill.data);\n const destination = data?.open;\n const hostProps = forHost(hostId);\n const open = destination?.kind === 'page' ? hostProps.openPage : hostProps.openSettings;\n const side =\n data === null ? (fill.data as { column?: unknown } | undefined)?.column === 'side' : data.column === 'side';\n tiles.push({\n id: key,\n ...(hostId === undefined ? {} : { hostId }),\n size: data === null ? (side ? 'small' : 'wide') : (data.size ?? 'small'),\n column: side ? 'side' : 'main',\n ...(data === null\n ? { legacy: true }\n : {\n title: t(\n `plugin.${splitHostId(fill.pluginId)?.localId ?? fill.pluginId}.dashboardTiles.${fill.id}.label`,\n data.title,\n ),\n icon: data.icon,\n }),\n ...(destination === undefined || open === undefined\n ? {}\n : {\n onOpen: () => open(destination.id),\n }),\n body: tag(hostId, createElement(component, hostProps)),\n });\n }\n for (const host of remoteHosts) {\n const registry = webPluginRegistryForHost(host.id);\n const rejected = [\n ...registry.dashboardTileFills({ scope: 'host' }),\n ...registry.legacyHomeAppFills(),\n ...registry.hostSlotFills(HOST_SLOTS.homeAttention),\n ].some((fill) => !admitted(host.id, fill.pluginId));\n if (!rejected && host.openOnHostUrl === undefined) continue;\n const url = host.openOnHostUrl;\n tiles.push({\n id: `open-on-host:${host.id}`,\n hostId: host.id,\n column: 'main',\n title: t('webDashboard.home.openOnHost', 'Open on {host}', { host: host.name }),\n body:\n url && /^https?:\\/\\//u.test(url) ? (\n <a href={url} className=\"text-po-green underline\">\n {t('webDashboard.home.openOnHost', 'Open on {host}', { host: host.name })}\n </a>\n ) : (\n <p>{t('webDashboard.home.openOnHost', 'Open on {host}', { host: host.name })}</p>\n ),\n });\n }\n\n // Session facts and each host's Home read, joined by the pure model.\n const readHosts = hosts.length === 0 ? [{ id: 'local', name: t('webDashboard.home.thisHost', 'This host') }] : hosts;\n const reads = useHomeReads(readHosts.map((host) => (host.id === 'local' ? undefined : host.id)));\n const hostReads: HomeHostRead[] = readHosts\n .filter((host) => visible(host.id))\n .map((host) => {\n const local = host.id === 'local';\n const read = reads[local ? '' : host.id];\n const workspaces = workspaceOrder.filter((id) => (splitHostId(id)?.hostId ?? 'local') === host.id);\n const contributions = unique([\n ...(local\n ? pluginHomeContributions({ scope: 'host' })\n : webPluginRegistryForHost(host.id).pluginHomeContributions({ scope: 'host' })),\n ...workspaces.flatMap((workspaceId) => pluginHomeContributions({ scope: 'workspace', workspaceId })),\n ]).filter((entry) => local || admitted(host.id, entry.pluginId));\n return {\n ...(local ? {} : { hostId: host.id }),\n label: host.name,\n loading: read?.loading ?? true,\n ...(read?.snapshot === undefined ? {} : { snapshot: read.snapshot }),\n ...(read?.error === undefined ? {} : { error: read.error }),\n contributions: contributions.map((entry) => ({\n ...entry,\n data: { ...entry.data, label: entry.data.translateLabel?.(t) ?? entry.data.label },\n })),\n };\n });\n const model = homeActivity({\n now: Date.now(),\n showEarlier,\n hosts: hostReads,\n sessions: order.flatMap((id) => {\n // Renders on what the rail shows; the recency sort reads `updatedAt` fresh from the store.\n const entry = sessionsStore.state.byId[id] ?? byId[id];\n if (entry === undefined || !visible(splitHostId(id)?.hostId)) return [];\n const avatarUrl = avatarUrls[id];\n return [{ id, entry, ...(avatarUrl === undefined ? {} : { avatarUrl }) }];\n }),\n });\n const open = (target: HomeTarget) => () => {\n if (target.destination !== undefined) {\n setDockTab(target.sessionId, 'activity');\n setDockOpen(true);\n }\n void navigate({ to: '/session/$sessionId', params: { sessionId: target.sessionId } });\n };\n\n const lead = attention.filter((tile) => visible(tile.hostId));\n // Gentle asks: the person's choice to make whenever they like, never a blocker.\n const asks = (\n <>\n {providerConnected === false ? (\n <CtaCard\n data-testid=\"home-provider-ask\"\n artwork=\"/mascot/cta-provider.png\"\n title={t('webDashboard.home.providerAskTitle', '{agent} needs a provider', { agent: coordinatorName })}\n description={t(\n 'webDashboard.home.providerAskDescription',\n 'Pick the AI that does the thinking. {agent} handles the rest.',\n { agent: coordinatorName },\n )}\n action={t('webDashboard.home.connectProvider', 'Connect provider')}\n onAction={() => void navigate({ to: '/settings/$section', params: { section: 'providers' } })}\n />\n ) : null}\n {account.bridge && account.openAccount && account.checked && !account.status.signedIn ? (\n <CtaCard\n data-testid=\"home-sign-in-ask\"\n artwork=\"/mascot/cta-sign-in.png\"\n title={t('webDashboard.home.signInAskTitle', 'Your cloud sessions, here too')}\n description={t(\n 'webDashboard.home.signInAskDescription',\n 'Sign in to Po Cloud. Sessions on this computer stay as they are.',\n )}\n action={t('webDashboard.account.signIn', 'Sign in with Po')}\n onAction={account.openAccount}\n />\n ) : null}\n </>\n );\n const asking = providerConnected === false || (account.bridge !== undefined && !account.status.signedIn);\n const shown = tiles.filter((tile) => visible(tile.hostId));\n const mainTiles = shown.filter((tile) => tile.column !== 'side');\n const sideTiles = shown.filter((tile) => tile.column === 'side');\n return (\n <HomeActivity\n summary={model.summary}\n activity={model.activity.map(({ target, ...row }) => ({ ...row, onOpen: open(target) }))}\n waiting={model.waiting.map(({ target, ...row }) => ({ ...row, onOpen: open(target) }))}\n coverage={model.coverage}\n {...(model.earlier ? { onShowEarlier: () => setShowEarlier(true) } : {})}\n {...(bare === undefined ? {} : { bare })}\n toolbar={\n onShowSessions ? <SessionsToggle onShowSessions={onShowSessions} navigationToggle={navigationToggle} /> : null\n }\n controls={<HostFilter hosts={hosts} value={hostFilter} onChange={setHostFilter} />}\n lead={\n lead.length > 0 || asking ? (\n <>\n {asking ? <div className=\"flex flex-col gap-3\">{asks}</div> : null}\n {lead.length > 0 ? (\n // Idle attention cards render nothing; the group then takes no room in the column.\n <div className=\"hidden has-[[data-tile-id]:not(:empty)]:block\">\n <DashboardTileGrid tiles={lead} />\n </div>\n ) : null}\n </>\n ) : null\n }\n main={mainTiles.length > 0 ? <DashboardTileGrid tiles={mainTiles} /> : null}\n aside={sideTiles.length > 0 ? <DashboardTileGrid tiles={sideTiles} /> : null}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA2EA,SAAS,eAAe,EACtB,gBACA,oBAIC;CACD,MAAM,IAAI,KAAK;CACf,OACE,oBAAC,OAAD;EAAK,WAAW,sBAAsB,qBAAqB,WAAW,cAAc;EAClF,UAAA,oBAAC,QAAD;GACE,SAAQ;GACR,MAAK;GACL,eAAY;GACZ,OAAO,EAAE,oCAAoC,eAAe;GAC5D,cAAY,EAAE,oCAAoC,eAAe;GACjE,SAAS;GACT,WAAU;GAEV,UAAA,oBAAC,aAAD;IAAa,eAAA;IAAY,WAAU;GAAU,CAAA;EACvC,CAAA;CACL,CAAA;AAET;;AAGA,SAAS,WAAW,EAClB,OACA,OACA,YAKC;CACD,MAAM,IAAI,KAAK;CACf,IAAI,MAAM,SAAS,GAAG,OAAO;CAC7B,OACE,qBAAC,QAAD;EAAe;EAAO,eAAe;EAArC,UAAA,CACE,oBAAC,eAAD;GAAe,cAAY,EAAE,kCAAkC,gBAAgB;GAAG,WAAU;GAC1F,UAAA,oBAAC,aAAD,EAAA,UACG,UAAU,QACP,EAAE,8BAA8B,WAAW,IAC3C,MAAM,MAAM,SAAS,KAAK,OAAO,KAAK,CAAC,EAAE,KAClC,CAAA;EACA,CAAA,GACf,qBAAC,eAAD,EAAA,UAAA,CACE,oBAAC,YAAD;GAAY,OAAM;GAAO,UAAA,EAAE,8BAA8B,WAA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,CAAA,IAAI,MAC7D,KAAK,SAAS,IAEb,oBAAC,OAAD;GAAK,WAAU;GACb,UAAA,oBAAC,mBAAD,EAAmB,OAAO,KAAO,CAAA;EAC9B,CAAA,IACH,IACJ,EAAA,CAAA,IACA;EAEN,MAAM,UAAU,SAAS,IAAI,oBAAC,mBAAD,EAAmB,OAAO,UAAY,CAAA,IAAI;EACvE,OAAO,UAAU,SAAS,IAAI,oBAAC,mBAAD,EAAmB,OAAO,UAAY,CAAA,IAAI;CACzE,CAAA;AAEL"}
1
+ {"version":3,"file":"HomePage.mjs","names":["HOST_SLOTS"],"sources":["../../../src/web/components/HomePage.tsx"],"sourcesContent":["import { useT, type HomeAttentionCountSource } from '@agimon-ai/po-core/web';\nimport {\n Badge,\n Button,\n CtaCard,\n EmptyState,\n type EmptyStateProps,\n GridIcon,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n ServerIcon,\n SidebarIcon,\n} from '@agimon-ai/po-web-components';\nimport { fetchWithStepUpForHost } from '@agimon-ai/po-web-security/browser';\nimport { useNavigate } from '@tanstack/react-router';\nimport { useStore } from '@tanstack/react-store';\nimport { createElement, useEffect, useMemo, useState, useSyncExternalStore, type ReactNode } from 'react';\n\nimport { homeActivity, type HomeHostRead, type HomeTarget } from '../lib/homeActivity';\nimport { homeAppEntries, homePageRoute } from '../lib/homeApps';\nimport { qualifyHostId, splitHostId } from '../lib/hostIdentity';\nimport {\n dashboardTileFills,\n dashboardTileFillsAcrossHosts,\n hostSlotFillsAcrossHosts,\n pluginHomeContributions,\n registeredWebPluginHostIds,\n webPluginRegistryForHost,\n HOST_SLOTS,\n legacyHomeAppFills,\n parseDashboardTileData,\n type InstalledHomeContribution,\n} from '../lib/pluginRegistry';\nimport { accountStore } from '../stores/accountStore';\nimport { providerStatusStore, refreshProviderStatus } from '../stores/providerStatusStore';\nimport { sessionsStore, useRailEntries } from '../stores/sessionsStore';\nimport { setDockOpen, setDockTab } from '../stores/uiStore';\nimport { useHomeReads } from '../stores/useHomeReads';\nimport { usePluginSlotProps } from '../stores/usePluginSlotProps';\nimport { useSessionAvatars } from '../stores/useSessionAvatars';\nimport { useWebPluginRegistry } from '../stores/useWebPluginRegistry';\nimport { workspaceHostLabelsStore, workspacesStore } from '../stores/workspacesStore';\nimport { DashboardTileGrid, type DashboardTileView } from './DashboardTileGrid';\nimport { HomeActivity } from './HomeActivity';\n\nexport interface HomeHost {\n id: string;\n name: string;\n connected?: boolean;\n person?: { issuer: string; subject: string };\n /** Local plugin ids admitted by the shell's package fingerprint check. Missing means none. */\n admittedPluginIds?: readonly string[];\n openOnHostUrl?: string;\n}\n\nexport interface HomeViewProps {\n hosts?: readonly HomeHost[];\n tiles?: readonly (DashboardTileView & { hostId?: string })[];\n /** Legacy callers may still supply full cards; new callers supply ordered tiles instead. */\n main?: readonly ReactNode[];\n side?: readonly ReactNode[];\n title?: string;\n emptyTitle?: string;\n emptyDescription?: string;\n /** How the empty card reads: a whole page for a missing workspace, an error tone with Retry for a failed load. */\n empty?: Pick<EmptyStateProps, 'size' | 'tone' | 'icon' | 'action'>;\n onShowSessions?: () => void;\n navigationToggle?: 'mobile' | 'always';\n /** Drawn on a template's own background, such as a desktop: no page background and no heading. */\n bare?: boolean;\n}\n\nfunction SessionsToggle({\n onShowSessions,\n navigationToggle,\n}: {\n onShowSessions: () => void;\n navigationToggle: 'mobile' | 'always';\n}) {\n const t = useT();\n return (\n <div className={`shrink-0 px-3 pt-2 ${navigationToggle === 'mobile' ? 'md:hidden' : ''}`}>\n <Button\n variant=\"ghost\"\n size=\"icon-md\"\n data-testid=\"mobile-sessions-open\"\n title={t('webDashboard.common.showSessions', 'Show sessions')}\n aria-label={t('webDashboard.common.showSessions', 'Show sessions')}\n onClick={onShowSessions}\n className=\"rounded-lg bg-po-panel/60 text-po-text hover:bg-po-panel hover:text-po-hi\"\n >\n <SidebarIcon aria-hidden className=\"size-4\" />\n </Button>\n </div>\n );\n}\n\n/** Shown only with more than one host: a single host has nothing to filter. */\nfunction HostFilter({\n hosts,\n value,\n onChange,\n}: {\n hosts: readonly HomeHost[];\n value: string;\n onChange: (value: string) => void;\n}) {\n const t = useT();\n if (hosts.length < 2) return null;\n return (\n <Select value={value} onValueChange={onChange}>\n <SelectTrigger aria-label={t('webDashboard.home.filterByHost', 'Filter by host')} className=\"w-fit\">\n <SelectValue>\n {value === 'all'\n ? t('webDashboard.home.allHosts', 'All hosts')\n : hosts.find((host) => host.id === value)?.name}\n </SelectValue>\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"all\">{t('webDashboard.home.allHosts', 'All hosts')}</SelectItem>\n {hosts.map((host) => (\n <SelectItem key={host.id} value={host.id}>\n {host.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n );\n}\n\n/** The Workspace dashboard frame, independent of plugins, navigation and data loading. */\nexport function HomeView({\n tiles,\n hosts = [],\n main = [],\n side = [],\n title: suppliedTitle,\n emptyTitle: suppliedEmptyTitle,\n emptyDescription: suppliedEmptyDescription,\n empty,\n onShowSessions,\n navigationToggle = 'mobile',\n bare = false,\n}: HomeViewProps) {\n const t = useT();\n const title = suppliedTitle ?? t('webDashboard.home.title', 'Home');\n const emptyTitle = suppliedEmptyTitle ?? t('webDashboard.home.emptyTitle', 'Nothing on Home yet');\n const emptyDescription =\n suppliedEmptyDescription ?? t('webDashboard.home.emptyDescription', 'Apps you add show up here.');\n const [hostFilter, setHostFilter] = useState('all');\n const all = tiles ?? [\n ...main.map((body, index): DashboardTileView => ({ id: `main-${index}`, size: 'wide', body, legacy: true })),\n ...side.map((body, index): DashboardTileView => ({ id: `side-${index}`, size: 'small', body, legacy: true })),\n ];\n const entries = all.filter((tile) => hostFilter === 'all' || ('hostId' in tile && tile.hostId === hostFilter));\n return (\n <section\n aria-label={title}\n data-testid=\"home-page\"\n className={`flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto font-sans text-base text-po-text ${bare ? '' : 'bg-po-bg'}`}\n >\n {onShowSessions ? <SessionsToggle onShowSessions={onShowSessions} navigationToggle={navigationToggle} /> : null}\n <div className=\"mx-auto flex w-full max-w-6xl flex-col gap-6 px-4 py-6 md:px-8 md:py-8\">\n {bare ? null : <h1 className=\"text-2xl font-semibold text-po-hi\">{title}</h1>}\n <HostFilter hosts={hosts} value={hostFilter} onChange={setHostFilter} />\n {entries.length === 0 && all.length > 0 ? (\n // The filter hides every app; Home itself is not empty.\n <EmptyState\n icon={<ServerIcon />}\n title={t('webDashboard.home.noHostAppsTitle', 'No apps on this host')}\n description={t(\n 'webDashboard.home.noHostAppsDescription',\n 'Apps from your other hosts are hidden by the host filter.',\n )}\n secondaryAction={{\n label: t('webDashboard.home.showAllHosts', 'Show all hosts'),\n onAction: () => setHostFilter('all'),\n }}\n />\n ) : entries.length === 0 ? (\n <EmptyState icon={<GridIcon />} title={emptyTitle} description={emptyDescription} {...empty} />\n ) : (\n <DashboardTileGrid tiles={entries} />\n )}\n </div>\n </section>\n );\n}\n\ntype HostTile = DashboardTileView & { hostId?: string };\n\nconst unique = (entries: readonly InstalledHomeContribution[]) => [\n ...new Map(entries.map((entry) => [JSON.stringify([entry.pluginId, entry.id, entry.mount]), entry])).values(),\n];\n\nfunction homePluginAdmitted(hosts: readonly Omit<HomeHost, 'name'>[], hostId: string, pluginId: string): boolean {\n return (\n hosts.find(({ id }) => id === hostId)?.admittedPluginIds?.includes(splitHostId(pluginId)?.localId ?? pluginId) ===\n true\n );\n}\nfunction homeAttentionFills(hosts: readonly Omit<HomeHost, 'name'>[]) {\n const local = hosts.find(({ id }) => id === 'local');\n return [\n ...(hosts.length === 0 || local !== undefined\n ? webPluginRegistryForHost()\n .hostSlotFills(HOST_SLOTS.homeAttention)\n .map((fill) => ({\n fill,\n hostId: local?.id,\n key: JSON.stringify([fill.pluginId, fill.id]),\n }))\n : []),\n ...hostSlotFillsAcrossHosts(\n hosts.filter(({ id }) => id !== 'local'),\n HOST_SLOTS.homeAttention,\n (hostId, pluginId) => homePluginAdmitted(hosts, hostId, pluginId),\n ),\n ];\n}\n\nfunction isHomeAttentionCountSource(data: unknown): data is HomeAttentionCountSource {\n return (\n typeof data === 'object' &&\n data !== null &&\n 'subscribe' in data &&\n typeof data.subscribe === 'function' &&\n 'getSnapshot' in data &&\n typeof data.getSnapshot === 'function'\n );\n}\n\n/** Subscribe while away from Home too; resolving a card, not visiting Home, changes the count. */\nexport function useHomeAttentionCount(hosts?: readonly HomeHost[]): number {\n const revision = useWebPluginRegistry();\n const { subscribe, getSnapshot } = useMemo(() => {\n const sources = new Set(\n homeAttentionFills(hosts ?? registeredWebPluginHostIds().map((id) => ({ id })))\n .filter(({ fill }) => fill.component !== undefined)\n .map(({ fill }) => fill.data)\n .filter(isHomeAttentionCountSource),\n );\n return {\n subscribe: (listener: () => void) => {\n const stops = Array.from(sources, (source) => source.subscribe(listener));\n return () => stops.forEach((stop) => stop());\n },\n getSnapshot: () => {\n let total = 0;\n for (const source of sources) {\n const count = source.getSnapshot();\n if (Number.isSafeInteger(count) && count > 0) total += count;\n }\n return total;\n },\n };\n }, [hosts, revision]);\n return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);\n}\n\n/** Home joins host fills and session facts independently of the focused session or workspace. */\nexport function HomePage({\n onShowSessions,\n navigationToggle = 'mobile',\n bare,\n hosts: suppliedHosts,\n}: {\n onShowSessions?: () => void;\n navigationToggle?: 'mobile' | 'always';\n bare?: boolean;\n hosts?: readonly HomeHost[];\n}) {\n const t = useT();\n const props = usePluginSlotProps(null);\n const navigate = useNavigate();\n const labels = useStore(workspaceHostLabelsStore, (state) => state);\n const [hostFilter, setHostFilter] = useState('all');\n const [showEarlier, setShowEarlier] = useState(false);\n const order = useStore(sessionsStore, (state) => state.order);\n const byId = useRailEntries();\n const workspaceOrder = useStore(workspacesStore, (state) => state.order);\n const avatarUrls = useSessionAvatars(order, byId);\n const account = useStore(accountStore, (state) => state);\n const providerConnected = useStore(providerStatusStore, (state) => state.connected);\n useEffect(() => {\n void refreshProviderStatus().catch((error: unknown) => console.warn('Provider status unavailable.', error));\n }, []);\n const coordinatorName =\n order.map((id) => byId[id]?.summary).find((summary) => summary?.sessionProvenance === 'coordinator')?.name ??\n t('webDashboard.home.yourAgent', 'Your agent');\n const hosts: readonly HomeHost[] =\n suppliedHosts ??\n registeredWebPluginHostIds().map((id) => ({\n id,\n name: labels[id] ?? t('webDashboard.home.computer', 'Computer {id}', { id: id.slice(0, 8) }),\n }));\n const several = hosts.length > 1;\n const remoteHosts = hosts.filter((host) => host.id !== 'local');\n const localHost = hosts.find((host) => host.id === 'local');\n const visible = (hostId: string | undefined) => hostFilter === 'all' || (hostId ?? 'local') === hostFilter;\n const admitted = (hostId: string, pluginId: string) => homePluginAdmitted(hosts, hostId, pluginId);\n const dashboardRequests = useMemo(\n () => Object.fromEntries(remoteHosts.map(({ id }) => [id, fetchWithStepUpForHost(id)])),\n [hosts],\n );\n const forHost = (hostId: string | undefined) =>\n hostId === undefined || hostId === 'local'\n ? props\n : {\n ...props,\n dashboardApi: { key: hostId, request: dashboardRequests[hostId] },\n // A remote host's fills know only its local session ids; the rail keys them by host.\n openSession: (sessionId: string) => props.openSession?.(qualifyHostId(hostId, sessionId)),\n openPage: (pageId: string, itemId?: string) => {\n void navigate({\n to: '/page/$pageId',\n params: { pageId: homePageRoute(hostId, pageId).pageId },\n ...(itemId === undefined ? {} : { search: { item: itemId } }),\n });\n },\n openSettings: (section: string) => {\n void navigate({ to: '/settings/$section', params: { section: qualifyHostId(hostId, section) } });\n },\n };\n // ponytail: an attention card left idle on another host still shows its host badge; render the badge inside the card when one renders nothing often.\n const tag = (hostId: string | undefined, body: ReactNode) =>\n hostId === undefined || !several ? (\n body\n ) : (\n <>\n <Badge>{hosts.find((host) => host.id === hostId)?.name ?? hostId}</Badge>\n {body}\n </>\n );\n const localFills =\n hosts.length === 0 || localHost !== undefined\n ? [...dashboardTileFills({ scope: 'host' }), ...legacyHomeAppFills()].map((fill) => ({\n fill,\n hostId: localHost?.id,\n key: JSON.stringify([fill.pluginId, fill.id]),\n }))\n : [];\n const fills = [\n ...localFills,\n ...dashboardTileFillsAcrossHosts(remoteHosts, admitted),\n ...homeAppEntries(remoteHosts, (id) =>\n webPluginRegistryForHost(id)\n .legacyHomeAppFills()\n .filter((fill) => admitted(id, fill.pluginId)),\n ),\n ].sort((left, right) => left.fill.order - right.fill.order || left.key.localeCompare(right.key));\n // What waits on the person leads the main column; each fill draws its own frame and hides when idle.\n const attention: HostTile[] = homeAttentionFills(hosts).flatMap(({ fill, hostId, key }) =>\n fill.component === undefined\n ? []\n : [\n {\n id: key,\n ...(hostId === undefined ? {} : { hostId }),\n size: 'wide' as const,\n column: 'main' as const,\n legacy: true,\n body: tag(hostId, createElement(fill.component, forHost(hostId))),\n },\n ],\n );\n const tiles: HostTile[] = [];\n for (const { fill, hostId, key } of fills) {\n const component = fill.component;\n if (component === undefined) continue;\n const data = parseDashboardTileData(fill.data);\n const destination = data?.open;\n const hostProps = forHost(hostId);\n const open = destination?.kind === 'page' ? hostProps.openPage : hostProps.openSettings;\n const side =\n data === null ? (fill.data as { column?: unknown } | undefined)?.column === 'side' : data.column === 'side';\n tiles.push({\n id: key,\n ...(hostId === undefined ? {} : { hostId }),\n size: data === null ? (side ? 'small' : 'wide') : (data.size ?? 'small'),\n column: side ? 'side' : 'main',\n ...(data === null\n ? { legacy: true }\n : {\n title: t(\n `plugin.${splitHostId(fill.pluginId)?.localId ?? fill.pluginId}.dashboardTiles.${fill.id}.label`,\n data.title,\n ),\n icon: data.icon,\n }),\n ...(destination === undefined || open === undefined\n ? {}\n : {\n onOpen: () => open(destination.id),\n }),\n body: tag(hostId, createElement(component, hostProps)),\n });\n }\n for (const host of remoteHosts) {\n const registry = webPluginRegistryForHost(host.id);\n const rejected = [\n ...registry.dashboardTileFills({ scope: 'host' }),\n ...registry.legacyHomeAppFills(),\n ...registry.hostSlotFills(HOST_SLOTS.homeAttention),\n ].some((fill) => !admitted(host.id, fill.pluginId));\n if (!rejected && host.openOnHostUrl === undefined) continue;\n const url = host.openOnHostUrl;\n tiles.push({\n id: `open-on-host:${host.id}`,\n hostId: host.id,\n column: 'main',\n title: t('webDashboard.home.openOnHost', 'Open on {host}', { host: host.name }),\n body:\n url && /^https?:\\/\\//u.test(url) ? (\n <a href={url} className=\"text-po-green underline\">\n {t('webDashboard.home.openOnHost', 'Open on {host}', { host: host.name })}\n </a>\n ) : (\n <p>{t('webDashboard.home.openOnHost', 'Open on {host}', { host: host.name })}</p>\n ),\n });\n }\n\n // Session facts and each host's Home read, joined by the pure model.\n const readHosts = hosts.length === 0 ? [{ id: 'local', name: t('webDashboard.home.thisHost', 'This host') }] : hosts;\n const reads = useHomeReads(readHosts.map((host) => (host.id === 'local' ? undefined : host.id)));\n const hostReads: HomeHostRead[] = readHosts\n .filter((host) => visible(host.id))\n .map((host) => {\n const local = host.id === 'local';\n const read = reads[local ? '' : host.id];\n const workspaces = workspaceOrder.filter((id) => (splitHostId(id)?.hostId ?? 'local') === host.id);\n const contributions = unique([\n ...(local\n ? pluginHomeContributions({ scope: 'host' })\n : webPluginRegistryForHost(host.id).pluginHomeContributions({ scope: 'host' })),\n ...workspaces.flatMap((workspaceId) => pluginHomeContributions({ scope: 'workspace', workspaceId })),\n ]).filter((entry) => local || admitted(host.id, entry.pluginId));\n return {\n ...(local ? {} : { hostId: host.id }),\n label: host.name,\n loading: read?.loading ?? true,\n ...(read?.snapshot === undefined ? {} : { snapshot: read.snapshot }),\n ...(read?.error === undefined ? {} : { error: read.error }),\n contributions: contributions.map((entry) => ({\n ...entry,\n data: { ...entry.data, label: entry.data.translateLabel?.(t) ?? entry.data.label },\n })),\n };\n });\n const model = homeActivity({\n now: Date.now(),\n showEarlier,\n hosts: hostReads,\n sessions: order.flatMap((id) => {\n // Renders on what the rail shows; the recency sort reads `updatedAt` fresh from the store.\n const entry = sessionsStore.state.byId[id] ?? byId[id];\n if (entry === undefined || !visible(splitHostId(id)?.hostId)) return [];\n const avatarUrl = avatarUrls[id];\n return [{ id, entry, ...(avatarUrl === undefined ? {} : { avatarUrl }) }];\n }),\n });\n const open = (target: HomeTarget) => () => {\n if (target.destination !== undefined) {\n setDockTab(target.sessionId, 'activity');\n setDockOpen(true);\n }\n void navigate({ to: '/session/$sessionId', params: { sessionId: target.sessionId } });\n };\n\n const lead = attention.filter((tile) => visible(tile.hostId));\n // Gentle asks: the person's choice to make whenever they like, never a blocker.\n const asks = (\n <>\n {providerConnected === false ? (\n <CtaCard\n data-testid=\"home-provider-ask\"\n artwork=\"/mascot/cta-provider.png\"\n title={t('webDashboard.home.providerAskTitle', '{agent} needs a provider', { agent: coordinatorName })}\n description={t(\n 'webDashboard.home.providerAskDescription',\n 'Pick the AI that does the thinking. {agent} handles the rest.',\n { agent: coordinatorName },\n )}\n action={t('webDashboard.home.connectProvider', 'Connect provider')}\n onAction={() => void navigate({ to: '/settings/$section', params: { section: 'providers' } })}\n />\n ) : null}\n {account.bridge && account.openAccount && account.checked && !account.status.signedIn ? (\n <CtaCard\n data-testid=\"home-sign-in-ask\"\n artwork=\"/mascot/cta-sign-in.png\"\n title={t('webDashboard.home.signInAskTitle', 'Your cloud sessions, here too')}\n description={t(\n 'webDashboard.home.signInAskDescription',\n 'Sign in to Po Cloud. Sessions on this computer stay as they are.',\n )}\n action={t('webDashboard.account.signIn', 'Sign in with Po')}\n onAction={account.openAccount}\n />\n ) : null}\n </>\n );\n const asking = providerConnected === false || (account.bridge !== undefined && !account.status.signedIn);\n const shown = tiles.filter((tile) => visible(tile.hostId));\n const mainTiles = shown.filter((tile) => tile.column !== 'side');\n const sideTiles = shown.filter((tile) => tile.column === 'side');\n return (\n <HomeActivity\n summary={model.summary}\n activity={model.activity.map(({ target, ...row }) => ({ ...row, onOpen: open(target) }))}\n waiting={model.waiting.map(({ target, ...row }) => ({ ...row, onOpen: open(target) }))}\n coverage={model.coverage}\n {...(model.earlier ? { onShowEarlier: () => setShowEarlier(true) } : {})}\n {...(bare === undefined ? {} : { bare })}\n toolbar={\n onShowSessions ? <SessionsToggle onShowSessions={onShowSessions} navigationToggle={navigationToggle} /> : null\n }\n controls={<HostFilter hosts={hosts} value={hostFilter} onChange={setHostFilter} />}\n lead={\n lead.length > 0 || asking ? (\n <>\n {asking ? <div className=\"flex flex-col gap-3\">{asks}</div> : null}\n {lead.length > 0 ? (\n // Idle attention cards render nothing; the group then takes no room in the column.\n <div className=\"hidden has-[[data-tile-id]:not(:empty)]:block\">\n <DashboardTileGrid tiles={lead} />\n </div>\n ) : null}\n </>\n ) : null\n }\n main={mainTiles.length > 0 ? <DashboardTileGrid tiles={mainTiles} /> : null}\n aside={sideTiles.length > 0 ? <DashboardTileGrid tiles={sideTiles} /> : null}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA2EA,SAAS,eAAe,EACtB,gBACA,oBAIC;CACD,MAAM,IAAI,KAAK;CACf,OACE,oBAAC,OAAD;EAAK,WAAW,sBAAsB,qBAAqB,WAAW,cAAc;EAClF,UAAA,oBAAC,QAAD;GACE,SAAQ;GACR,MAAK;GACL,eAAY;GACZ,OAAO,EAAE,oCAAoC,eAAe;GAC5D,cAAY,EAAE,oCAAoC,eAAe;GACjE,SAAS;GACT,WAAU;GAEV,UAAA,oBAAC,aAAD;IAAa,eAAA;IAAY,WAAU;GAAU,CAAA;EACvC,CAAA;CACL,CAAA;AAET;;AAGA,SAAS,WAAW,EAClB,OACA,OACA,YAKC;CACD,MAAM,IAAI,KAAK;CACf,IAAI,MAAM,SAAS,GAAG,OAAO;CAC7B,OACE,qBAAC,QAAD;EAAe;EAAO,eAAe;EAArC,UAAA,CACE,oBAAC,eAAD;GAAe,cAAY,EAAE,kCAAkC,gBAAgB;GAAG,WAAU;GAC1F,UAAA,oBAAC,aAAD,EAAA,UACG,UAAU,QACP,EAAE,8BAA8B,WAAW,IAC3C,MAAM,MAAM,SAAS,KAAK,OAAO,KAAK,CAAC,EAAE,KAClC,CAAA;EACA,CAAA,GACf,qBAAC,eAAD,EAAA,UAAA,CACE,oBAAC,YAAD;GAAY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AS,KAAK,SACjB,qBAAA,YAAA,EAAA,UAAA,CACG,SAAS,oBAAC,OAAD;GAAK,WAAU;GAAuB,UAAA;EAAU,CAAA,IAAI,MAC7D,KAAK,SAAS,IAEb,oBAAC,OAAD;GAAK,WAAU;GACb,UAAA,oBAAC,mBAAD,EAAmB,OAAO,KAAO,CAAA;EAC9B,CAAA,IACH,IACJ,EAAA,CAAA,IACA;EAEN,MAAM,UAAU,SAAS,IAAI,oBAAC,mBAAD,EAAmB,OAAO,UAAY,CAAA,IAAI;EACvE,OAAO,UAAU,SAAS,IAAI,oBAAC,mBAAD,EAAmB,OAAO,UAAY,CAAA,IAAI;CACzE,CAAA;AAEL"}
@@ -175,7 +175,10 @@ function ActivityDock({ onClose, onOpenContent, scope, conversation, conversatio
175
175
  slot: _agimon_ai_po_core_web.HOST_SLOTS.activity,
176
176
  sessionId: activeId
177
177
  }),
178
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PromoPanel, { sessionId: activeId })
178
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PluginSurface.PluginSurface, {
179
+ slot: _agimon_ai_po_core_web.HOST_SLOTS.activityPromo,
180
+ sessionId: activeId
181
+ })
179
182
  ]
180
183
  }),
181
184
  pinnedGroups.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
@@ -186,26 +189,17 @@ function ActivityDock({ onClose, onOpenContent, scope, conversation, conversatio
186
189
  slotProps
187
190
  }, group.name))
188
191
  }) : null,
189
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
190
- className: "relative shrink-0",
191
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
192
- className: "flex gap-2 border-t border-po-border-soft px-5 py-3 text-sm leading-relaxed text-po-dim",
193
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_agimon_ai_po_web_components.LightbulbIcon, {
192
+ busy > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
193
+ className: "shrink-0 border-t border-po-border-soft bg-po-rail px-4 py-2",
194
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("output", {
195
+ "data-testid": "activity-busy",
196
+ className: "flex items-center gap-2 rounded-lg bg-po-tint-yellow px-3 py-2 text-sm text-po-yellow",
197
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_agimon_ai_po_web_components.LoaderIcon, {
194
198
  "aria-hidden": true,
195
- className: "size-3.5 shrink-0"
196
- }), t("webDashboard.activity.footerHint", "Each group is rendered by the package that owns it. The session's summary line stands in until that package publishes per-run detail.")]
197
- }), busy > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
198
- className: "absolute inset-0 flex items-center border-t border-po-border-soft bg-po-rail px-4",
199
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("output", {
200
- "data-testid": "activity-busy",
201
- className: "flex flex-1 items-center gap-2 rounded-lg bg-po-tint-yellow px-3 py-2 text-sm text-po-yellow",
202
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_agimon_ai_po_web_components.LoaderIcon, {
203
- "aria-hidden": true,
204
- className: "size-3.5 animate-spin"
205
- }), t("webDashboard.activity.runningInBackground", "{count} running in the background", { count: busy })]
206
- })
207
- }) : null]
208
- })
199
+ className: "size-3.5 animate-spin"
200
+ }), t("webDashboard.activity.runningInBackground", "{count} running in the background", { count: busy })]
201
+ })
202
+ }) : null
209
203
  ] })]
210
204
  });
211
205
  }
@@ -226,58 +220,6 @@ function Placeholder({ testId, title, description }) {
226
220
  })]
227
221
  });
228
222
  }
229
- /** Decorative frame naming what the dock is for; plugins may add compact actions such as Explore. */
230
- function PromoPanel({ sessionId }) {
231
- const t = (0, _agimon_ai_po_core_web.useT)();
232
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
233
- className: "relative shrink-0 overflow-hidden rounded-lg border border-po-border-soft px-4 pt-3.5 pb-16",
234
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
235
- className: "relative z-10 flex items-start gap-3",
236
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_agimon_ai_po_web_components.SparklesIcon, {
237
- "aria-hidden": true,
238
- className: "mt-0.5 size-5 shrink-0 text-po-green"
239
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
240
- className: "flex flex-col gap-1",
241
- children: [
242
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
243
- className: "text-base font-semibold text-po-hi",
244
- children: t("webDashboard.activity.promoTitle", "A more capable you")
245
- }),
246
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
247
- className: "text-sm text-po-dim",
248
- children: t("webDashboard.activity.promoDescription", "Agents, tools, and your codebase. All in one place.")
249
- }),
250
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
251
- className: "flex flex-wrap gap-2 pt-1 empty:hidden",
252
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_PluginSurface.PluginSurface, {
253
- slot: _agimon_ai_po_core_web.HOST_SLOTS.activityPromo,
254
- sessionId
255
- })
256
- })
257
- ]
258
- })]
259
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
260
- "aria-hidden": true,
261
- viewBox: "0 0 320 80",
262
- preserveAspectRatio: "none",
263
- className: "absolute inset-x-0 bottom-0 h-16 w-full",
264
- children: [
265
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
266
- d: "M0 50 C60 30 110 70 170 46 S280 18 320 34 V80 H0Z",
267
- className: "fill-po-tint-green"
268
- }),
269
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
270
- d: "M0 64 C70 46 120 78 190 58 S290 44 320 52 V80 H0Z",
271
- className: "fill-po-edge-green opacity-40"
272
- }),
273
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
274
- d: "M0 74 C80 62 150 82 220 70 S300 64 320 68 V80 H0Z",
275
- className: "fill-po-green opacity-20"
276
- })
277
- ]
278
- })]
279
- });
280
- }
281
223
  function ActivityGroupView({ group, slotProps }) {
282
224
  const t = (0, _agimon_ai_po_core_web.useT)();
283
225
  const GroupIcon = group.icon ?? _agimon_ai_po_web_components.ActivityIcon;
@@ -321,7 +263,7 @@ function ActivityGroupView({ group, slotProps }) {
321
263
  })
322
264
  }),
323
265
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
324
- className: group.name === "approval" ? "col-span-full min-w-0" : "col-start-2 min-w-0",
266
+ className: group.collapsible === false ? "col-span-full min-w-0" : "col-start-2 min-w-0",
325
267
  children: require_pluginRegistry.slotFills((0, _agimon_ai_po_core_web.activityGroupSlot)(group.name)).length > 0 ? slotProps.renderSlot((0, _agimon_ai_po_core_web.activityGroupSlot)(group.name)) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
326
268
  "data-testid": `activity-summary-${group.name}`,
327
269
  className: `text-sm first-letter:uppercase ${group.active ? "text-po-yellow" : "text-po-dim"}`,