{
  "antiPatterns": [
    "Putting interactive elements inside item icons.",
    "Using the capped visual count as the accessible name."
  ],
  "api": {
    "importPath": "@ancrel/workspace",
    "props": [
      {
        "name": "aria-label",
        "required": true,
        "type": "string"
      },
      {
        "name": "footer",
        "required": false,
        "type": "ReactNode"
      },
      {
        "name": "formatBadgeLabel",
        "required": false,
        "type": "((item: ActivityRailItem) => string) | undefined"
      },
      {
        "name": "items",
        "required": true,
        "type": "readonly ActivityRailItem[]"
      },
      {
        "name": "key",
        "required": false,
        "type": "React.Key | null | undefined"
      },
      {
        "name": "onSelect",
        "required": false,
        "type": "((id: string, event: React.MouseEvent | React.KeyboardEvent) => void) | undefined"
      },
      {
        "name": "ref",
        "required": false,
        "type": "React.Ref<HTMLElement> | undefined"
      },
      {
        "name": "renderLink",
        "required": false,
        "type": "((props: { href: string; className: string; children: React.ReactNode; \"aria-current\"?: \"page\"; tabIndex: number; onKeyDown: React.KeyboardEventHandler; }) => React.ReactElement) | undefined"
      },
      {
        "name": "selectedId",
        "required": false,
        "type": "string | null"
      },
      {
        "name": "showLabels",
        "required": false,
        "type": "boolean"
      }
    ],
    "symbol": "ActivityRail",
    "typeRef": "api/workspace/rail/index.d.ts"
  },
  "constraints": [
    "Provide a navigation label and a stable unique id for each item.",
    "Forward every renderLink prop to the focusable link."
  ],
  "docs": "raw/frontend/activity-rail.md",
  "examples": [
    {
      "code": "import { useState } from 'react'\nimport '@ancrel/tokens/css'\nimport '@ancrel/workspace/styles.css'\nimport { ActivityRail } from '@ancrel/workspace'\n\nexport default function App() {\n  const [page, setPage] = useState('overview')\n  return <ActivityRail aria-label=\"Project pages\" selectedId={page} onSelect={setPage}\n    items={[\n      { id: 'overview', label: 'Overview', icon: '▦' },\n      { id: 'updates', label: 'Updates', icon: '◷', badge: 121 },\n      { id: 'saved', label: 'Saved', icon: '☆', badge: 'dot' },\n    ]} />\n}\n",
      "command": "pnpm test",
      "entry": "examples/fe.activity-rail/App.tsx",
      "fixture": "examples/fe.activity-rail/",
      "id": "minimal"
    }
  ],
  "id": "fe.activity-rail",
  "kind": "react-component",
  "language": "typescript",
  "layer": "frontend",
  "owner": "frontend-infra",
  "package": {
    "ecosystem": "npm",
    "name": "@ancrel/workspace",
    "version": "0.2.0"
  },
  "provenance": {
    "changes": "Extracted the item list, badges and footer layout from lines 22–138. Removed NavSection, task counts, chat questions, theme toggle, Tailwind and Lucide in favor of caller-supplied items, icons and footer. Changed 10px labels to the 11px sys.type.meta token. Selection uses aria-current=\"page\" and sys.action.selected. Added roving tabindex, arrow/Home/End navigation, Enter/Space activation and disabled-item skipping for buttons and links.",
    "commit": "4cc384c3bdbd09a3a50268adf81ba23f53aac93e",
    "mode": "extracted",
    "origin": "rule-studio",
    "path": "frontend/src/components/ActivityRail.tsx",
    "rights": "org-internal; approved-by=owner; ref=item-15"
  },
  "schemaVersion": 1,
  "stability": "experimental",
  "summary": "Vertical page navigation with roving focus, optional badges and router links.",
  "tokenDependencies": [
    "comp.rail.width",
    "ref.color.x111115",
    "ref.color.x202025",
    "ref.color.x27262e",
    "ref.color.x37303f",
    "ref.color.x393021",
    "ref.color.x393941",
    "ref.color.x684a84",
    "ref.color.x6b6b75",
    "ref.color.x765400",
    "ref.color.x9a9aa5",
    "ref.color.xc0c0c9",
    "ref.color.xcdb2ea",
    "ref.color.xe9e2f0",
    "ref.color.xedc678",
    "ref.color.xededef",
    "ref.color.xf0f0f3",
    "ref.color.xf1eef4",
    "ref.color.xfaf1d9",
    "ref.leading.x1p35",
    "ref.space.px11",
    "ref.space.px12",
    "ref.space.px2",
    "ref.space.px32",
    "ref.space.px4",
    "ref.space.px40",
    "ref.space.px6",
    "ref.space.px70",
    "ref.space.px8",
    "ref.space.px9999",
    "ref.weight.w500",
    "sys.action.focus",
    "sys.action.hover",
    "sys.action.selected",
    "sys.ink.disabled",
    "sys.ink.primary",
    "sys.ink.secondary",
    "sys.internal.railWidth",
    "sys.radius.md",
    "sys.radius.pill",
    "sys.size.hitTarget",
    "sys.space.gap",
    "sys.space.hair",
    "sys.space.snug",
    "sys.space.tight",
    "sys.status.warning.bg",
    "sys.status.warning.fg",
    "sys.surface.chrome",
    "sys.type.meta.lineHeight",
    "sys.type.meta.size",
    "sys.type.meta.weight"
  ]
}
