{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "block-agent-sessions",
  "type": "registry:block",
  "title": "Agent sessions",
  "description": "Every Code session in one list to work through: a search and a filter by state, the sessions under their repositories with the state, branch, pull request and its checks, the last step and the run time, the ones that need you first and answered from the row, and Stop and Archive for a selection.",
  "dependencies": [
    "@remixicon/react@^4.9.0"
  ],
  "registryDependencies": [
    "https://wideset.co/r/action-bar.json",
    "https://wideset.co/r/app-shell.json",
    "https://wideset.co/r/avatar.json",
    "https://wideset.co/r/block-styles.json",
    "https://wideset.co/r/breadcrumbs.json",
    "https://wideset.co/r/button.json",
    "https://wideset.co/r/card.json",
    "https://wideset.co/r/checkbox.json",
    "https://wideset.co/r/dropdown-menu.json",
    "https://wideset.co/r/filter-button.json",
    "https://wideset.co/r/icon-button.json",
    "https://wideset.co/r/list-item.json",
    "https://wideset.co/r/segmented-control.json",
    "https://wideset.co/r/sidebar.json",
    "https://wideset.co/r/status-badge.json",
    "https://wideset.co/r/table.json",
    "https://wideset.co/r/text-input.json",
    "https://wideset.co/r/tooltip.json",
    "https://wideset.co/r/utils.json"
  ],
  "files": [
    {
      "path": "src/blocks/agent-sessions/brand-mark.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/agent-sessions/brand-mark.tsx",
      "content": "'use client';\n\nimport { cn } from '@/lib/wideset/utils';\n\nconst TILE =\n  'M0 16C0 8.45753 0 4.68629 2.34315 2.34315C4.68629 0 8.45753 0 16 0C23.5425 0 27.3137 0 29.6569 2.34315C32 4.68629 32 8.45753 32 16C32 23.5425 32 27.3137 29.6569 29.6569C27.3137 32 23.5425 32 16 32C8.45753 32 4.68629 32 2.34315 29.6569C0 27.3137 0 23.5425 0 16Z';\n\n/**\n * Tandem's mark: two strokes leaning the same way, one a step behind the other, on the inverse\n * tile, so it inverts in dark mode. It takes the size of its place (36px in the sidebar).\n * Decorative beside the product's name; give it a `label` when it stands alone.\n */\nexport function BrandMark({ className, label }: { className?: string; label?: string }) {\n  return (\n    <svg\n      viewBox=\"0 0 32 32\"\n      role={label ? 'img' : undefined}\n      aria-label={label}\n      aria-hidden={label ? undefined : true}\n      className={cn('size-ws-14 shrink-0', className)}\n    >\n      <path d={TILE} className=\"fill-(--ws-static-fill-inverse-background)\" />\n      <g transform=\"rotate(24 16 16)\" className=\"fill-(--ws-static-text-inverse-strong)\">\n        <rect x=\"10.25\" y=\"7\" width=\"4.5\" height=\"14\" rx=\"2.25\" />\n        <rect x=\"17.25\" y=\"11\" width=\"4.5\" height=\"14\" rx=\"2.25\" />\n      </g>\n    </svg>\n  );\n}\n"
    },
    {
      "path": "src/blocks/agent-sessions/canon.ts",
      "type": "registry:file",
      "target": "blocks/wideset/agent-sessions/canon.ts",
      "content": "import {\n  type RemixiconComponentType,\n  RiBarChartBoxLine,\n  RiBugLine,\n  RiGitPullRequestLine,\n  RiListCheck3,\n  RiQuillPenLine,\n  RiSearchEyeLine,\n} from '@remixicon/react';\n\nimport type { AgentTurn, Context, Mode, Model, Thread, ThreadGroup, Turn } from './model';\n\n/*\n  The canon: the one world every agent block shows. Tandem, an agent workspace with two modes, at\n  Lumen Studio, which makes meeting-room hardware (Lumen Display, Lumen Hub) and the booking app\n  `lumen-app`. Ines Navarro, a product engineer, is signed in. The sidebar lists the same chats\n  and sessions in every block, with the same names and states; each carries a short transcript,\n  enough to open it. A block puts its own thread in with `withThread` (its full turns, and the\n  mark its screen implies) and keeps everything else as it is here.\n*/\n\nexport const product = 'Tandem';\nexport const workspace = 'Lumen Studio';\nexport const account = { name: 'Ines Navarro', email: 'ines@lumenstudio.co', initials: 'IN' };\n\nexport const models: Model[] = [\n  { id: 'pro', name: 'Tandem Pro', note: 'Everyday work' },\n  { id: 'fast', name: 'Tandem Fast', note: 'Quick answers, lighter reasoning' },\n  { id: 'max', name: 'Tandem Max', note: 'Long, hard problems' },\n];\n\nexport const efforts = ['Low', 'Medium', 'High'];\n\n/** How much Tandem may do in a repository without asking (Code). */\nexport const permissions = ['Ask before edits', 'Accept edits', 'Plan'];\n\nexport const repositories = ['lumen-app', 'lumen-web', 'billing-service'];\nexport const branches = ['main', 'feature/bookings-csv-export', 'release/4.2'];\n\n/** A way to start a new thread: the chip, and the words it puts in the composer. */\nexport type Starter = { label: string; icon: RemixiconComponentType; prompt: string };\n\nexport const starters: Record<Mode, Starter[]> = {\n  chat: [\n    { label: 'Draft a document', icon: RiQuillPenLine, prompt: 'Draft a one-page brief on ' },\n    { label: 'Research a question', icon: RiSearchEyeLine, prompt: 'Research how ' },\n    {\n      label: 'Analyze a file',\n      icon: RiBarChartBoxLine,\n      prompt: 'Look at the attached file and tell me ',\n    },\n    { label: 'Plan a project', icon: RiListCheck3, prompt: 'Plan the work for ' },\n  ],\n  code: [\n    {\n      label: 'Fix a failing test',\n      icon: RiBugLine,\n      prompt: 'Find out why this test fails and fix it: ',\n    },\n    { label: 'Review a pull request', icon: RiGitPullRequestLine, prompt: 'Review pull request #' },\n    { label: 'Plan a change', icon: RiListCheck3, prompt: 'Plan how to ' },\n  ],\n};\n/** Files in the workspace, by name: what Add files puts on the composer's tray, one after another. */\nexport const files = ['hub-2-positioning.md', 'price-list-2026.csv', 'bookings-export.spec.ts'];\n\n/** A session's context before much has happened: 58K of 200K tokens, 29%, and what it is made of. */\nexport const context: Context = {\n  used: 58_000,\n  limit: 200_000,\n  parts: [\n    { label: 'Files read', tokens: 24_000 },\n    { label: 'Conversation', tokens: 21_000 },\n    { label: 'Command output', tokens: 13_000 },\n  ],\n};\n\n/* The other threads: a question and a short answer each, enough to open them. */\n\nconst brief = (id: string, prompt: string, ...paragraphs: string[]): Turn[] => [\n  { id: `${id}-1`, role: 'user', text: prompt },\n  {\n    id: `${id}-2`,\n    role: 'agent',\n    blocks: [\n      {\n        kind: 'text',\n        id: `${id}-answer`,\n        prose: paragraphs.map((text) => ({ kind: 'paragraph', text })),\n      },\n    ],\n  },\n];\n\n/** A chat that waits for Ines: the agent wants a file from outside the project. */\nconst launchTimeline: Turn[] = [\n  { id: 'timeline-1', role: 'user', text: 'Plan launch day, November 17, hour by hour.' },\n  {\n    id: 'timeline-2',\n    role: 'agent',\n    blocks: [\n      {\n        kind: 'reasoning',\n        id: 'timeline-2-thought',\n        seconds: 7,\n        text: 'Launch day has fixed points: the store opens at 09:00 Pacific and the announcement goes out with it. Marketing schedules the newsletter and the social posts; their calendar is outside this project, so I have to ask before I read it.',\n      },\n      {\n        kind: 'step',\n        id: 'read-calendar',\n        label: 'Read `Marketing/campaign-calendar.xlsx`',\n        active: 'Reading `Marketing/campaign-calendar.xlsx`',\n        result: '14 entries',\n        status: 'waiting',\n        approval: {\n          title: 'Read a file outside this project',\n          command: 'Marketing/campaign-calendar.xlsx',\n          reason:\n            'The campaign calendar has the newsletter and social slots for November 17. Tandem reads it and changes nothing.',\n          scope: 'this project',\n        },\n      },\n      {\n        kind: 'text',\n        id: 'timeline-2-answer',\n        prose: [\n          {\n            kind: 'paragraph',\n            text: 'Here is the day, in Pacific time. The newsletter and the social posts keep the slots Marketing gave them.',\n          },\n          {\n            kind: 'list',\n            items: [\n              '**07:00** Last check of the store page and the trade-in form.',\n              '**09:00** The store opens; the announcement and the newsletter go out.',\n              '**10:30** Social posts, then replies through the day.',\n              '**16:00** First numbers to the team: orders, trade-ins, support tickets.',\n            ],\n          },\n        ],\n      },\n    ],\n  },\n];\n\n/** The research chat, still running when it is opened. */\nconst hardwarePricing: Turn[] = [\n  {\n    id: 'pricing-1',\n    role: 'user',\n    text: 'How do Roomline, Meetwise and Deskhaven price their meeting-room hardware?',\n  },\n  {\n    id: 'pricing-2',\n    role: 'agent',\n    blocks: [\n      {\n        kind: 'reasoning',\n        id: 'pricing-2-thought',\n        seconds: 6,\n        text: 'Three vendors, and what matters is the model: hardware sold once, a subscription, or both. Their pricing pages will say. I will search first, then read each vendor’s own page rather than a comparison site.',\n      },\n      {\n        kind: 'step',\n        id: 'search-web',\n        label: 'Searched the web',\n        active: 'Searching the web',\n        result: '4 results',\n        status: 'done',\n        detail: {\n          kind: 'results',\n          items: [\n            { title: 'Roomline pricing: hubs, panels and plans', source: 'roomline.example' },\n            { title: 'Meetwise Room Kit: plans and pricing', source: 'meetwise.example' },\n            { title: 'Deskhaven hardware store', source: 'deskhaven.example' },\n            { title: 'Meeting room hardware compared, 2026', source: 'workplaceweekly.example' },\n          ],\n        },\n      },\n      {\n        kind: 'steps',\n        id: 'pricing-2-pages',\n        label: 'Read 3 pages',\n        steps: [\n          {\n            id: 'read-roomline',\n            label: 'Read `roomline.example/pricing`',\n            active: 'Reading `roomline.example/pricing`',\n            status: 'done',\n          },\n          {\n            id: 'read-meetwise',\n            label: 'Read `meetwise.example/room-kit`',\n            active: 'Reading `meetwise.example/room-kit`',\n            status: 'done',\n          },\n          {\n            id: 'read-deskhaven',\n            label: 'Read `deskhaven.example/store`',\n            active: 'Reading `deskhaven.example/store`',\n            status: 'done',\n          },\n        ],\n      },\n      {\n        kind: 'text',\n        id: 'pricing-2-answer',\n        prose: [\n          {\n            kind: 'paragraph',\n            text: 'All three sell the hub outright and charge for software on top, so the fair comparison is the hardware plus the first year.',\n          },\n          {\n            kind: 'list',\n            items: [\n              '**Roomline:** $429 a hub, then $12 a room a month.',\n              '**Meetwise:** $299 a hub, sold only with the $19 a room a month plan.',\n              '**Deskhaven:** $379 a hub, software included for the first year.',\n            ],\n          },\n          {\n            kind: 'paragraph',\n            text: 'At $349 with no subscription, Hub 2 costs the least over a year in every case.',\n          },\n        ],\n      },\n    ],\n  },\n];\n\n/** A chat whose last turn failed on a file it could not open. */\nconst educationDiscount: Turn[] = [\n  {\n    id: 'education-1',\n    role: 'user',\n    text: 'Turn last year’s education discount into a one-page memo for Hub 2.',\n  },\n  {\n    id: 'education-2',\n    role: 'agent',\n    blocks: [\n      {\n        kind: 'step',\n        id: 'read-memo',\n        label: 'Read `education-discount-2025.docx`',\n        result: 'File is locked',\n        status: 'failed',\n        detail: {\n          kind: 'output',\n          lines: [\n            'Pricing/education-discount-2025.docx',\n            'Locked for editing by Elena Silva since 9:12 AM',\n          ],\n          errors: [1],\n        },\n      },\n      {\n        kind: 'text',\n        id: 'education-2-answer',\n        prose: [\n          {\n            kind: 'paragraph',\n            text: 'I could not open last year’s memo: Elena Silva has it open for editing. Ask her to close it and press Retry, or attach a copy here.',\n          },\n        ],\n      },\n    ],\n  },\n];\n\n/** The subagent working on the failing E2E test of pull request #482 (Code). */\nconst e2eFix: Turn[] = [\n  {\n    id: 'e2e-1',\n    role: 'user',\n    text: 'Find out why “bookings export › downloads the file” times out in CI, and fix it.',\n  },\n  {\n    id: 'e2e-2',\n    role: 'agent',\n    blocks: [\n      {\n        kind: 'reasoning',\n        id: 'e2e-2-thought',\n        seconds: 5,\n        text: 'The test passes on my machine and times out in CI, so it is waiting for something the CI browser never does. The export opens a blob URL; a headless browser may not raise a download for that.',\n      },\n      {\n        kind: 'step',\n        id: 'read-spec',\n        label: 'Read `e2e/bookings-export.spec.ts`',\n        active: 'Reading `e2e/bookings-export.spec.ts`',\n        result: '42 lines',\n        status: 'done',\n      },\n      {\n        kind: 'step',\n        id: 'run-e2e',\n        label: 'Ran `pnpm test:e2e bookings`',\n        active: 'Running `pnpm test:e2e bookings`',\n        result: '2 passed, 1 failed',\n        status: 'failed',\n        ms: 3200,\n        detail: {\n          kind: 'output',\n          lines: [\n            '$ pnpm test:e2e bookings',\n            '  ✓ bookings › lists the day',\n            '  ✓ bookings › filters by room',\n            '  ✗ bookings export › downloads the file (30.0s)',\n            '    Timeout 30000ms exceeded while waiting for event \"download\"',\n            '      at e2e/bookings-export.spec.ts:15:27',\n            '  3 tests, 1 failed',\n          ],\n          errors: [3, 4, 5],\n        },\n      },\n      {\n        kind: 'text',\n        id: 'e2e-2-answer',\n        prose: [\n          {\n            kind: 'paragraph',\n            text: 'The test waits for a `download` event that never comes: the export opens a blob URL in a new tab instead of using a download link. Next I will change `export-csv.ts` to a link with the `download` attribute and run the test again.',\n          },\n        ],\n      },\n    ],\n  },\n];\n\n/** A session that waits for Ines before it runs a command (Code). */\nconst vatRounding: Turn[] = [\n  {\n    id: 'vat-1',\n    role: 'user',\n    text: 'Invoice totals are off by a cent when VAT is 23%. Find it and fix it.',\n  },\n  {\n    id: 'vat-2',\n    role: 'agent',\n    blocks: [\n      {\n        kind: 'reasoning',\n        id: 'vat-2-thought',\n        seconds: 4,\n        text: 'A cent off at 23% points at rounding each line and then adding them up, instead of rounding the total. Before I change the query I want to see how many stored invoices would move.',\n      },\n      {\n        kind: 'step',\n        id: 'dry-run',\n        label: 'Ran `pnpm db:migrate --dry-run`',\n        pending: 'Run `pnpm db:migrate --dry-run`',\n        active: 'Running `pnpm db:migrate --dry-run`',\n        result: '212 rows would change',\n        status: 'waiting',\n        approval: {\n          title: 'Run a command',\n          command: 'pnpm db:migrate --dry-run',\n          reason:\n            'A dry run lists the invoices whose total would change. It reads the database and writes nothing.',\n          scope: 'this repository',\n        },\n      },\n      {\n        kind: 'text',\n        id: 'vat-2-answer',\n        prose: [\n          {\n            kind: 'paragraph',\n            text: 'The dry run shows 212 invoices off by one cent, all with three or more lines at 23%. I will round the total once in `invoice-totals.ts` and add a test with the smallest case.',\n          },\n        ],\n      },\n    ],\n  },\n];\n\n/** A session that waits for Ines with a question: the fix can go two ways (Code). */\nconst flakySync: Turn[] = [\n  {\n    id: 'sync-1',\n    role: 'user',\n    text: 'The calendar sync test fails about one run in ten. Find out why and fix it.',\n  },\n  {\n    id: 'sync-2',\n    role: 'agent',\n    blocks: [\n      {\n        kind: 'step',\n        id: 'run-sync',\n        label: 'Ran `pnpm test calendar-sync` 20 times',\n        active: 'Running `pnpm test calendar-sync` 20 times',\n        result: '2 of 20 failed',\n        status: 'done',\n      },\n      {\n        kind: 'text',\n        id: 'sync-2-finding',\n        prose: [\n          {\n            kind: 'paragraph',\n            text: 'Found it: the test books a room “in one hour” and fails when the run crosses midnight UTC. Freezing the clock fixes it, and there are two places to do that.',\n          },\n        ],\n      },\n      {\n        kind: 'question',\n        id: 'sync-2-question',\n        title: 'Freeze the clock in this test only, or in the setup for every test?',\n        options: [\n          {\n            value: 'one',\n            label: 'This test only',\n            description: 'One line in the test file. Other tests keep the real clock.',\n          },\n          {\n            value: 'all',\n            label: 'Every test',\n            description: 'In the test setup. No test depends on the hour it runs at again.',\n          },\n        ],\n      },\n    ],\n  },\n];\n\n/** What Tandem does once a question is answered, whichever way. */\nconst decided = (id: string): AgentTurn => ({\n  id,\n  role: 'agent',\n  blocks: [\n    {\n      kind: 'step',\n      id: `${id}-edit`,\n      label: 'Edited 1 file',\n      active: 'Editing 1 file',\n      result: '+3 −1',\n      status: 'done',\n    },\n    {\n      kind: 'text',\n      id: `${id}-answer`,\n      prose: [\n        {\n          kind: 'paragraph',\n          text: 'Done, the way you chose. The clock is frozen, and the test passed 20 runs out of 20.',\n        },\n      ],\n    },\n  ],\n});\n\nexport const chatGroups: ThreadGroup[] = [\n  {\n    id: 'hub-2-launch',\n    label: 'Hub 2 launch',\n    threads: [\n      {\n        id: 'launch-announcement',\n        title: 'Launch announcement',\n        turns: brief(\n          'launch',\n          'Draft the launch announcement for Lumen Hub 2.',\n          'The announcement is written, in two versions. The second is a third shorter and opens with the price: $349, out on November 17.',\n        ),\n      },\n      {\n        id: 'partner-version',\n        title: 'Partner version',\n        child: true,\n        state: 'unread',\n        turns: brief(\n          'partner',\n          'Fork this for resellers: the same facts, but the trade-in terms first.',\n          'Done, as its own document. It opens with the $100 trade-in credit and the January 31 deadline, then the three changes.',\n        ),\n      },\n      {\n        id: 'press-kit',\n        title: 'Press kit checklist',\n        turns: brief(\n          'press',\n          'What does the press kit still need before November 17?',\n          'Four things are open: product photos on white, the spec sheet as a PDF, two customer quotes and the founder bio. The photos take longest; the studio delivers on November 12.',\n        ),\n      },\n      {\n        id: 'launch-timeline',\n        title: 'Launch day timeline',\n        state: 'needs-you',\n        turns: launchTimeline,\n      },\n    ],\n  },\n  {\n    id: 'customer-research',\n    label: 'Customer research',\n    threads: [\n      {\n        id: 'hardware-pricing',\n        title: 'Room booking hardware pricing',\n        state: 'working',\n        turns: hardwarePricing,\n      },\n      {\n        id: 'interview-themes',\n        title: 'Interview themes, October',\n        turns: brief(\n          'interviews',\n          'What came up most in the October customer interviews?',\n          'Three themes, in this order: setup time (9 of 12 calls), rooms left booked but empty (7), and updates that interrupt meetings (5).',\n        ),\n      },\n    ],\n  },\n  {\n    id: 'pricing',\n    label: 'Pricing',\n    threads: [\n      {\n        id: 'price-tiers',\n        title: 'Hub 2 price tiers',\n        turns: brief(\n          'tiers',\n          'Sketch three price tiers for Hub 2 by number of rooms.',\n          'A simple ladder holds up: $349 a hub up to 20 rooms, $329 from 21 to 100, and $309 above that, each with the same trade-in credit.',\n        ),\n      },\n      {\n        id: 'education-discount',\n        title: 'Education discount memo',\n        state: 'failed',\n        turns: educationDiscount,\n      },\n    ],\n  },\n  {\n    id: 'recents',\n    label: 'Recents',\n    fixed: true,\n    threads: [\n      {\n        id: 'onboarding-email',\n        title: 'Rewrite the onboarding email',\n        turns: brief(\n          'onboarding',\n          'Make the onboarding email half as long.',\n          'It is down from 240 words to 110. The three setup steps stay; the company story and the second call to action are gone.',\n        ),\n      },\n      {\n        id: 'support-tickets',\n        title: 'Support tickets in Q3',\n        turns: brief(\n          'tickets',\n          'What were the top reasons for support tickets in Q3?',\n          'Pairing the camera led with 31% of tickets, then calendar sync at 22% and firmware updates at 14%.',\n        ),\n      },\n      {\n        id: 'release-notes',\n        title: 'Release notes for app 4.2',\n        turns: brief(\n          'notes',\n          'Write the release notes for Lumen app 4.2 from the changelog.',\n          'Done: five lines for customers, led by the new room filter, with the fixes grouped under one heading.',\n        ),\n      },\n    ],\n  },\n];\n\nexport const codeGroups: ThreadGroup[] = [\n  {\n    id: 'lumen-app',\n    label: 'lumen-app',\n    threads: [\n      {\n        id: 'csv-export',\n        title: 'CSV export for bookings',\n        pullRequest: { number: 482, comments: 2 },\n        turns: brief(\n          'csv',\n          'Add a CSV export to the bookings table.',\n          'The export is on `feature/bookings-csv-export` as draft pull request #482: five files, +148 −7. The unit tests pass, 14 of 14.',\n          'Two things are open: the E2E test “bookings export › downloads the file” times out, and Tom Becker left two comments.',\n        ),\n      },\n      {\n        id: 'e2e-fix',\n        title: 'Debug the E2E timeout',\n        child: true,\n        state: 'working',\n        turns: e2eFix,\n      },\n      {\n        id: 'room-filter',\n        title: 'Room filter on bookings',\n        turns: brief(\n          'filter',\n          'Add a filter by room to the bookings page.',\n          'Merged as #476. The filter sits in `bookings-toolbar.tsx` and keeps its value in the URL.',\n        ),\n      },\n    ],\n  },\n  {\n    id: 'lumen-web',\n    label: 'lumen-web',\n    threads: [\n      {\n        id: 'pricing-page',\n        title: 'Pricing page for Hub 2',\n        state: 'unread',\n        turns: brief(\n          'page',\n          'Add Hub 2 to the pricing page, with the trade-in note.',\n          'The page shows Hub 2 at $349 with the trade-in line under it. It is on `feature/hub-2-pricing`, ready for a look.',\n        ),\n      },\n      {\n        id: 'next-upgrade',\n        title: 'Upgrade to Next.js 16',\n        state: 'failed',\n        turns: brief(\n          'upgrade',\n          'Upgrade lumen-web to Next.js 16.',\n          'The upgrade stopped at the build: `next-image-export` does not support Next.js 16 yet. Nothing was committed. Pin it and try again, or wait for its next release.',\n        ),\n      },\n    ],\n  },\n  {\n    id: 'billing-service',\n    label: 'billing-service',\n    threads: [\n      {\n        id: 'vat-rounding',\n        title: 'Invoice rounding for VAT',\n        state: 'needs-you',\n        turns: vatRounding,\n      },\n    ],\n  },\n  {\n    id: 'recents',\n    label: 'Recents',\n    fixed: true,\n    threads: [\n      { id: 'flaky-sync', title: 'Flaky calendar sync test', state: 'needs-you', turns: flakySync },\n      {\n        id: 'rename-room',\n        title: 'Rename Room to Space',\n        state: 'paused',\n        turns: brief(\n          'rename',\n          'Rename Room to Space across lumen-app.',\n          'Paused at the usage limit, 31 of 86 files in. The components and their tests are renamed; the database column and the public API are next, and they need your word before I touch them. I go on at 4:00 PM.',\n        ),\n      },\n    ],\n  },\n];\n\n/** The mode's groups with one thread changed: a block's own thread, in its place in the canon. */\nexport const withThread = (\n  groups: ThreadGroup[],\n  id: string,\n  change: (thread: Thread) => Thread,\n): ThreadGroup[] =>\n  groups.map((group) => ({\n    ...group,\n    threads: group.threads.map((thread) => (thread.id === id ? change(thread) : thread)),\n  }));\n\nconst QUESTIONS = [flakySync].flatMap((turns) =>\n  turns.flatMap((turn) =>\n    turn.role === 'agent'\n      ? turn.blocks.flatMap((block) => (block.kind === 'question' ? block.options : []))\n      : [],\n  ),\n);\n\n/**\n * What Tandem does about a message this sample has no turn for: it goes on when the message\n * answers one of its questions, and otherwise asks for more to go on.\n */\nexport const fallback = (id: string, text = ''): AgentTurn =>\n  QUESTIONS.some((option) => option.label === text)\n    ? decided(id)\n    : {\n        id,\n        role: 'agent',\n        blocks: [\n          {\n            kind: 'reasoning',\n            id: `${id}-thought`,\n            seconds: 2,\n            text: 'The message is short, and nothing here says which files or sources to use. Asking is quicker than guessing.',\n          },\n          {\n            kind: 'text',\n            id: `${id}-answer`,\n            prose: [\n              {\n                kind: 'paragraph',\n                text: 'I do not have enough to act on that yet. Tell me which files or sources to use and what the result should be, and I will start.',\n              },\n            ],\n          },\n        ],\n      };\n"
    },
    {
      "path": "src/blocks/agent-sessions/checks-mark.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/agent-sessions/checks-mark.tsx",
      "content": "'use client';\n\n// TODO(custom): a pull request's checks summed in one mark (all passed, or some failed) with the count in a tooltip; Wideset has no check or status mark, and StatusBadge is a labelled badge.\nimport { RiCheckboxCircleFill, RiCloseCircleFill } from '@remixicon/react';\nimport { cn } from '@/lib/wideset/utils';\nimport { Tooltip } from '@/components/ui/wideset/tooltip/Tooltip';\n\nimport type { PullRequest } from './data';\n\n/**\n * How a pull request's checks stand, as one 16px mark beside its number: the positive check when\n * every one passed, the negative cross as soon as one failed. The shapes differ, so the mark reads\n * without its colour, and it says the count on hover and to a screen reader.\n */\nexport function ChecksMark({ checks }: { checks: PullRequest['checks'] }) {\n  const failed = checks.failed > 0;\n  const Icon = failed ? RiCloseCircleFill : RiCheckboxCircleFill;\n  const summary = failed\n    ? `${checks.failed} of ${checks.total} checks failed`\n    : `${checks.total} of ${checks.total} checks passed`;\n\n  return (\n    <Tooltip size=\"sm\">\n      <Tooltip.Trigger asChild>\n        <span role=\"img\" aria-label={summary} className=\"flex shrink-0\">\n          <Icon\n            aria-hidden=\"true\"\n            className={cn(\n              'size-ws-9',\n              failed ? 'text-ws-semantic-negative' : 'text-ws-semantic-positive',\n            )}\n          />\n        </span>\n      </Tooltip.Trigger>\n      <Tooltip.Content className=\"ws-block-utility\" side=\"top\">\n        <Tooltip.Label>{summary}</Tooltip.Label>\n      </Tooltip.Content>\n    </Tooltip>\n  );\n}\n"
    },
    {
      "path": "src/blocks/agent-sessions/data.ts",
      "type": "registry:file",
      "target": "blocks/wideset/agent-sessions/data.ts",
      "content": "import type { StatusBadgeProps } from '@/components/ui/wideset/status-badge/StatusBadge.types';\n\nimport { codeGroups as sessions, withThread } from './canon';\n\n/*\n  This block is the page that lists every Code session of the canon, so the sidebar has none\n  open. The sessions on the page are the sidebar's eight, with what the sidebar has no room for:\n  the branch, the pull request, the last thing each did and how long it has run. It is 11:24 AM\n  on November 10, 2026: \"CSV export for bookings\" is at work with its subagent, so here its row\n  in the sidebar says so too. Everything else is the canon's.\n*/\n\nexport const NOW = '2026-11-10T11:24:00';\n\n/** The canon's sessions, as they stand at this hour. */\nexport const codeGroups = withThread(sessions, 'csv-export', (thread) => ({\n  ...thread,\n  state: 'working',\n}));\n\n/* The page. */\n\nexport type SessionState = 'needs-you' | 'working' | 'paused' | 'failed' | 'done';\n\n/**\n * A state in the colour of its meaning: working is in progress, needs you and paused wait for\n * someone, failed is failed, done is done. Listed in the order the filter offers them.\n */\nexport const STATES: Record<\n  SessionState,\n  { label: string; color: NonNullable<StatusBadgeProps['color']> }\n> = {\n  'needs-you': { label: 'Needs you', color: 'notice' },\n  working: { label: 'Working', color: 'info' },\n  paused: { label: 'Paused', color: 'notice' },\n  failed: { label: 'Failed', color: 'negative' },\n  done: { label: 'Done', color: 'positive' },\n};\n\nexport const stateOptions = (Object.keys(STATES) as SessionState[]).map((value) => ({\n  value,\n  label: STATES[value].label,\n}));\n\n/**\n * What a session waits for. An approval names the command it wants to run; a question comes with\n * the answers the agent offered. Either is answered from the row.\n */\nexport type SessionRequest =\n  | { kind: 'approval'; command: string; reason: string }\n  | { kind: 'question'; text: string; options: string[] };\n\n/** A pull request with its checks summed up: how many ran and how many of them failed. */\nexport type PullRequest = {\n  number: number;\n  state: 'Draft' | 'Open' | 'Merged';\n  checks: { total: number; failed: number };\n};\n\nexport type CodeSession = {\n  id: string;\n  title: string;\n  state: SessionState;\n  /** A subagent of the session above it. */\n  child?: boolean;\n  branch: string;\n  pullRequest?: PullRequest;\n  /** The last thing it did; `code` in backticks. */\n  last: string;\n  lastAt: string;\n  /** How long the agent has worked in it, in minutes. */\n  minutes: number;\n  request?: SessionRequest;\n};\n\nexport type Repository = { id: string; name: string; sessions: CodeSession[] };\n\n/**\n * Every Code session, by repository, in the order to work through: a repository with a session\n * that needs you comes first, and in each one the sessions that need you lead. A subagent follows\n * its parent.\n */\nexport const repositories: Repository[] = [\n  {\n    id: 'billing-service',\n    name: 'billing-service',\n    sessions: [\n      {\n        id: 'vat-rounding',\n        title: 'Invoice rounding for VAT',\n        state: 'needs-you',\n        branch: 'fix/vat-rounding',\n        last: 'Asked to run `pnpm db:migrate --dry-run`',\n        lastAt: '2026-11-10T11:18:00',\n        minutes: 4,\n        request: {\n          kind: 'approval',\n          command: 'pnpm db:migrate --dry-run',\n          reason: 'A dry run lists the invoices whose total would change, and writes nothing.',\n        },\n      },\n    ],\n  },\n  {\n    id: 'lumen-app',\n    name: 'lumen-app',\n    sessions: [\n      {\n        id: 'flaky-sync',\n        title: 'Flaky calendar sync test',\n        state: 'needs-you',\n        branch: 'fix/calendar-sync-clock',\n        last: 'Found it: the test crosses midnight UTC',\n        lastAt: '2026-11-10T11:02:00',\n        minutes: 3,\n        request: {\n          kind: 'question',\n          text: 'Freeze the clock in this test only, or in the setup for every test?',\n          options: ['This test only', 'Every test'],\n        },\n      },\n      {\n        id: 'csv-export',\n        title: 'CSV export for bookings',\n        state: 'working',\n        branch: 'feature/bookings-csv-export',\n        pullRequest: { number: 482, state: 'Draft', checks: { total: 5, failed: 1 } },\n        last: 'Handed the failing E2E test to a subagent',\n        lastAt: '2026-11-10T11:21:00',\n        minutes: 47,\n      },\n      {\n        id: 'e2e-fix',\n        title: 'Debug the E2E timeout',\n        state: 'working',\n        child: true,\n        branch: 'feature/bookings-csv-export',\n        last: 'Ran `pnpm test:e2e bookings`: 1 failed',\n        lastAt: '2026-11-10T11:23:00',\n        minutes: 3,\n      },\n      {\n        id: 'rename-room',\n        title: 'Rename Room to Space',\n        state: 'paused',\n        branch: 'refactor/room-to-space',\n        last: 'Usage limit reached; resumes at 4:00 PM',\n        lastAt: '2026-11-10T10:09:00',\n        minutes: 72,\n      },\n      {\n        id: 'room-filter',\n        title: 'Room filter on bookings',\n        state: 'done',\n        branch: 'feature/bookings-room-filter',\n        pullRequest: { number: 476, state: 'Merged', checks: { total: 5, failed: 0 } },\n        last: 'Answered the last review comment',\n        lastAt: '2026-11-09T16:40:00',\n        minutes: 26,\n      },\n    ],\n  },\n  {\n    id: 'lumen-web',\n    name: 'lumen-web',\n    sessions: [\n      {\n        id: 'next-upgrade',\n        title: 'Upgrade to Next.js 16',\n        state: 'failed',\n        branch: 'chore/next-16',\n        last: 'Build failed on `next-image-export`',\n        lastAt: '2026-11-10T09:31:00',\n        minutes: 9,\n      },\n      {\n        id: 'pricing-page',\n        title: 'Pricing page for Hub 2',\n        state: 'done',\n        branch: 'feature/hub-2-pricing',\n        last: 'Added Hub 2 at $349 with the trade-in line',\n        lastAt: '2026-11-10T08:47:00',\n        minutes: 18,\n      },\n    ],\n  },\n];\n"
    },
    {
      "path": "src/blocks/agent-sessions/empty-state.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/agent-sessions/empty-state.tsx",
      "content": "'use client';\n\n// TODO(custom): empty state (title, line, action); no EmptyState in Wideset.\nimport { Button } from '@/components/ui/wideset/button/Button';\n\n/**\n * What the list shows when the filter and the search leave nothing: a title, a line that says\n * why, and the one action that brings the sessions back, centred.\n */\nexport function EmptyState({ onClearFilters }: { onClearFilters: () => void }) {\n  return (\n    <div className=\"gap-ws-9 py-ws-20 flex flex-col items-center text-center\">\n      <div className=\"gap-ws-3 flex flex-col\">\n        <p className=\"typography-label-strong-md text-ws-static-strong\">No sessions match</p>\n        <p className=\"typography-body-md text-ws-static-subtle\">\n          Try another name or branch, or clear the filter.\n        </p>\n      </div>\n      <Button variant=\"secondary\" preset=\"border\" size=\"sm\" onClick={onClearFilters}>\n        Clear filters\n      </Button>\n    </div>\n  );\n}\n"
    },
    {
      "path": "src/blocks/agent-sessions/index.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/agent-sessions/index.tsx",
      "content": "'use client';\n\nimport '@/styles/wideset-blocks.css';\n\nimport { AppShell } from '@/components/ui/wideset/app-shell/AppShell';\nimport { cn } from '@/lib/wideset/utils';\nimport { useId, useState } from 'react';\n\nimport { account, chatGroups, product, workspace } from './canon';\nimport { codeGroups, type CodeSession, NOW, repositories, type Repository } from './data';\nimport type { Mode } from './model';\nimport { PageHeader } from './page-header';\nimport { SelectionBar } from './selection-bar';\nimport { SessionsTable } from './sessions-table';\nimport { type FilterValues, SessionsToolbar } from './sessions-toolbar';\nimport { AgentSidebar } from './sidebar';\nimport { TopBar } from './top-bar';\n\n/** One column of the page: the header, the toolbar and the list share its edges. */\nconst COLUMN = 'px-ws-14 mx-auto w-full max-w-[80rem]';\nconst NO_FILTERS: FilterValues = { query: '', states: [] };\nconst GROUPS = { chat: chatGroups, code: codeGroups };\n\n/** Every session of every repository, changed one by one; a repository left empty goes. */\nconst mapSessions = (\n  all: Repository[],\n  change: (sessions: CodeSession[]) => CodeSession[],\n): Repository[] =>\n  all\n    .map((repository) => ({ ...repository, sessions: change(repository.sessions) }))\n    .filter((repository) => repository.sessions.length > 0);\n\n/**\n * The sessions that pass `keep`. A subagent goes with its parent when `withParent` says so (an\n * archived session takes its subagents along); one that stays while its parent goes is shown as\n * a session of its own, so it never reads as the child of the row above it.\n */\nconst keepSessions = (\n  sessions: CodeSession[],\n  keep: (session: CodeSession) => boolean,\n  withParent = false,\n) => {\n  let parentKept = true;\n  return sessions.flatMap((session) => {\n    if (!session.child) parentKept = keep(session);\n    if (!keep(session) || (withParent && !parentKept)) return [];\n    return [{ ...session, child: session.child && parentKept }];\n  });\n};\n\n/**\n * Agent sessions (Inset direction): every Code session in one place, in Tandem's shell with Code\n * mode on. The page in the card is a list to work through, not a dashboard: a title, a search and\n * a filter by state, then one card holding the sessions under their repositories. The sessions\n * that need you come first and are the tallest rows: each says what it asks and is answered where\n * it stands, so Allow once on the waiting approval is the screen's one filled button. Selecting\n * rows brings up Stop and Archive.\n *\n * The sidebar lists the same sessions; picking one there moves the focus to its row here. The\n * Chat | Code switch changes the sidebar's list only: this block is the one page.\n */\nexport default function AgentSessions() {\n  const sidebarId = useId();\n  const [collapsed, setCollapsed] = useState(false);\n  const [mode, setMode] = useState<Mode>('code');\n  const [all, setAll] = useState(repositories);\n  const [filters, setFilters] = useState(NO_FILTERS);\n  const [selected, setSelected] = useState<string[]>([]);\n\n  const words = filters.query.trim().toLowerCase();\n  const shown = mapSessions(all, (sessions) =>\n    keepSessions(\n      sessions,\n      (session) =>\n        (filters.states.length === 0 || filters.states.includes(session.state)) &&\n        `${session.title} ${session.branch}`.toLowerCase().includes(words),\n    ),\n  );\n  // A filter can hide selected rows: what the bar counts and acts on is the selection in view.\n  const picked = shown\n    .flatMap((repository) => repository.sessions)\n    .filter((session) => selected.includes(session.id));\n  const chosen = picked.map((session) => session.id);\n\n  const change = (ids: string[], next: (session: CodeSession) => CodeSession) =>\n    setAll((current) =>\n      mapSessions(current, (sessions) =>\n        sessions.map((session) => (ids.includes(session.id) ? next(session) : session)),\n      ),\n    );\n\n  /** An answer sets the session going again: it says what was answered and waits no more. */\n  const answer = (id: string, said: string) =>\n    change([id], ({ request, ...session }) => ({\n      ...session,\n      state: 'working',\n      last:\n        request?.kind === 'approval'\n          ? `You ${said} \\`${request.command}\\``\n          : `You answered: ${said}`,\n      lastAt: NOW,\n    }));\n\n  /** Only a session at work or waiting can be stopped; it pauses where it is. */\n  const stop = () => {\n    change(chosen, (session) =>\n      session.state === 'working' || session.state === 'needs-you'\n        ? { ...session, request: undefined, state: 'paused', last: 'Stopped by you', lastAt: NOW }\n        : session,\n    );\n    setSelected([]);\n  };\n\n  const archive = () => {\n    setAll((current) =>\n      mapSessions(current, (sessions) =>\n        keepSessions(sessions, (session) => !chosen.includes(session.id), true),\n      ),\n    );\n    setSelected([]);\n  };\n\n  return (\n    <AppShell className=\"ws-block-utility\" direction=\"inset\">\n      <AgentSidebar\n        id={sidebarId}\n        collapsed={collapsed}\n        onCollapsedChange={setCollapsed}\n        product={product}\n        workspace={workspace}\n        account={account}\n        mode={mode}\n        onModeChange={setMode}\n        groups={GROUPS[mode]}\n        openId={null}\n        // This page is the sidebar's All sessions.\n        allOpen\n        // A session picked in the sidebar is found in the list: the focus goes to its name.\n        onOpen={(id) => document.getElementById(`session-${id}`)?.focus()}\n        onNew={() => {}}\n      />\n\n      <AppShell.Main className=\"overflow-hidden\">\n        <TopBar\n          sidebarId={sidebarId}\n          collapsed={collapsed}\n          onCollapsedChange={setCollapsed}\n          crumbs={['All sessions']}\n        />\n\n        {/* The page scrolls inside the card, so the card's corners stay put. */}\n        <div className=\"ws-scrollbar min-h-0 flex-1 overflow-y-auto\">\n          <div className={cn(COLUMN, 'gap-ws-12 pt-ws-14 pb-ws-16 flex flex-col')}>\n            <PageHeader />\n            <section aria-label=\"Sessions\" className=\"gap-ws-9 flex flex-col\">\n              <SessionsToolbar values={filters} onChange={setFilters} />\n              <SessionsTable\n                repositories={shown}\n                selected={selected}\n                onSelectedChange={setSelected}\n                onAnswer={answer}\n                onClearFilters={() => setFilters(NO_FILTERS)}\n              />\n            </section>\n          </div>\n        </div>\n      </AppShell.Main>\n\n      <SelectionBar\n        count={picked.length}\n        canStop={picked.some(({ state }) => state === 'working' || state === 'needs-you')}\n        onClear={() => setSelected([])}\n        onStop={stop}\n        onArchive={archive}\n      />\n    </AppShell>\n  );\n}\n"
    },
    {
      "path": "src/blocks/agent-sessions/inline.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/agent-sessions/inline.tsx",
      "content": "'use client';\n\n// TODO(custom): inline marks in a line of text (code and strong); Wideset has no rich text or Code component.\nimport { cn } from '@/lib/wideset/utils';\nimport { Fragment } from 'react';\n\ntype InlineProps = {\n  text: string;\n  /**\n   * Names in a label rather than in prose (a task's title, a subtitle under it): code keeps the\n   * colour of its line and stays in one piece when the line wraps, so a file is never broken at\n   * its hyphen.\n   */\n  plain?: boolean;\n};\n\n/**\n * A line with its marks drawn: `code` in backticks takes the monospace face, as the article\n * block's inline code does (no chip behind it, so a row of steps stays quiet), and **strong** in\n * asterisks takes the strong colour and weight.\n */\nexport function Inline({ text, plain = false }: InlineProps) {\n  // A mark still open at the end (a text streaming in) already counts, so its signs never show.\n  return text.split(/(`[^`]*`?|\\*\\*[^*]*(?:\\*\\*)?)/).map((part, index) =>\n    part.startsWith('`') ? (\n      <code\n        key={index}\n        className={cn(\n          'font-ws-mono',\n          plain ? 'tracking-ws-normal whitespace-nowrap' : 'text-ws-static-strong',\n        )}\n      >\n        {part.replace(/^`|`$/g, '')}\n      </code>\n    ) : part.startsWith('**') ? (\n      <strong key={index} className=\"font-ws-medium text-ws-static-strong\">\n        {part.replace(/^\\*\\*|\\*\\*$/g, '')}\n      </strong>\n    ) : (\n      <Fragment key={index}>{part}</Fragment>\n    ),\n  );\n}\n"
    },
    {
      "path": "src/blocks/agent-sessions/keyboard-key.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/agent-sessions/keyboard-key.tsx",
      "content": "'use client';\n\n// TODO(custom): keyboard keys (a key chip, and a shortcut as a row of them); Wideset has no Kbd / shortcut component, so the key is the box of Button `xs` Border drawn by hand.\nimport { type RemixiconComponentType, RiCornerDownLeftLine } from '@remixicon/react';\nimport { cn } from '@/lib/wideset/utils';\nimport { useSyncExternalStore } from 'react';\n\nconst never = () => () => {};\nconst apple = () => (/Mac|iPhone|iPad/.test(navigator.userAgent) ? '⌘' : 'Ctrl');\n\n/**\n * ⌘ on Apple keyboards, Ctrl elsewhere. The server, which has no keyboard, renders Ctrl and the\n * browser corrects it after hydration, so a server-rendered page does not mismatch.\n */\nexport const useModifier = () => useSyncExternalStore(never, apple, () => 'Ctrl');\n\n/** Keys drawn as a glyph rather than spelled out. */\nconst GLYPHS: Record<string, RemixiconComponentType> = { Enter: RiCornerDownLeftLine };\n\n/**\n * A key as a `kbd`, 24px high, copied from the command palette's hints. An icon key names itself\n * for screen readers.\n */\nexport function Key({\n  icon: Icon,\n  name,\n  children,\n}: {\n  icon?: RemixiconComponentType;\n  name?: string;\n  children?: string;\n}) {\n  return (\n    <kbd\n      className={cn(\n        'font-ws-body border-ws-dynamic-secondary-default bg-ws-static-highlight-subtle shadow-ws-controls-control rounded-ws-control-md h-ws-12 typography-caption-strong-md text-ws-dynamic-secondary-default flex shrink-0 items-center justify-center border',\n        Icon || children?.length === 1 ? 'min-w-ws-12' : 'px-ws-5',\n      )}\n    >\n      {Icon ? (\n        <>\n          <Icon aria-hidden=\"true\" className=\"size-ws-8 shrink-0\" />\n          <span className=\"sr-only\">{name}</span>\n        </>\n      ) : (\n        children\n      )}\n    </kbd>\n  );\n}\n\n/**\n * A shortcut as the keys pressed together, on the right of a menu row. The keys are text in the\n * row, so a screen reader reads them after its label.\n */\nexport function Shortcut({ keys }: { keys: string[] }) {\n  return (\n    <span className=\"gap-ws-2 flex\">\n      {keys.map((key) =>\n        GLYPHS[key] ? <Key key={key} icon={GLYPHS[key]} name={key} /> : <Key key={key}>{key}</Key>,\n      )}\n    </span>\n  );\n}\n"
    },
    {
      "path": "src/blocks/agent-sessions/model.ts",
      "type": "registry:file",
      "target": "blocks/wideset/agent-sessions/model.ts",
      "content": "/*\n  The model every agent block is written in: threads (chats or sessions) in groups, and each\n  thread's turns. A block's `data.ts` fills these types; the transcript kit draws them, the same\n  way in Chat and in Code.\n*/\n\n/** The two halves of the app: writing, research and analysis, or work in a repository. */\nexport type Mode = 'chat' | 'code';\n\n/** How much of the agent's work the transcript shows. */\nexport type TranscriptView = 'normal' | 'thinking' | 'verbose';\n\n/**\n * Text in an answer or a document. Inside a string, `code` goes in backticks and **strong** in\n * asterisks.\n */\nexport type Prose =\n  | { kind: 'title'; text: string }\n  | { kind: 'heading'; text: string }\n  | { kind: 'paragraph'; text: string }\n  | { kind: 'list'; items: string[] }\n  | { kind: 'code'; language: string; lines: string[] };\n\nexport type StepStatus = 'running' | 'done' | 'failed' | 'waiting' | 'skipped';\n\n/** What a step opens to. A diff line starts with `+`, `-` or a space. */\nexport type StepDetail =\n  | { kind: 'output'; lines: string[]; errors?: number[] }\n  | { kind: 'diff'; lines: string[] }\n  | { kind: 'results'; items: { title: string; source: string }[] };\n\nexport type ApprovalAnswer = 'once' | 'always' | 'denied';\n\n/** The permission a step waits for: what it wants to do, on what, and why. */\nexport type Approval = {\n  title: string;\n  /** The command or path, shown in monospace. */\n  command: string;\n  reason: string;\n  /** Where \"always\" holds: \"this project\", \"this repository\". */\n  scope: string;\n  answer?: ApprovalAnswer;\n};\n\n/** One tool call. `label` is the verb and its object: \"Read `bookings-table.tsx`\". */\nexport type Step = {\n  id: string;\n  label: string;\n  /** The label while it runs: \"Reading `bookings-table.tsx`\". */\n  active?: string;\n  /** The label while it waits to be allowed: \"Run `pnpm test:e2e`\", where `label` says \"Ran\". */\n  pending?: string;\n  /** What came of it, shown quietly at the end: \"14 passed · 3.2s\", \"+18 −4\". */\n  result?: string;\n  status: StepStatus;\n  detail?: StepDetail;\n  approval?: Approval;\n  /**\n   * Something of the block's own under the step, drawn through `card`: what to do about it\n   * (Fix it, Reconnect) or where its whole output is (Open in Terminal).\n   */\n  card?: string;\n  /**\n   * The turn stops once this step has ended, until the block lets it go on (`session.proceed`):\n   * a command that failed and wants a decision. A step that `waiting`s holds the turn before it\n   * runs instead.\n   */\n  holds?: boolean;\n  /** The hold was let go. */\n  released?: boolean;\n  /** As it shows now: the turn stands at this step and waits for you. */\n  holding?: boolean;\n  /** How long it runs when the turn plays, in milliseconds. */\n  ms?: number;\n  /** While it runs: how far it is, from 0 to 1. */\n  progress?: number;\n};\n\n/** One answer the agent offers to its own question, with the fact that decides it. */\nexport type QuestionOption = { value: string; label: string; description?: string };\n\nexport type Block =\n  | { kind: 'reasoning'; id: string; seconds: number; text: string; running?: boolean }\n  | ({ kind: 'step' } & Step)\n  /**\n   * Steps in a row, folded to one line in the Normal view: \"Read 4 files\". `total` is set while\n   * they play or once they were stopped part-way: how many there are in all.\n   */\n  | { kind: 'steps'; id: string; label: string; steps: Step[]; total?: number }\n  | { kind: 'text'; id: string; prose: Prose[]; streaming?: boolean }\n  /**\n   * Something of the block's own (a document, a pull request, a report), drawn by the block.\n   * With `prose` it is written over time like an answer: it streams, stops and is copied with\n   * it. With `holds` the turn stops at it until the block lets it go on (a plan waiting for\n   * Start, a limit reached).\n   */\n  | {\n      kind: 'card';\n      id: string;\n      card: string;\n      prose?: Prose[];\n      streaming?: boolean;\n      holds?: boolean;\n      released?: boolean;\n      holding?: boolean;\n    }\n  /** A decision the agent needs before it goes on. The answer becomes your next message. */\n  | { kind: 'question'; id: string; title: string; options: QuestionOption[]; answer?: string };\n\nexport type CardBlock = Extract<Block, { kind: 'card' }>;\n\n/**\n * What you said, and what it was sent with when that is worth a caption: a tool that explains\n * the answer (\"Research\"), the files attached.\n */\nexport type UserTurn = { id: string; role: 'user'; text: string; sentWith?: string[] };\n\nexport type AgentTurn = {\n  id: string;\n  role: 'agent';\n  blocks: Block[];\n  /** Stopped this far into its run, in milliseconds: the rest was never written. */\n  stoppedAt?: number;\n  /** As it shows now: cut where it was stopped. */\n  stopped?: boolean;\n  /** As it shows now: not finished, held at a step, a question or a card that waits for you. */\n  held?: boolean;\n  rating?: 'up' | 'down';\n};\n\n/** A line across the transcript where something changed for everything after it. */\nexport type DividerTurn = {\n  id: string;\n  role: 'divider';\n  /** \"Earlier messages were summarized\". */\n  label: string;\n  /** What stands in for the turns no longer here: one row that opens to it. */\n  summary?: { label: string; prose: Prose[] };\n};\n\n/**\n * Turn = what you said, or what the agent did about it (its blocks, in the order they happened),\n * or a divider between turns.\n */\nexport type Turn = UserTurn | AgentTurn | DividerTurn;\n\nexport type ThreadState = 'working' | 'needs-you' | 'paused' | 'unread' | 'failed';\n\n/** A chat or a session in the sidebar. */\nexport type Thread = {\n  id: string;\n  title: string;\n  state?: ThreadState;\n  /** Its open pull request and the review comments not yet resolved (Code). */\n  pullRequest?: { number: number; comments: number };\n  /** A fork or a subagent of the thread above it: indented under it. */\n  child?: boolean;\n  /** Code: the branch the session works on, as chosen when it started. */\n  branch?: string;\n  turns: Turn[];\n};\n\n/** Code: where a new session works, as chosen on the new-session screen. */\nexport type Workplace = { repository: string; branch: string };\n\n/** A model to answer with, and a line on what it is for. */\nexport type Model = { id: string; name: string; note: string };\n\n/** How full a session's context is: the tokens in it, how many it holds, what it is made of. */\nexport type Context = { used: number; limit: number; parts: { label: string; tokens: number }[] };\n\n/** A project or a repository and its threads; `fixed` for Recents, which takes no new ones. */\nexport type ThreadGroup = { id: string; label: string; fixed?: boolean; threads: Thread[] };\n"
    },
    {
      "path": "src/blocks/agent-sessions/page-header.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/agent-sessions/page-header.tsx",
      "content": "'use client';\n\n// TODO(custom): page header (title, a line of description); no PageHeader in Wideset.\n\n/**\n * The page's header: its title and one line saying what the page is for. It has no action of its\n * own: New session is in the sidebar, and the filled button belongs to the session that waits.\n */\nexport function PageHeader() {\n  return (\n    <header className=\"gap-ws-2 flex min-w-0 flex-col\">\n      <h1 className=\"typography-title-md text-ws-static-strong\">Sessions</h1>\n      <p className=\"typography-body-md text-ws-static-subtle\">\n        Every Code session across your repositories. The ones that need you come first.\n      </p>\n    </header>\n  );\n}\n"
    },
    {
      "path": "src/blocks/agent-sessions/people.assets.ts",
      "type": "registry:file",
      "target": "blocks/wideset/agent-sessions/people.assets.ts",
      "content": "// Portraits of the sample people as small JPEG data URLs (a block ships only .ts and .tsx).\n// Exported from the Wideset Core Figma file by people.cjs: do not edit by hand.\n\n/** A person’s photo by name. People who are not here show their initials. */\nexport const PHOTOS: Record<string, string | undefined> = {\n  'Ines Navarro':\n    'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4gHYSUNDX1BST0ZJTEUAAQEAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADb/2wBDAAQDAwQDAwQEBAQFBQQFBwsHBwYGBw4KCggLEA4RERAOEA8SFBoWEhMYEw8QFh8XGBsbHR0dERYgIh8cIhocHRz/2wBDAQUFBQcGBw0HBw0cEhASHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwc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Unk22P93WrGyp1rcPIdKhENwwpKVD/AC1ZHmKshhhCmUuJOUqG8DWnh+qdUROjedQb9j/N1nr2CN4cBoVyJDqbXAeexxSnPvNU3r3S6NS2hxmT3nXDvFR9o86tTU8pK1tQ0EHdO+sD6D9/lUZmR/SVoZ6YJPyodj9c4TthiP8Apr3/AIWigjswvdv8IABZAxdJoU0r0WM8W1LKcpODU20dGLmqYCLZ3oq1b2E54EDr4YOKnGv9nV4scS5xosbtoM94LS6gZW2c5/v31MNjezB3TzMm6TlBTz7Q7MeG8QT/AH76K1eLxvpTJmuSLAduZ6KkNIY5AANOd/pW0lJjwY5J7yS2SfHKhWrqyLjsJIHD+mfuP3rduZ7JqO37TjY+WDWxfWu2tkhPUJCx8ONDOEa40WLQybFwafZ2n3fsqY1B49G9voT+mq//2Q==',\n};\n"
    },
    {
      "path": "src/blocks/agent-sessions/person-avatar.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/agent-sessions/person-avatar.tsx",
      "content": "'use client';\n\nimport { Avatar } from '@/components/ui/wideset/avatar/Avatar';\nimport { type AvatarColor } from '@/components/ui/wideset/avatar/Avatar.colors';\nimport { type AvatarProps } from '@/components/ui/wideset/avatar/Avatar.types';\n\nimport { PHOTOS } from './people.assets';\n\ntype PersonAvatarProps = Pick<\n  AvatarProps,\n  'size' | 'shape' | 'status' | 'className' | 'style' | 'title' | 'aria-hidden' | 'aria-label'\n> & {\n  /** The person's full name: the key their photo is filed under. */\n  name: string;\n  initials: string;\n  /** The colour of the initials. A photo takes none. */\n  color?: AvatarColor;\n  /** Empty beside the person's name (the default); their name when the avatar stands alone. */\n  alt?: string;\n};\n\n/**\n * A person's avatar: their photo when they have one, their initials when not. The choice lives\n * here so every place the block draws a person mixes the two the same way. The rest of the props\n * go to the `Avatar`, so it also sits in an `Avatar.Group`.\n */\nexport function PersonAvatar({ name, initials, color, alt = '', ...avatar }: PersonAvatarProps) {\n  const photo = PHOTOS[name];\n  return photo ? (\n    <Avatar src={photo} alt={alt} initials={initials} {...avatar} />\n  ) : (\n    // Initials carry no name of their own: a standalone avatar is named by `alt`, as a photo is.\n    <Avatar initials={initials} color={color} aria-label={alt || undefined} {...avatar} />\n  );\n}\n"
    },
    {
      "path": "src/blocks/agent-sessions/selection-bar.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/agent-sessions/selection-bar.tsx",
      "content": "'use client';\n\nimport { RiArchiveLine, RiStopCircleLine } from '@remixicon/react';\nimport { ActionBar } from '@/components/ui/wideset/action-bar/ActionBar';\nimport { Button } from '@/components/ui/wideset/button/Button';\n\ntype SelectionBarProps = {\n  count: number;\n  /** Whether any selected session is still at work or waiting: only those can be stopped. */\n  canStop: boolean;\n  onClear: () => void;\n  onStop: () => void;\n  onArchive: () => void;\n};\n\n/**\n * The actions on the selected sessions, floating over the page while anything is selected: Stop\n * for the ones still at work, Archive to clear them from the list. Neither is filled.\n */\nexport function SelectionBar({ count, canStop, onClear, onStop, onArchive }: SelectionBarProps) {\n  return (\n    <ActionBar\n      isOpen={count > 0}\n      amountSelected={count}\n      onClose={onClear}\n      closeAriaLabel=\"Clear selection\"\n    >\n      <Button variant=\"secondary\" preset=\"border\" size=\"sm\" disabled={!canStop} onClick={onStop}>\n        <Button.Icon icon={RiStopCircleLine} />\n        Stop\n      </Button>\n      <Button variant=\"secondary\" preset=\"border\" size=\"sm\" onClick={onArchive}>\n        <Button.Icon icon={RiArchiveLine} />\n        Archive\n      </Button>\n    </ActionBar>\n  );\n}\n"
    },
    {
      "path": "src/blocks/agent-sessions/session-request.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/agent-sessions/session-request.tsx",
      "content": "'use client';\n\n// TODO(custom): what a session waits for, answered from its row (an approval to allow or deny, a question with the answers offered); Wideset's InlineAlert is a message with one action.\nimport { Button } from '@/components/ui/wideset/button/Button';\nimport type { MouseEvent } from 'react';\n\nimport type { SessionRequest as Request } from './data';\n\ntype SessionRequestProps = {\n  /** The session's name, so each button says what it answers. */\n  session: string;\n  request: Request;\n  /** The answer given: \"allowed\", \"denied\", or the option picked. */\n  onAnswer: (answer: string) => void;\n};\n\n/**\n * What a session needs from you, in a sentence under its last step, with the answer one click\n * away so the list can be worked through without opening each session. An approval offers Allow\n * once, the screen's one filled button, and Deny; a question offers the answers the agent\n * proposed, none of them filled, because none is the recommended one. An answer is its own\n * click: it never selects the row.\n */\nexport function SessionRequest({ session, request, onAnswer }: SessionRequestProps) {\n  const answer = (said: string) => (event: MouseEvent) => {\n    event.stopPropagation();\n    onAnswer(said);\n  };\n\n  return (\n    <div\n      role=\"group\"\n      aria-label={`${session} needs you`}\n      className=\"gap-ws-5 pt-ws-3 pb-ws-3 flex flex-col items-start\"\n    >\n      <p className=\"typography-body-sm text-ws-static-base text-pretty\">\n        {request.kind === 'approval' ? request.reason : request.text}\n      </p>\n      <div className=\"gap-ws-3 flex flex-wrap\">\n        {request.kind === 'approval' ? (\n          <>\n            <Button size=\"sm\" onClick={answer('allowed')}>\n              Allow once\n            </Button>\n            <Button size=\"sm\" variant=\"secondary\" preset=\"ghost\" onClick={answer('denied')}>\n              Deny\n            </Button>\n          </>\n        ) : (\n          request.options.map((option) => (\n            <Button\n              key={option}\n              size=\"sm\"\n              variant=\"secondary\"\n              preset=\"border\"\n              onClick={answer(option)}\n            >\n              {option}\n            </Button>\n          ))\n        )}\n      </div>\n    </div>\n  );\n}\n"
    },
    {
      "path": "src/blocks/agent-sessions/sessions-format.ts",
      "type": "registry:file",
      "target": "blocks/wideset/agent-sessions/sessions-format.ts",
      "content": "const relative = new Intl.RelativeTimeFormat('en-US', { numeric: 'auto' });\nconst dateTime = new Intl.DateTimeFormat('en-US', { dateStyle: 'medium', timeStyle: 'short' });\n\n/** How long ago, in the largest unit that fits: \"Just now\", \"6 minutes ago\", \"2 hours ago\", \"yesterday\". */\nexport const formatAgo = (iso: string, now: string) => {\n  const minutes = Math.round((Date.parse(iso) - Date.parse(now)) / 60000);\n  if (minutes === 0) return 'Just now';\n  if (minutes > -60) return relative.format(minutes, 'minute');\n  if (minutes > -24 * 60) return relative.format(Math.round(minutes / 60), 'hour');\n  return relative.format(Math.round(minutes / (24 * 60)), 'day');\n};\n\n/** The full date and time, for the title of a relative one. */\nexport const formatDateTime = (iso: string) => dateTime.format(new Date(iso));\n\n/** How long a session has run: \"4m\", \"1h 12m\". */\nexport const formatRunTime = (minutes: number) =>\n  minutes < 60 ? `${minutes}m` : `${Math.floor(minutes / 60)}h ${minutes % 60}m`;\n"
    },
    {
      "path": "src/blocks/agent-sessions/sessions-table.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/agent-sessions/sessions-table.tsx",
      "content": "'use client';\n\n// TODO(custom): rows grouped under a repository inside one table, and a child row indented under its parent; Table has no group row and no nesting.\nimport {\n  RiCornerDownRightLine,\n  RiGitBranchLine,\n  RiGitRepositoryLine,\n  RiLoader4Line,\n} from '@remixicon/react';\nimport { Card } from '@/components/ui/wideset/card/Card';\nimport { Checkbox } from '@/components/ui/wideset/checkbox/Checkbox';\nimport { cn } from '@/lib/wideset/utils';\nimport { StatusBadge } from '@/components/ui/wideset/status-badge/StatusBadge';\nimport { Table } from '@/components/ui/wideset/table/Table';\n\nimport { ChecksMark } from './checks-mark';\nimport { type CodeSession, NOW, type Repository, STATES } from './data';\nimport { EmptyState } from './empty-state';\nimport { Inline } from './inline';\nimport { SessionRequest } from './session-request';\nimport { formatAgo, formatDateTime, formatRunTime } from './sessions-format';\n\nconst COLUMN_COUNT = 7;\n\n/**\n * In a card, the table runs edge to edge: the outer cells are inset like a card's title, and the\n * last row leaves its line to the card's border.\n */\nconst IN_CARD =\n  '[&_tr>*:first-child]:pl-ws-11 [&_tr>*:last-child]:pr-ws-11 [&_tbody:last-child>tr:last-child>*]:border-b-0';\n\ntype SessionsTableProps = {\n  /** The repositories with the sessions the filter and the search left. */\n  repositories: Repository[];\n  selected: string[];\n  onSelectedChange: (ids: string[]) => void;\n  /** Answers what a session waits for: \"allowed\", \"denied\", or the option picked. */\n  onAnswer: (id: string, answer: string) => void;\n  onClearFilters: () => void;\n};\n\n/**\n * Every session as one list to work through, in a card: the columns named once, then a band per\n * repository and its sessions under it. A row says what the session is, how it stands (the colour\n * of the state's meaning), where it works, its pull request with the checks summed in one mark,\n * and when it last did something and for how long it has run. A session that needs you is a\n * taller row: what it asks, and the answer, sit under its last step. A subagent is indented under\n * its parent. A click anywhere on a row selects it; the checkbox is the same control for the\n * keyboard, and the session's name opens it.\n */\nexport function SessionsTable({\n  repositories,\n  selected,\n  onSelectedChange,\n  onAnswer,\n  onClearFilters,\n}: SessionsTableProps) {\n  const ids = repositories.flatMap((repository) => repository.sessions.map(({ id }) => id));\n  const picked = ids.filter((id) => selected.includes(id)).length;\n  const toggle = (id: string) =>\n    onSelectedChange(\n      selected.includes(id) ? selected.filter((item) => item !== id) : [...selected, id],\n    );\n\n  return (\n    <Card role=\"region\" aria-label=\"Sessions\">\n      {/* Straight in the card, not in Card.Content: its scroll area reserves a scrollbar gutter\n          and wraps what it holds in display: table (a library bug). */}\n      <Table\n        size=\"md\"\n        placement=\"top\"\n        selectionMode={ids.length > 0 ? 'multiple' : undefined}\n        className={cn('table-fixed', IN_CARD)}\n      >\n        <Table.Head>\n          <Table.Row>\n            {/* The card's inset, the box and the cell's own padding: 20 + 20 + 16. */}\n            <Table.Header className=\"w-[3.5rem]\">\n              <Checkbox\n                aria-label=\"Select all sessions\"\n                disabled={ids.length === 0}\n                checked={picked === 0 ? false : picked === ids.length ? true : 'indeterminate'}\n                onCheckedChange={(checked) => onSelectedChange(checked === true ? ids : [])}\n              />\n            </Table.Header>\n            <Table.Header>Session</Table.Header>\n            <Table.Header className=\"w-[7rem]\">State</Table.Header>\n            <Table.Header className=\"w-[16rem]\">Branch</Table.Header>\n            <Table.Header className=\"w-[8.5rem]\">Pull request</Table.Header>\n            <Table.Header className=\"w-[8.5rem]\">Last active</Table.Header>\n            <Table.Header align=\"right\" className=\"w-[6rem]\">\n              Run time\n            </Table.Header>\n          </Table.Row>\n        </Table.Head>\n\n        {ids.length === 0 && (\n          <Table.Body>\n            <Table.Row>\n              <Table.Cell colSpan={COLUMN_COUNT}>\n                <EmptyState onClearFilters={onClearFilters} />\n              </Table.Cell>\n            </Table.Row>\n          </Table.Body>\n        )}\n\n        {repositories.map((repository) => (\n          <Table.Body key={repository.id}>\n            {/* A plain row, so the band neither hovers nor selects like a session. */}\n            <tr>\n              <th\n                colSpan={COLUMN_COUNT}\n                scope=\"rowgroup\"\n                className=\"bg-ws-static-alpha-subtle border-ws-static-base px-ws-9 py-ws-5 border-b text-left\"\n              >\n                <span className=\"gap-ws-3 typography-label-strong-sm text-ws-static-strong flex items-center\">\n                  <RiGitRepositoryLine\n                    aria-hidden=\"true\"\n                    className=\"size-ws-9 text-ws-static-subtle shrink-0\"\n                  />\n                  {repository.name}\n                </span>\n              </th>\n            </tr>\n            {repository.sessions.map((session) => (\n              <SessionRow\n                key={session.id}\n                session={session}\n                selected={selected.includes(session.id)}\n                onToggle={() => toggle(session.id)}\n                onAnswer={(answer) => onAnswer(session.id, answer)}\n              />\n            ))}\n          </Table.Body>\n        ))}\n      </Table>\n    </Card>\n  );\n}\n\ntype SessionRowProps = {\n  session: CodeSession;\n  selected: boolean;\n  onToggle: () => void;\n  onAnswer: (answer: string) => void;\n};\n\nfunction SessionRow({ session, selected, onToggle, onAnswer }: SessionRowProps) {\n  const state = STATES[session.state];\n  const { pullRequest } = session;\n\n  return (\n    <Table.Row selected={selected} onClick={onToggle}>\n      <Table.Cell>\n        {/* As tall as the name's line, so the box sits on it in a row of any height. */}\n        <span className=\"h-ws-11 flex items-center\">\n          <Checkbox checked={selected} aria-label={`Select ${session.title}`} />\n        </span>\n      </Table.Cell>\n      <Table.Cell>\n        <div className={cn('gap-ws-3 flex items-start', session.child && 'pl-ws-5')}>\n          {session.child && (\n            <RiCornerDownRightLine\n              role=\"img\"\n              aria-label=\"Subagent\"\n              className=\"size-ws-9 text-ws-static-subtle mt-ws-1 shrink-0\"\n            />\n          )}\n          <div className=\"flex min-w-0 flex-1 flex-col\">\n            <a\n              href={`#${session.id}`}\n              id={`session-${session.id}`}\n              onClick={(event) => event.stopPropagation()}\n              className=\"typography-label-strong-sm text-ws-static-strong focus-visible:wds-focus-visible outline-ws-dynamic-primary-strong-default w-fit max-w-full truncate hover:underline\"\n            >\n              {session.title}\n            </a>\n            <Table.CellDescription className=\"text-pretty\">\n              <Inline text={session.last} />\n            </Table.CellDescription>\n            {session.request && (\n              <SessionRequest\n                session={session.title}\n                request={session.request}\n                onAnswer={onAnswer}\n              />\n            )}\n          </div>\n        </div>\n      </Table.Cell>\n      <Table.Cell>\n        <StatusBadge size=\"sm\" color={state.color}>\n          {session.state === 'working' && (\n            <StatusBadge.Icon icon={RiLoader4Line} className=\"motion-safe:animate-spin\" />\n          )}\n          <StatusBadge.Label>{state.label}</StatusBadge.Label>\n        </StatusBadge>\n      </Table.Cell>\n      <Table.Cell>\n        {/* A branch name is code: it breaks anywhere rather than lose its end to an ellipsis. */}\n        <span className=\"gap-ws-3 flex min-w-0 items-start\">\n          <RiGitBranchLine\n            aria-hidden=\"true\"\n            className=\"size-ws-9 text-ws-static-subtle mt-ws-1 shrink-0\"\n          />\n          <span className=\"font-ws-mono typography-body-sm tracking-ws-normal wrap-anywhere\">\n            {session.branch}\n          </span>\n        </span>\n      </Table.Cell>\n      <Table.Cell>\n        {pullRequest ? (\n          <span className=\"gap-ws-3 flex items-center\">\n            <ChecksMark checks={pullRequest.checks} />\n            <span className=\"text-ws-static-strong tabular-nums\">#{pullRequest.number}</span>\n            <span className=\"text-ws-static-subtle\">{pullRequest.state}</span>\n          </span>\n        ) : (\n          <span className=\"text-ws-static-subtle\">\n            <span aria-hidden=\"true\">—</span>\n            <span className=\"sr-only\">No pull request</span>\n          </span>\n        )}\n      </Table.Cell>\n      <Table.Cell>\n        <time\n          dateTime={session.lastAt}\n          title={formatDateTime(session.lastAt)}\n          className=\"text-ws-static-subtle whitespace-nowrap\"\n        >\n          {formatAgo(session.lastAt, NOW)}\n        </time>\n      </Table.Cell>\n      <Table.Cell align=\"right\">\n        <span className=\"tabular-nums\">{formatRunTime(session.minutes)}</span>\n      </Table.Cell>\n    </Table.Row>\n  );\n}\n"
    },
    {
      "path": "src/blocks/agent-sessions/sessions-toolbar.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/agent-sessions/sessions-toolbar.tsx",
      "content": "'use client';\n\nimport { RiSearchLine } from '@remixicon/react';\nimport { FilterButton } from '@/components/ui/wideset/filter-button/FilterButton';\nimport { TextInput } from '@/components/ui/wideset/text-input/TextInput';\n\nimport { stateOptions } from './data';\n\nexport type FilterValues = { query: string; states: string[] };\n\ntype SessionsToolbarProps = {\n  values: FilterValues;\n  onChange: (values: FilterValues) => void;\n};\n\n/**\n * The toolbar over the list: a search by name or branch, then the filter by state. The states\n * are a filter, not tabs, so nothing here counts sessions: the list is for working through.\n */\nexport function SessionsToolbar({ values, onChange }: SessionsToolbarProps) {\n  return (\n    <div className=\"gap-ws-5 flex flex-wrap items-center\">\n      <TextInput\n        size=\"sm\"\n        className=\"w-[18rem] max-w-full\"\n        value={values.query}\n        onChange={(event) => onChange({ ...values, query: event.target.value })}\n      >\n        <TextInput.Prefix inner>\n          <TextInput.Icon icon={RiSearchLine} />\n        </TextInput.Prefix>\n        <TextInput.Input\n          type=\"search\"\n          placeholder=\"Search by name or branch\"\n          aria-label=\"Search this list by name or branch\"\n        />\n        <TextInput.Suffix inner>\n          <TextInput.ClearButton aria-label=\"Clear search\" />\n        </TextInput.Suffix>\n      </TextInput>\n      <FilterButton\n        label=\"State\"\n        placeholder=\"State\"\n        options={stateOptions}\n        value={values.states}\n        onChange={(states) => onChange({ ...values, states })}\n        clearFilterAriaLabel=\"Clear state filter\"\n      />\n    </div>\n  );\n}\n"
    },
    {
      "path": "src/blocks/agent-sessions/sidebar.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/agent-sessions/sidebar.tsx",
      "content": "'use client';\n\n// TODO(custom): the account menu is composed by hand, and the Search row turns into a TextInput in place; a thread group cannot fold (Sidebar.SectionHeader is a heading only) and Sidebar has no search part.\nimport {\n  RiAddLine,\n  RiArrowDownSLine,\n  RiChat1Line,\n  RiCodeSSlashLine,\n  RiLogoutBoxRLine,\n  RiSearchLine,\n  RiSettingsLine,\n  RiStackLine,\n} from '@remixicon/react';\nimport { DropdownMenu } from '@/components/ui/wideset/dropdown/DropdownMenu';\nimport { IconButton } from '@/components/ui/wideset/button/IconButton';\nimport { ListItem } from '@/components/ui/wideset/list-item/ListItem';\nimport { SegmentedControl } from '@/components/ui/wideset/segmented-control/SegmentedControl';\nimport { Sidebar } from '@/components/ui/wideset/sidebar/Sidebar';\nimport { type SidebarProps } from '@/components/ui/wideset/sidebar/Sidebar.types';\nimport { TextInput } from '@/components/ui/wideset/text-input/TextInput';\nimport { type MouseEvent, useEffect, useId, useRef, useState } from 'react';\n\nimport { BrandMark } from './brand-mark';\nimport { useModifier } from './keyboard-key';\nimport type { Mode, ThreadGroup } from './model';\nimport { PersonAvatar } from './person-avatar';\nimport { ThreadMark } from './thread-mark';\n\ntype AgentSidebarProps = Pick<SidebarProps, 'id' | 'collapsed' | 'onCollapsedChange'> & {\n  product: string;\n  workspace: string;\n  account: { name: string; email: string; initials: string };\n  mode: Mode;\n  onModeChange: (mode: Mode) => void;\n  /** The mode's threads: projects or repositories, then Recents. */\n  groups: ThreadGroup[];\n  /** The thread on the page; none on the new-chat screen. */\n  openId: string | null;\n  /** The thread the agent is working in right now: its row shows the spinner. */\n  workingId?: string;\n  onOpen: (id: string) => void;\n  /** Starts a new thread, in a group when its `+` was pressed. */\n  onNew: (groupId?: string) => void;\n  /** Code: the page that lists every session is the one open. */\n  allOpen?: boolean;\n  /** Code: opens that page in place; without it the row is a plain link to `#sessions`. */\n  onAll?: () => void;\n};\n\n/**\n * The app's sidebar on the grey frame: the brand, the Chat | Code switch, then a short list of\n * rows that read as navigation, icon and label, with no borders: New chat, Search and, in Code,\n * All sessions. Search turns into the search field in place, focused; Esc, clearing it or\n * leaving it empty brings the row back. Under them the mode's threads in their groups, with one\n * state mark at the end of a row and a child thread indented under its parent; a thread's name\n * starts on the same left edge as the rows' icons. The account sits at the foot. Its toggle is\n * in the page bar, so the screen holds `collapsed`; collapsed, it keeps the mark, the rows as\n * icons and the avatar.\n */\nexport function AgentSidebar({\n  product,\n  workspace,\n  account,\n  mode,\n  onModeChange,\n  groups,\n  openId,\n  workingId,\n  onOpen,\n  onNew,\n  allOpen = false,\n  onAll,\n  ...props\n}: AgentSidebarProps) {\n  const [query, setQuery] = useState('');\n  const [searching, setSearching] = useState(false);\n  const field = useRef<HTMLInputElement>(null);\n  const searchRow = useRef<HTMLButtonElement>(null);\n  /** Search was left from the keyboard: the cursor goes back to the Search row it came from. */\n  const backToRow = useRef(false);\n  const groupId = useId();\n  const thread = mode === 'chat' ? 'chat' : 'session';\n  const modifier = useModifier();\n  /** A shortcut as a row's hint: \"⌘K\" on Apple keyboards, \"Ctrl K\" elsewhere. */\n  const shortcut = (...keys: string[]) =>\n    modifier === '⌘' ? `⌘${keys.join('')}` : `Ctrl ${keys.join(' ')}`;\n  const { collapsed, onCollapsedChange } = props;\n\n  const needle = query.trim().toLowerCase();\n  const shown = groups\n    .map((group) => ({\n      ...group,\n      threads: group.threads.filter((item) => item.title.toLowerCase().includes(needle)),\n    }))\n    // A search shows only the groups it found something in; without one, an empty project or\n    // repository stays, with its `+` for the first thread in it.\n    .filter((group) => group.threads.length > 0 || (needle === '' && !group.fixed));\n  const nothingFound = needle !== '' && shown.length === 0;\n\n  const search = () => {\n    onCollapsedChange?.(false);\n    setSearching(true);\n  };\n\n  const endSearch = (refocus = false) => {\n    // Only ever set here: a blur as the field leaves must not cancel the way back.\n    if (refocus) backToRow.current = true;\n    setQuery('');\n    setSearching(false);\n  };\n\n  // The row became the field to be typed in: the cursor is there. Back from the field by Escape\n  // or Clear, the cursor goes to the Search row again rather than to the page.\n  useEffect(() => {\n    if (searching && !collapsed) field.current?.focus();\n    else if (!searching && backToRow.current) {\n      backToRow.current = false;\n      searchRow.current?.focus();\n    }\n  }, [searching, collapsed]);\n\n  // The rows' shortcuts, the ones their hints show.\n  useEffect(() => {\n    const onKey = (event: KeyboardEvent) => {\n      if (!(event.metaKey || event.ctrlKey) || event.altKey) return;\n      const key = event.key.toLowerCase();\n      if (key === 'k' && !event.shiftKey) {\n        event.preventDefault();\n        onCollapsedChange?.(false);\n        setSearching(true);\n        // Already open (a query kept it after the field lost focus): the effect will not run again.\n        field.current?.focus();\n      } else if (key === 'o' && event.shiftKey) {\n        event.preventDefault();\n        onNew();\n      }\n    };\n    window.addEventListener('keydown', onKey);\n    return () => window.removeEventListener('keydown', onKey);\n  }, [onCollapsedChange, onNew]);\n\n  /** A row is a link for its look and its place in the tab order; here it acts in place. */\n  const act = (action: () => void) => (event: MouseEvent) => {\n    event.preventDefault();\n    action();\n  };\n\n  return (\n    <Sidebar {...props}>\n      <Sidebar.Header>\n        <div className=\"gap-ws-7 flex flex-col\">\n          <Sidebar.Expanded>\n            <div className=\"gap-ws-7 flex flex-col\">\n              <div className=\"gap-ws-7 pt-ws-3 pb-ws-3 flex items-center\">\n                <BrandMark className=\"size-ws-15\" />\n                <div className=\"flex min-w-0 flex-1 flex-col\">\n                  <span className=\"typography-label-strong-sm text-ws-static-strong truncate\">\n                    {product}\n                  </span>\n                  <span className=\"typography-caption-md text-ws-static-subtle truncate\">\n                    {workspace}\n                  </span>\n                </div>\n              </div>\n              <SegmentedControl\n                size=\"sm\"\n                variant=\"fullWidth\"\n                aria-label=\"Mode\"\n                value={mode}\n                onValueChange={(value) => onModeChange(value as Mode)}\n              >\n                <SegmentedControl.Item value=\"chat\">\n                  <SegmentedControl.Icon icon={RiChat1Line} />\n                  Chat\n                </SegmentedControl.Item>\n                <SegmentedControl.Item value=\"code\">\n                  <SegmentedControl.Icon icon={RiCodeSSlashLine} />\n                  Code\n                </SegmentedControl.Item>\n              </SegmentedControl>\n            </div>\n          </Sidebar.Expanded>\n          <Sidebar.Collapsed>\n            <div className=\"pt-ws-3 pb-ws-3 flex justify-center\">\n              <BrandMark className=\"size-ws-15\" label={product} />\n            </div>\n          </Sidebar.Collapsed>\n\n          <nav aria-label={mode === 'chat' ? 'Chat' : 'Code'} className=\"gap-ws-2 flex flex-col\">\n            {/* New and Search act in place, so they are buttons dressed as the rows around them. */}\n            <Sidebar.Item\n              asChild\n              icon={RiAddLine}\n              label={`New ${thread}`}\n              suffix={shortcut('⇧', 'O')}\n              suffixOnHover\n            >\n              <button type=\"button\" onClick={() => onNew()} />\n            </Sidebar.Item>\n            {searching && !collapsed ? (\n              <TextInput\n                size=\"sm\"\n                value={query}\n                onChange={(event) => setQuery(event.target.value)}\n                onKeyDown={(event) => {\n                  if (event.key !== 'Escape') return;\n                  // Escape is spent closing the search: it does not also stop a running turn.\n                  event.preventDefault();\n                  endSearch(true);\n                }}\n                onBlur={() => query.trim() === '' && endSearch()}\n              >\n                <TextInput.Prefix inner>\n                  <TextInput.Icon icon={RiSearchLine} />\n                </TextInput.Prefix>\n                <TextInput.Input\n                  ref={field}\n                  type=\"search\"\n                  placeholder={`Search ${thread}s`}\n                  aria-label={`Search ${thread}s`}\n                />\n                <TextInput.Suffix inner>\n                  <TextInput.ClearButton\n                    aria-label=\"Clear search\"\n                    onClear={() => endSearch(true)}\n                  />\n                </TextInput.Suffix>\n              </TextInput>\n            ) : (\n              <Sidebar.Item\n                asChild\n                icon={RiSearchLine}\n                label=\"Search\"\n                suffix={shortcut('K')}\n                suffixOnHover\n              >\n                <button ref={searchRow} type=\"button\" onClick={search} />\n              </Sidebar.Item>\n            )}\n            {mode === 'code' && (\n              <Sidebar.Item\n                href=\"#sessions\"\n                icon={RiStackLine}\n                label=\"All sessions\"\n                active={allOpen}\n                // With no handler it is a plain link to #sessions, for the app's router.\n                onClick={onAll ? act(onAll) : undefined}\n              />\n            )}\n          </nav>\n        </div>\n      </Sidebar.Header>\n\n      {/* A section draws only the slot for the state it is in. Thread rows have no icon, so the\n          collapsed rail leaves the list to the expanded sidebar. The scroll area sizes its\n          content to the longest row, so a long title would widen the whole list instead of\n          truncating: `contain-inline-size` keeps the list as wide as its column. */}\n      <Sidebar.Section scrollable>\n        <Sidebar.Expanded>\n          <nav\n            aria-label={mode === 'chat' ? 'Chats' : 'Sessions'}\n            className=\"gap-ws-9 flex flex-col contain-inline-size\"\n          >\n            {shown.map((group) => (\n              <div\n                key={group.id}\n                role=\"group\"\n                aria-labelledby={`${groupId}-${group.id}`}\n                className=\"gap-ws-2 flex flex-col\"\n              >\n                {/* The header's one action ends the row 4px in, its icon on the suffixes' edge. */}\n                <div className=\"flex items-end\">\n                  <Sidebar.SectionHeader id={`${groupId}-${group.id}`} className=\"flex-1\">\n                    {group.label}\n                  </Sidebar.SectionHeader>\n                  {!group.fixed && (\n                    <IconButton\n                      icon={RiAddLine}\n                      variant=\"secondary\"\n                      preset=\"ghost\"\n                      size=\"xs\"\n                      aria-label={`New ${thread} in ${group.label}`}\n                      className=\"mr-ws-3\"\n                      onClick={() => onNew(group.id)}\n                    />\n                  )}\n                </div>\n                {group.threads.map((item) => {\n                  const working = item.id === workingId;\n                  return (\n                    <Sidebar.Item\n                      key={item.id}\n                      href={`#${item.id}`}\n                      label={item.title}\n                      nested={item.child}\n                      active={item.id === openId}\n                      suffix={\n                        working || item.state || item.pullRequest ? (\n                          <ThreadMark thread={item} working={working} />\n                        ) : undefined\n                      }\n                      onClick={act(() => onOpen(item.id))}\n                    />\n                  );\n                })}\n              </div>\n            ))}\n            {/* Always there, so a screen reader hears when the search finds nothing. */}\n            <p\n              role=\"status\"\n              className={\n                nothingFound ? 'typography-body-md text-ws-static-subtle px-ws-5' : 'sr-only'\n              }\n            >\n              {nothingFound ? `No ${thread}s match “${query.trim()}”` : ''}\n            </p>\n          </nav>\n        </Sidebar.Expanded>\n      </Sidebar.Section>\n\n      <Sidebar.Footer>\n        {/* On the grey ground the line keeps the nav's inset: run edge to edge, it would stop\n            short of the page and read as broken. */}\n        <div className=\"border-ws-static-base pt-ws-5 border-t\">\n          <Sidebar.Expanded>\n            <DropdownMenu>\n              <DropdownMenu.Trigger asChild>\n                <button\n                  type=\"button\"\n                  className=\"gap-ws-5 px-ws-5 py-ws-3 rounded-ws-control-lg hover:bg-ws-dynamic-tertiary-alpha-strong-default focus-visible:wds-focus-visible outline-ws-dynamic-primary-strong-default flex w-full items-center text-left\"\n                >\n                  <PersonAvatar name={account.name} initials={account.initials} color=\"teal\" />\n                  <span className=\"flex min-w-0 flex-1 flex-col\">\n                    <span className=\"typography-label-strong-sm text-ws-static-base truncate\">\n                      {account.name}\n                    </span>\n                    <span className=\"typography-caption-md text-ws-static-subtle truncate\">\n                      {account.email}\n                    </span>\n                  </span>\n                  <RiArrowDownSLine\n                    aria-hidden=\"true\"\n                    className=\"size-ws-9 text-ws-static-strong\"\n                  />\n                </button>\n              </DropdownMenu.Trigger>\n              <DropdownMenu.Content side=\"top\" align=\"start\" className=\"ws-block-utility w-[14rem]\">\n                <DropdownMenu.Item>\n                  <ListItem.Prefix>\n                    <RiSettingsLine className=\"size-ws-9\" />\n                  </ListItem.Prefix>\n                  <ListItem.Content>\n                    <ListItem.Label>Account settings</ListItem.Label>\n                  </ListItem.Content>\n                </DropdownMenu.Item>\n                <DropdownMenu.Separator />\n                <DropdownMenu.Item variant=\"danger\">\n                  <ListItem.Prefix>\n                    <RiLogoutBoxRLine className=\"size-ws-9\" />\n                  </ListItem.Prefix>\n                  <ListItem.Content>\n                    <ListItem.Label>Log out</ListItem.Label>\n                  </ListItem.Content>\n                </DropdownMenu.Item>\n              </DropdownMenu.Content>\n            </DropdownMenu>\n          </Sidebar.Expanded>\n          <Sidebar.Collapsed>\n            <div className=\"flex justify-center\">\n              <PersonAvatar\n                name={account.name}\n                initials={account.initials}\n                color=\"teal\"\n                title={account.name}\n                alt={account.name}\n              />\n            </div>\n          </Sidebar.Collapsed>\n        </div>\n      </Sidebar.Footer>\n    </Sidebar>\n  );\n}\n"
    },
    {
      "path": "src/blocks/agent-sessions/thread-mark.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/agent-sessions/thread-mark.tsx",
      "content": "'use client';\n\n// TODO(custom): the state of a chat or session as one small mark at the end of its sidebar row (working, needs you, paused, unread, a pull request, failed); Wideset has no spinner, and StatusBadge is a labelled badge.\nimport {\n  RiCloseCircleFill,\n  RiErrorWarningFill,\n  RiGitPullRequestLine,\n  RiLoader4Line,\n  RiPauseCircleLine,\n} from '@remixicon/react';\n\nimport type { Thread } from './model';\n\n/**\n * One mark per row, each a different shape, so the state reads without its colour: a spinner\n * while the agent works, the notice sign when it waits for you, a grey pause when it stands\n * still by itself (a limit reached, stopped by you), Figma's unread dot for an answer not yet\n * read, the negative sign when it failed. A session with a pull request shows it with the review\n * comments still open. Every mark has its name for screen readers.\n */\nexport function ThreadMark({ thread, working }: { thread: Thread; working: boolean }) {\n  const state = working ? 'working' : thread.state;\n\n  if (state === 'working') {\n    return (\n      <>\n        <RiLoader4Line aria-hidden className=\"size-ws-8 motion-safe:animate-spin\" />\n        <span className=\"sr-only\">Working</span>\n      </>\n    );\n  }\n  if (state === 'needs-you') {\n    return (\n      <RiErrorWarningFill\n        role=\"img\"\n        aria-label=\"Needs you\"\n        className=\"size-ws-8 text-ws-semantic-notice\"\n      />\n    );\n  }\n  if (state === 'failed') {\n    return (\n      <RiCloseCircleFill\n        role=\"img\"\n        aria-label=\"Failed\"\n        className=\"size-ws-8 text-ws-semantic-negative\"\n      />\n    );\n  }\n  if (state === 'paused') {\n    return <RiPauseCircleLine role=\"img\" aria-label=\"Paused\" className=\"size-ws-8\" />;\n  }\n  if (thread.pullRequest) {\n    const { number, comments } = thread.pullRequest;\n    return (\n      <span className=\"gap-ws-2 flex items-center\">\n        <RiGitPullRequestLine aria-hidden className=\"size-ws-8\" />\n        <span className=\"sr-only\">Pull request {number}, open comments:</span>\n        {comments}\n      </span>\n    );\n  }\n  if (state === 'unread') {\n    return (\n      <span className=\"bg-ws-non-semantic-indigo-strong rounded-ws-control-full size-ws-4 mx-ws-2\">\n        <span className=\"sr-only\">Unread</span>\n      </span>\n    );\n  }\n  return null;\n}\n"
    },
    {
      "path": "src/blocks/agent-sessions/top-bar.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/agent-sessions/top-bar.tsx",
      "content": "'use client';\n\nimport { RiSideBarLine } from '@remixicon/react';\nimport { Breadcrumbs } from '@/components/ui/wideset/breadcrumbs/Breadcrumbs';\nimport { IconButton } from '@/components/ui/wideset/button/IconButton';\nimport type { ReactNode } from 'react';\n\ntype TopBarProps = {\n  sidebarId: string;\n  collapsed: boolean;\n  onCollapsedChange: (collapsed: boolean) => void;\n  /** Where you are, outermost first: the project or repository, then the thread. */\n  crumbs: string[];\n  /**\n   * More about where the work happens, after the crumbs: a branch and the one it goes into. It\n   * is the first to give way: it shows only while the bar is wide enough for it.\n   */\n  meta?: ReactNode;\n  /** The thread's actions, at the right end. */\n  children?: ReactNode;\n};\n\n/**\n * The bar at the top of the session's half of the card. It belongs to the surround: edge to\n * edge, 48px, a line under it that meets the line of the pane's bar across the divider. The\n * sidebar's toggle is pulled left so its glyph, not its box, sits 20px from the edge; then where\n * you are; the actions at the far end. Nothing in it wraps: the thread's name, the last crumb,\n * truncates, and `meta` leaves when the bar is narrower than 44rem, so the name and the actions\n * always have their room.\n */\nexport function TopBar({\n  sidebarId,\n  collapsed,\n  onCollapsedChange,\n  crumbs,\n  meta,\n  children,\n}: TopBarProps) {\n  return (\n    <header className=\"h-ws-18 border-ws-static-base gap-ws-5 px-ws-11 @container flex shrink-0 items-center border-b\">\n      <IconButton\n        icon={RiSideBarLine}\n        variant=\"secondary\"\n        preset=\"ghost\"\n        size=\"sm\"\n        iconClassName=\"text-ws-static-subtle size-ws-9\"\n        aria-label={collapsed ? 'Expand sidebar' : 'Collapse sidebar'}\n        aria-expanded={!collapsed}\n        aria-controls={sidebarId}\n        onClick={() => onCollapsedChange(!collapsed)}\n        className=\"-ml-ws-5 shrink-0\"\n      />\n      {/* Only the last crumb gives way: its list item may shrink, and its text truncates. */}\n      <Breadcrumbs separator=\"arrow\" className=\"min-w-0 [&_li:last-child]:min-w-0 [&_ol]:min-w-0\">\n        {crumbs.map((crumb, index) =>\n          index < crumbs.length - 1 ? (\n            <Breadcrumbs.Item key={crumb} asChild>\n              <a href={`#${crumb.toLowerCase().replace(/\\s+/g, '-')}`}>{crumb}</a>\n            </Breadcrumbs.Item>\n          ) : (\n            <Breadcrumbs.Item key={crumb} className=\"min-w-0\">\n              <span className=\"px-ws-2 truncate\">{crumb}</span>\n            </Breadcrumbs.Item>\n          ),\n        )}\n      </Breadcrumbs>\n      {meta && (\n        <div className=\"typography-caption-md text-ws-static-subtle gap-ws-3 hidden min-w-0 items-center @min-[44rem]:flex\">\n          {meta}\n        </div>\n      )}\n      <div className=\"gap-ws-3 ml-auto flex shrink-0 items-center\">{children}</div>\n    </header>\n  );\n}\n"
    }
  ],
  "meta": {
    "version": "1.1.0",
    "commit": "a734f9f0"
  }
}
