{"version":3,"file":"ActivityDock.mjs","names":["HOST_SLOTS","activityGroupSlot"],"sources":["../../../../src/web/features/activity/ActivityDock.tsx"],"sourcesContent":["import { useT } from '@agimon-ai/po-core/web';\nimport {\n  ActivityIcon,\n  Button,\n  ChevronRightIcon,\n  CloseIcon,\n  Kbd,\n  LightbulbIcon,\n  LoaderIcon,\n  SparklesIcon,\n} from '@agimon-ai/po-web-components';\nimport { useStore } from '@tanstack/react-store';\nimport { type ReactNode, useEffect, useRef, useState } from 'react';\n\nimport { PluginSurface } from '../../components/PluginSurface';\nimport { type ActivityGroup, useActivityGroups, useDockFaceBadges, useDockFaces } from '../../lib/composition';\nimport {\n  retryWebPluginCompositions,\n  webPluginCompositionStore,\n  webPluginMountState,\n} from '../../lib/pluginCompositions';\nimport { activityGroupSlot, HOST_SLOTS, slotFills } from '../../lib/pluginRegistry';\nimport { activityWaitingCount } from '../../lib/sessionRailModel';\nimport { sessionsStore } from '../../stores/sessionsStore';\nimport { useActiveSession } from '../../stores/sessionStore';\nimport { dockTabFor, setDockTab, uiStore } from '../../stores/uiStore';\nimport { usePluginSlotProps } from '../../stores/usePluginSlotProps';\nimport { ContextPanel } from './ContextPanel';\nimport { DockTabs } from './DockTabs';\n\n/** How long a face that just appeared keeps its tint before it fades. */\nconst ATTENTION_MS = 2400;\n\nexport interface DockFaceSnapshot {\n  sessionId: string | null;\n  ids: ReadonlySet<string>;\n}\n\n/**\n * Faces that appeared while this session's dock was already on screen. Faces\n * present when the dock mounts or the session changes are not news.\n */\nexport function appearedFaces(before: DockFaceSnapshot | undefined, after: DockFaceSnapshot): string[] {\n  if (before === undefined || before.sessionId !== after.sessionId) return [];\n  return [...after.ids].filter((id) => !before.ids.has(id));\n}\n\nfunction useAppearingFaces(sessionId: string | null, faceIds: readonly string[]): readonly string[] {\n  const previous = useRef<DockFaceSnapshot | undefined>(undefined);\n  const [attention, setAttention] = useState<readonly string[]>([]);\n  const key = faceIds.join('\\n');\n  useEffect(() => {\n    const after = { sessionId, ids: new Set(key === '' ? [] : key.split('\\n')) };\n    const before = previous.current;\n    previous.current = after;\n    if (before?.sessionId !== sessionId) setAttention([]);\n    const appeared = appearedFaces(before, after);\n    if (appeared.length === 0) return;\n    setAttention((current) => [...current, ...appeared]);\n    // Not cleared on the next change: a second face appearing must not strand this one's tint.\n    setTimeout(() => setAttention((current) => current.filter((id) => !appeared.includes(id))), ATTENTION_MS);\n  }, [sessionId, key]);\n  return attention;\n}\n/**\n * The column for everything that is not the transcript.\n *\n * `activity` is asynchronous work that outlives the turn that started it.\n * `context` is the composition that work runs under, and what carrying it costs.\n *\n * On the activity face the host owns only the frame: which groups exist, their\n * key chips, and what they render come from the packages that declare them.\n * Each declared group opens the keyed slot activity.<name>; the sections any\n * plugin registers under that name render there, in slot order, and a group\n * nobody fills shows the one-line summary the session's footer publishes.\n *\n * Only the person moves between faces. A face that appears later, such as\n * Author when a document opens, announces itself in the tab strip instead of\n * taking the dock over.\n */\nexport function ActivityDock({\n  onClose,\n  onOpenContent,\n  scope,\n  conversation,\n  conversationBeside,\n  conversationLabel,\n}: {\n  onClose: () => void;\n  onOpenContent: () => void;\n  /**\n   * The conversation, passed only while the dock is on screen beside a panel\n   * that gave up its own prompt. Its presence adds the Conversation face.\n   */\n  conversation?: ReactNode;\n  /** The face the Conversation face sits beside, grouped, such as the plugin face whose canvas gave up the prompt. */\n  conversationBeside?: string;\n  /** What the conversation is about, such as the open file; names the Conversation face and its group. */\n  conversationLabel?: string;\n  /** Names what the activity face is showing when it is not the session itself, such as a workflow step. */\n  scope?: string;\n}) {\n  const t = useT();\n  const activeId = useStore(sessionsStore, (state) => state.activeId);\n  // Only an offline reason shows here, so a status or timestamp change does not render the dock.\n  const offlineReason = useStore(sessionsStore, (state) => {\n    const meta = state.activeId === null ? undefined : state.byId[state.activeId];\n    return meta?.attach === 'offline' ? (meta.reason ?? '') : null;\n  });\n  const updateRequired = useStore(sessionsStore, (state) => state.updateRequired);\n  const statuses = useActiveSession((state) => state.statuses);\n  const widgets = useActiveSession((state) => state.widgets);\n  const slotProps = usePluginSlotProps(activeId, onOpenContent);\n  const tab = useStore(uiStore, (state) => dockTabFor(state, activeId));\n  const declaredFaces = useDockFaces(activeId);\n  const dockFaces = declaredFaces.filter(\n    (face) => face.requiredMode === undefined || slotProps.activeModes?.includes(face.requiredMode),\n  );\n  const disabledSelection = declaredFaces.some(\n    (face) => face.id === tab && face.requiredMode !== undefined && !slotProps.activeModes?.includes(face.requiredMode),\n  );\n  useEffect(() => {\n    // Turning a mode off leaves Activity selected, even when the mode is enabled again.\n    if (disabledSelection) setDockTab(activeId, 'activity');\n  }, [activeId, disabledSelection]);\n  const selectedFace = dockFaces.find((face) => face.id === tab);\n  // Display only: a saved face that is not available yet (Author before its\n  // document opens) shows Activity and comes back when it does.\n  const resolvedTab =\n    tab === 'context' ||\n    tab === 'activity' ||\n    (tab === 'conversation' && conversation !== undefined) ||\n    selectedFace !== undefined\n      ? tab\n      : 'activity';\n  const DockPanel = selectedFace?.panel;\n  const badges = useDockFaceBadges(dockFaces, activeId);\n  const waiting = useStore(sessionsStore, (state) =>\n    activityWaitingCount(state.activeId === null ? undefined : state.byId[state.activeId]?.summary),\n  );\n  const attention = useAppearingFaces(\n    activeId,\n    dockFaces.map((face) => face.id),\n  ).filter((id) => id !== resolvedTab);\n  const workspaceId = useStore(sessionsStore, (state) =>\n    state.activeId === null ? undefined : state.byId[state.activeId]?.summary.workspaceId,\n  );\n  const compositionSnapshot = useStore(webPluginCompositionStore);\n  const compositionState = webPluginMountState(\n    activeId === null ? { scope: 'host' } : { scope: 'session', sessionId: activeId, workspaceId: workspaceId ?? '' },\n    compositionSnapshot,\n  );\n  const groups = useActivityGroups(statuses, widgets, activeId);\n  const ordinaryGroups = groups.filter((group) => group.placement !== 'bottom');\n  const pinnedGroups = groups.filter((group) => group.placement === 'bottom');\n  const busy = groups.filter((group) => group.active).length;\n\n  return (\n    <aside\n      data-testid=\"activity-dock\"\n      className=\"flex w-[min(360px,calc(100vw-48px))] shrink-0 flex-col overflow-hidden border-l border-po-border-soft bg-po-rail sm:w-[360px]\"\n    >\n      <div className=\"flex h-16 shrink-0 items-end gap-4 border-b border-po-border-soft px-5\">\n        <DockTabs\n          contributed={dockFaces}\n          conversation={conversation !== undefined}\n          conversationBeside={conversationBeside}\n          conversationLabel={conversationLabel}\n          active={resolvedTab}\n          onSelect={(id) => setDockTab(activeId, id)}\n          badges={badges}\n          waiting={waiting}\n          attention={attention}\n        />\n        <span className=\"flex-1\" />\n        <Button\n          variant=\"ghost\"\n          size=\"icon\"\n          data-testid=\"activity-close\"\n          aria-label={t('webDashboard.activity.hideActivity', 'Hide activity')}\n          title={t('webDashboard.activity.hideActivity', 'Hide activity')}\n          onClick={onClose}\n          className=\"mb-4 text-po-dim\"\n        >\n          <CloseIcon aria-hidden className=\"size-3.5\" />\n        </Button>\n      </div>\n\n      {resolvedTab === 'conversation' ? (\n        conversation\n      ) : DockPanel !== undefined ? (\n        <DockPanel {...slotProps} />\n      ) : resolvedTab === 'context' ? (\n        <ContextPanel />\n      ) : (\n        <>\n          <div data-testid=\"activity-scroll\" className=\"flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto p-4\">\n            {scope === undefined ? null : (\n              <p data-testid=\"activity-scope\" className=\"px-1 text-sm text-po-dim\">\n                {scope}\n              </p>\n            )}\n            {offlineReason !== null ? (\n              <output\n                data-testid=\"activity-offline\"\n                className={updateRequired ? 'block px-1 text-sm text-po-magenta' : 'block px-1 text-sm text-po-dim'}\n              >\n                {offlineReason || t('webDashboard.activity.reconnecting', 'Reconnecting')}\n              </output>\n            ) : null}\n            {compositionState.phase === 'error' ? (\n              <div\n                data-testid=\"activity-error\"\n                role=\"alert\"\n                className=\"flex items-center justify-between gap-3 rounded-lg border border-po-border-soft px-4 py-3\"\n              >\n                <span className=\"text-sm text-po-dim\">\n                  {t('webDashboard.activity.loadFailed', 'Activity failed to load')}\n                </span>\n                <Button\n                  variant=\"outline\"\n                  size=\"xs\"\n                  data-testid=\"activity-retry\"\n                  onClick={() => void retryWebPluginCompositions().catch((error: unknown) => console.error(error))}\n                >\n                  {t('webDashboard.activity.retry', 'Retry')}\n                </Button>\n              </div>\n            ) : null}\n            {groups.length === 0 && compositionState.phase === 'loading' ? (\n              <Placeholder\n                testId=\"activity-loading\"\n                title={t('webDashboard.activity.loadingActivity', 'Loading activity')}\n                description={t(\n                  'webDashboard.activity.loadingActivityDescription',\n                  'Loading the package extensions that supervise work.',\n                )}\n              />\n            ) : null}\n            {groups.length === 0 && compositionState.phase !== 'loading' && compositionState.phase !== 'error' ? (\n              <Placeholder\n                testId=\"activity-empty\"\n                title={t('webDashboard.activity.nothingSupervised', 'Nothing supervised yet')}\n                description={t(\n                  'webDashboard.activity.nothingSupervisedDescription',\n                  \"A package's group appears here once its extension reports in.\",\n                )}\n              />\n            ) : null}\n            {ordinaryGroups.map((group) => (\n              <ActivityGroupView key={group.name} group={group} slotProps={slotProps} />\n            ))}\n\n            <PluginSurface slot={HOST_SLOTS.activity} sessionId={activeId} />\n            <PromoPanel sessionId={activeId} />\n          </div>\n\n          {pinnedGroups.length > 0 ? (\n            <div data-testid=\"activity-pinned\" className=\"flex shrink-0 flex-col gap-3 px-4 pb-4\">\n              {pinnedGroups.map((group) => (\n                <ActivityGroupView key={group.name} group={group} slotProps={slotProps} />\n              ))}\n            </div>\n          ) : null}\n\n          {/* The busy count overlays the footer hint instead of joining the scroll\n              column, so it appearing or clearing never shifts the groups. It\n              belongs to the activity face only: on the context face it would be\n              a number about a list the reader is not looking at. */}\n          <div className=\"relative shrink-0\">\n            <p className=\"flex gap-2 border-t border-po-border-soft px-5 py-3 text-sm leading-relaxed text-po-dim\">\n              <LightbulbIcon aria-hidden className=\"size-3.5 shrink-0\" />\n              {t(\n                'webDashboard.activity.footerHint',\n                \"Each group is rendered by the package that owns it. The session's summary line stands in until that package publishes per-run detail.\",\n              )}\n            </p>\n            {busy > 0 ? (\n              <div className=\"absolute inset-0 flex items-center border-t border-po-border-soft bg-po-rail px-4\">\n                <output\n                  data-testid=\"activity-busy\"\n                  className=\"flex flex-1 items-center gap-2 rounded-lg bg-po-tint-yellow px-3 py-2 text-sm text-po-yellow\"\n                >\n                  <LoaderIcon aria-hidden className=\"size-3.5 animate-spin\" />\n                  {t('webDashboard.activity.runningInBackground', '{count} running in the background', { count: busy })}\n                </output>\n              </div>\n            ) : null}\n          </div>\n        </>\n      )}\n    </aside>\n  );\n}\n\n/** Plugin group names are lowercase identifiers; the heading reads in sentence case. */\nfunction sentenceCase(name: string): string {\n  return name.charAt(0).toUpperCase() + name.slice(1);\n}\n\nfunction Placeholder({ testId, title, description }: { testId: string; title: string; description: string }) {\n  return (\n    <div\n      data-testid={testId}\n      className=\"flex flex-col gap-1 rounded-lg border border-dashed border-po-border px-4 py-5\"\n    >\n      <span className=\"text-base font-semibold text-po-hi\">{title}</span>\n      <span className=\"text-sm text-po-dim\">{description}</span>\n    </div>\n  );\n}\n\n/** Decorative frame naming what the dock is for; plugins may add compact actions such as Explore. */\nfunction PromoPanel({ sessionId }: { sessionId: string | null }) {\n  const t = useT();\n  return (\n    <div className=\"relative shrink-0 overflow-hidden rounded-lg border border-po-border-soft px-4 pt-3.5 pb-16\">\n      <span className=\"relative z-10 flex items-start gap-3\">\n        <SparklesIcon aria-hidden className=\"mt-0.5 size-5 shrink-0 text-po-green\" />\n        <span className=\"flex flex-col gap-1\">\n          <span className=\"text-base font-semibold text-po-hi\">\n            {t('webDashboard.activity.promoTitle', 'A more capable you')}\n          </span>\n          <span className=\"text-sm text-po-dim\">\n            {t('webDashboard.activity.promoDescription', 'Agents, tools, and your codebase. All in one place.')}\n          </span>\n          <span className=\"flex flex-wrap gap-2 pt-1 empty:hidden\">\n            <PluginSurface slot={HOST_SLOTS.activityPromo} sessionId={sessionId} />\n          </span>\n        </span>\n      </span>\n      <svg\n        aria-hidden\n        viewBox=\"0 0 320 80\"\n        preserveAspectRatio=\"none\"\n        className=\"absolute inset-x-0 bottom-0 h-16 w-full\"\n      >\n        <path d=\"M0 50 C60 30 110 70 170 46 S280 18 320 34 V80 H0Z\" className=\"fill-po-tint-green\" />\n        <path d=\"M0 64 C70 46 120 78 190 58 S290 44 320 52 V80 H0Z\" className=\"fill-po-edge-green opacity-40\" />\n        <path d=\"M0 74 C80 62 150 82 220 70 S300 64 320 68 V80 H0Z\" className=\"fill-po-green opacity-20\" />\n      </svg>\n    </div>\n  );\n}\n\nfunction ActivityGroupView({\n  group,\n  slotProps,\n}: {\n  group: ActivityGroup;\n  slotProps: ReturnType<typeof usePluginSlotProps>;\n}) {\n  const t = useT();\n  // Plugins without icon metadata get the host's generic mark rather than nothing.\n  const GroupIcon = group.icon ?? ActivityIcon;\n  const label = group.label ?? sentenceCase(group.name);\n  const heading = (\n    <>\n      <span className=\"min-w-0 flex-1 truncate text-left text-base font-semibold text-po-hi\">{label}</span>\n      {group.keys ? (\n        <Kbd data-testid={`activity-keys-${group.name}`} className=\"bg-po-bg\">\n          {group.keys}\n        </Kbd>\n      ) : null}\n    </>\n  );\n  return (\n    <div\n      data-testid={`activity-${group.name}`}\n      data-active={group.active}\n      className=\"grid shrink-0 grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3 gap-y-2 rounded-lg border border-po-border-soft px-4 py-4\"\n    >\n      {/* One marker per head, carrying the busy colour. */}\n      <GroupIcon aria-hidden className={`mt-0.5 size-5 shrink-0 ${group.active ? 'text-po-yellow' : 'text-po-hi'}`} />\n      <div className=\"flex min-w-0 flex-col\">\n        {/* A group that owns a panel opens it from its own name: the tab is\n            temporary, so the tab strip carries it only while the reader is\n            using it. Only those headings get a chevron. */}\n        {group.transientTab === undefined ? (\n          <span className=\"flex min-w-0 items-center gap-2\">{heading}</span>\n        ) : (\n          <Button\n            variant=\"ghost\"\n            size=\"xs\"\n            data-testid={`activity-open-${group.name}`}\n            title={t('webDashboard.activity.openGroup', 'Open {name}', { name: group.name })}\n            onClick={() => {\n              const tab = group.transientTab?.();\n              if (tab !== undefined) slotProps.openTransientTab(tab);\n            }}\n            className=\"group/heading h-auto min-w-0 justify-start gap-2 px-0 py-0 hover:bg-transparent\"\n          >\n            {heading}\n            <ChevronRightIcon aria-hidden className=\"size-4 shrink-0 text-po-faint group-hover/heading:text-po-dim\" />\n          </Button>\n        )}\n      </div>\n      {/* ponytail: Only Approval needs the icon gutter back. Add a layout option if another group needs it. */}\n      <div className={group.name === 'approval' ? 'col-span-full min-w-0' : 'col-start-2 min-w-0'}>\n        {slotFills(activityGroupSlot(group.name)).length > 0 ? (\n          slotProps.renderSlot(activityGroupSlot(group.name))\n        ) : (\n          <p\n            data-testid={`activity-summary-${group.name}`}\n            className={`text-sm first-letter:uppercase ${group.active ? 'text-po-yellow' : 'text-po-dim'}`}\n          >\n            {group.summary || t('webDashboard.activity.idle', 'Idle')}\n          </p>\n        )}\n      </div>\n    </div>\n  );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA+BA,MAAM,eAAe;;;;;AAWrB,SAAgB,cAAc,QAAsC,OAAmC;CACrG,IAAI,WAAW,KAAA,KAAa,OAAO,cAAc,MAAM,WAAW,OAAO,CAAC;CAC1E,OAAO,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC,QAAQ,OAAO,CAAC,OAAO,IAAI,IAAI,EAAE,CAAC;AAC1D;AAEA,SAAS,kBAAkB,WAA0B,SAA+C;CAClG,MAAM,WAAW,OAAqC,KAAA,CAAS;CAC/D,MAAM,CAAC,WAAW,gBAAgB,SAA4B,CAAC,CAAC;CAChE,MAAM,MAAM,QAAQ,KAAK,IAAI;CAC7B,gBAAgB;EACd,MAAM,QAAQ;GAAE;GAAW,KAAK,IAAI,IAAI,QAAQ,KAAK,CAAC,IAAI,IAAI,MAAM,IAAI,CAAC;EAAE;EAC3E,MAAM,SAAS,SAAS;EACxB,SAAS,UAAU;EACnB,IAAI,QAAQ,cAAc,WAAW,aAAa,CAAC,CAAC;EACpD,MAAM,WAAW,cAAc,QAAQ,KAAK;EAC5C,IAAI,SAAS,WAAW,GAAG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