Skip to content

Account – Open workspace (workspace detail)

When the user clicks a workspace card on the Workspaces list page, they are taken to a dedicated open workspace page for that workspace. This page is the workspace context for configuration, knowledge bases, and related settings.

  • Workspaces list (/account/workspaces): Clicking on a workspace card (the card body; not the three-dot menu or drag handle) navigates to /account/workspaces/[workspaceId].
  • The card’s overflow menu (Edit, Duplicate, Delete) and drag-and-drop must not trigger navigation; only a direct click on the card content (avatar, name, description, details, apps) opens the workspace.

Same as Workspaces list: Org Admin, Workspace Admin (permissions TBD: workspace.list, workspace.manage).

This Figma link is kept for legacy context only. Use the same account shell (breadcrumbs, top bar, left nav) as other account pages, and treat this doc plus the current implementation as the source of truth.

Detailed implementation spec: See Workspace Open Page – Implementation Spec for the full structure (header chips, tabs, toolbar, group topper, KB cards) aligned with the current implementation.

Breadcrumbs are rendered by the account shell only. The shell shows three levels on this route: Account > Workspaces > [Workspace name]. The workspace open page must not render its own breadcrumb; the page content starts with the workspace header (avatar, name, chips).

  • Shell: Standard account shell layout (see App Shell (Navigation, Search, Assistant Sidebar)). Breadcrumb in the shell: Account > Workspaces > [Workspace name].
  • Page header: Workspace avatar (or photo_camera placeholder), workspace name, and a bordered block that includes a description control (notes icon button; opens a description popover) plus the apps status chip: No app (or app status when activated).
  • Tabs: Knowledge Bases (active by default, includes live KB count in label) | Agents (live total agents count) | Channels (live workspace channel connections count) | Users (live workspace users count) | Activity log.
  • For workspace tab toolbars (Knowledge Bases, Agents, Channels, Users, Activity log), the controls live in the same visual top section below the tabs with no divider between header, tabs, and toolbar. There should be only one divider below the toolbar/content handoff.
  • Activity log tab: Includes date-range chips (24h, 7d, 30d), User filter, Event type filter, a summary badge row (Total events, Unique actors, KB changes, Channel changes, Access changes), an Activity feed list, and an Activity by user side panel.
  • Toolbar (Knowledge Bases tab): Left — “All groups” control + filter icon. Right — sort icon, view switcher (grid/list/node), Add knowledge base primary button. This toolbar is merged into the page’s top section rather than rendered as a separate bordered row.
  • Content: Group topper as shadcn Badge (e.g. “Default group”) with a three-dots menu on hover (same as Workspaces page: Rename, Add group, Delete) + grid of KB cards. KB cards use the shared KnowledgeBaseCard component (see Component: Knowledge Base Card) — the same component rendered on the Knowledge Bases page. Each card receives channel enrichment via enrichKnowledgeBasesWithChannels(kbs, connections) (connections from useChannels(); pass [] while loading so counts show 0 until ready). The full overflow menu is present: Edit (navigates to /account/knowledge-bases/[id]), Set as default (disabled when already default), Duplicate, and Delete (disabled when kbs.length <= 1). isDefaultKb is workspace.defaultKbId === kb.id. canDelete is kbs.length > 1.
  • Node view (Knowledge Bases tab): The view switcher includes a third Node view mode. Selecting it opens a full-screen bottom sheet that auto-fits the graph on open. The full node view specification lives in Workspace – Node View. Summary of current implementation:
    • All five section nodes (Knowledge Bases, Agents, Users, Channels, Apps) are shown by default — all open on first load.
    • Clicking a workspace section row toggles the corresponding collection node and its edge.
    • KB detail nodes are toggled individually from the KB collection node.
    • Channel detail nodes (per channel type) are toggled from the channels collection node. Channel types with zero connections are not shown.
    • Dashed animated edges: agent rows connect to their KB nodes (emerald, #34d399); channel connection rows connect to their KB nodes (light blue, #7dd3fc). Both animate right-to-left.
    • Edge hover: hovering an edge highlights it and dims all others.
  • Sheet header: “KB connections” toggle Switch. Workspace switching in node view is handled from the workspace node header selector. The toggle shows/hides all dashed KB-connection edges.
    • Layout persistence: node positions, open/closed sections, expanded KBs, and expanded channel types are persisted server-side per user per workspace via POST /api/user-data.
    • The workspace node shows labeled real workspace metrics: Knowledge bases, Agents, Users, Channels, Apps.
    • Each KB detail node shows Objectives: <num> and Documents: <num>, and links to the KB detail page.
  • Channels tab: Workspace-scoped operational view of channel connections. It reuses channels feature logic and actions (Add channel, Edit, Delete, active/listening/comment type controls), but limits data to the current workspace context. For agent-managed channel families (FB Messenger, Web chat, WhatsApp, SMS), the KB column is read-only and shows the KB inherited from the assigned agent. For Social comments and Review platforms, the KB column is an editable inline selector. See Account – Channels → “Channel ownership model: Agent → KB → Channel”.
  • Agents tab: Workspace-scoped full agent management surface. See Workspace – Agents Tab for the full specification. Current implementation includes: status filter (All / Active / Inactive), “Add agent” CTA, summary badges (Total agents, Active agents), agents table with inline KB select, active toggle switch, channels hover card, default-agent marker/badge, and row actions including Set as default and Delete guardrails. The agent edit modal is now General-only. The agent’s KB is the effective KB for all agent-managed channel connections assigned to that agent — changing it here propagates to the channel table’s KB column for those connections.

Global routes remain cross-workspace hubs:

  • /account/channels for all connections across workspaces
  • /account/agents for global agents management
  • Client-side only: Workspace data can be resolved from the list page state (e.g. passed via router state or re-fetched by workspaceId). No API integration required for MVP.
  • KB cards: Rendered using the shared KnowledgeBaseCard component with live enrichment from useChannels(). No local card component; the workspace open page imports KnowledgeBaseCard from @/app/account/knowledge-bases/_components/knowledge-base-card.
  • Not found: If workspaceId does not match any workspace, show a simple “Workspace not found” state and a link back to /account/workspaces.
  • Back navigation: User can return to the Workspaces list via breadcrumbs (e.g. “Workspaces”) or browser back.
  • Workspaces list doc: Account – Workspaces.
  • Card click behaviour is specified in this doc (open workspace) and should be reflected in the list doc (card is clickable; menu and drag do not navigate).
  • GET /workspaces/:id for workspace detail when moving off client-only mock.