{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "task-detail-04",
  "title": "Task with a conversation pane",
  "description": "The task beside a pinned conversation where comments and changes interleave, a teammate types an answer and the panes become a switch on phones",
  "dependencies": [
    "date-fns",
    "motion"
  ],
  "registryDependencies": [
    "https://ui.ndekocode.dev/r/animated-size.json",
    "https://ui.ndekocode.dev/r/avatar.json",
    "https://ui.ndekocode.dev/r/button.json",
    "https://ui.ndekocode.dev/r/checkbox.json",
    "https://ui.ndekocode.dev/r/icons.json",
    "https://ui.ndekocode.dev/r/kbd.json",
    "https://ui.ndekocode.dev/r/motion-word-roll.json",
    "https://ui.ndekocode.dev/r/tabs.json",
    "https://ui.ndekocode.dev/r/textarea.json",
    "https://ui.ndekocode.dev/r/theme.json",
    "https://ui.ndekocode.dev/r/use-prefers-reduced-motion.json",
    "https://ui.ndekocode.dev/r/utils.json"
  ],
  "files": [
    {
      "path": "registry/ndeko/blocks/task-detail/task-detail-04/index.tsx",
      "content": "'use client';\n\nimport { useEffect, useRef, useState } from 'react';\n\nimport { ChevronRightIcon } from '@/registry/ndeko/lib/icons';\nimport { cn } from '@/registry/ndeko/lib/utils';\nimport { Tabs, TabsList, TabsTab } from '@/registry/ndeko/ui/tabs';\n\nimport { ConversationPane, type Typing } from './conversation-pane';\nimport {\n  COMMENTS,\n  EVENTS,\n  LATER_REPLIES,\n  NOW,\n  SUBTASKS,\n  TASK,\n  type TaskComment,\n} from './data';\nimport { RollingCount } from './motion-parts';\nimport { SubtaskPanel } from './subtask-panel';\nimport {\n  PeopleStack,\n  ProgressRing,\n  STATUS_NAME,\n  StatusGlyph,\n} from './work-glyphs';\nimport {\n  addedSubtask,\n  doneCountOf,\n  dueLabelOf,\n  nextSeq,\n  personOf,\n  postedComment,\n  toggledSubtask,\n  withComment,\n  type WorkState,\n} from './work-model';\n\ntype Pane = 'task' | 'conversation';\n\nconst TYPING_STARTS_AFTER_MS = 900;\n\nconst TYPING_LASTS_MS = 2600;\n\nconst FIRST_STATE: WorkState = {\n  subtasks: SUBTASKS,\n  comments: COMMENTS,\n  events: EVENTS,\n};\n\nfunction isPane(value: unknown): value is Pane {\n  const isTask = value === 'task';\n  const isConversation = value === 'conversation';\n  return isTask || isConversation;\n}\n\nfunction FactsLine() {\n  const people = TASK.assigneeIds.map(personOf);\n  const firstNames = people.map((person) => person.firstName);\n  const assigneeNames = firstNames.join(' and ');\n\n  return (\n    <dl className='mt-4 grid grid-cols-[6.5rem_minmax(0,1fr)] gap-x-3 gap-y-2.5 text-[13px]'>\n      <dt className='text-muted-foreground'>Status</dt>\n      <dd className='flex items-center gap-1.5'>\n        <StatusGlyph status={TASK.status} />\n        {STATUS_NAME[TASK.status]}\n      </dd>\n      <dt className='text-muted-foreground'>Assignees</dt>\n      <dd className='flex min-w-0 items-center gap-2'>\n        <PeopleStack people={people} />\n        <span className='truncate'>{assigneeNames}</span>\n      </dd>\n      <dt className='text-muted-foreground'>Due</dt>\n      <dd className='tabular-nums'>{dueLabelOf(TASK.due)}</dd>\n    </dl>\n  );\n}\n\nexport default function TaskDetail04() {\n  const [work, setWork] = useState<WorkState>(FIRST_STATE);\n  const [typing, setTyping] = useState<Typing | null>(null);\n  const [repliesUsed, setRepliesUsed] = useState(0);\n  const [pane, setPane] = useState<Pane>('task');\n  const timers = useRef(new Set<ReturnType<typeof setTimeout>>());\n  const doneCount = doneCountOf(work.subtasks);\n  const total = work.subtasks.length;\n  const hidesTask = pane !== 'task';\n  const hidesConversation = pane !== 'conversation';\n\n  useEffect(() => {\n    const pending = timers.current;\n    return () => {\n      pending.forEach((timer) => clearTimeout(timer));\n    };\n  }, []);\n\n  function later(run: () => void, delay: number) {\n    const timer = setTimeout(() => {\n      timers.current.delete(timer);\n      run();\n    }, delay);\n    timers.current.add(timer);\n  }\n\n  function answer(reply: TaskComment, replyIndex: number) {\n    const typingId = `reply-${replyIndex}`;\n    later(() => {\n      setTyping({ id: typingId, authorId: reply.authorId });\n      later(() => {\n        const arrived: TaskComment = {\n          ...reply,\n          id: typingId,\n          at: NOW,\n          seq: nextSeq(),\n        };\n        setTyping(null);\n        setWork((current) => withComment(current, arrived));\n      }, TYPING_LASTS_MS);\n    }, TYPING_STARTS_AFTER_MS);\n  }\n\n  function post(body: string) {\n    setWork((current) => postedComment(current, body));\n    const reply = LATER_REPLIES[repliesUsed];\n    if (!reply) {\n      return;\n    }\n    setRepliesUsed((current) => current + 1);\n    answer(reply, repliesUsed);\n  }\n\n  function changePane(value: unknown) {\n    if (isPane(value)) {\n      setPane(value);\n    }\n  }\n\n  return (\n    <div className='bg-background text-foreground min-h-svh px-4 py-6 sm:px-8 lg:py-8'>\n      <div className='mx-auto max-w-6xl'>\n        <Tabs\n          value={pane}\n          onValueChange={changePane}\n          className='mb-5 lg:hidden'\n        >\n          <TabsList variant='segmented' aria-label='Part of the task to show'>\n            <TabsTab value='task'>Task</TabsTab>\n            <TabsTab value='conversation'>\n              Conversation\n              <RollingCount\n                value={work.comments.length}\n                className='text-muted-foreground text-xs'\n              />\n            </TabsTab>\n          </TabsList>\n        </Tabs>\n        <div className='grid gap-8 lg:grid-cols-[minmax(0,1fr)_24rem] lg:items-start'>\n          <main className={cn('min-w-0', hidesTask && 'max-lg:hidden')}>\n            <nav\n              aria-label='Breadcrumb'\n              className='text-muted-foreground flex items-center gap-1 text-xs'\n            >\n              <span>{TASK.project}</span>\n              <ChevronRightIcon className='size-3' />\n              <span className='tabular-nums'>{TASK.key}</span>\n            </nav>\n            <h1 className='mt-2 text-xl font-semibold text-balance sm:text-2xl'>\n              {TASK.title}\n            </h1>\n            <FactsLine />\n            <section aria-label='Description' className='mt-8'>\n              <h2 className='text-sm font-medium'>Description</h2>\n              <p className='mt-2 text-[13px] leading-relaxed'>\n                {TASK.description}\n              </p>\n            </section>\n            <section aria-label='Sub-tasks' className='mt-8'>\n              <div className='flex items-center gap-2 px-2'>\n                <h2 className='text-sm font-medium'>Sub-tasks</h2>\n                <span className='text-muted-foreground flex items-center gap-1.5 text-xs font-medium'>\n                  <ProgressRing done={doneCount} total={total} />\n                  <span aria-hidden='true' className='flex tabular-nums'>\n                    <RollingCount value={doneCount} />/\n                    <RollingCount value={total} />\n                  </span>\n                  <span className='sr-only'>\n                    {doneCount} of {total} done\n                  </span>\n                </span>\n              </div>\n              <div className='mt-2'>\n                <SubtaskPanel\n                  subtasks={work.subtasks}\n                  onToggle={(subtaskId) =>\n                    setWork((current) => toggledSubtask(current, subtaskId))\n                  }\n                  onAdd={(title) =>\n                    setWork((current) => addedSubtask(current, title))\n                  }\n                />\n              </div>\n            </section>\n          </main>\n          <ConversationPane\n            comments={work.comments}\n            events={work.events}\n            typing={typing}\n            onPost={post}\n            className={cn(\n              'max-lg:min-h-[28rem] lg:sticky lg:top-8 lg:h-[calc(100svh-4rem)]',\n              hidesConversation && 'max-lg:hidden'\n            )}\n          />\n        </div>\n      </div>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/task-detail-04/index.tsx"
    },
    {
      "path": "registry/ndeko/blocks/task-detail/task-detail-04/conversation-pane.tsx",
      "content": "'use client';\n\nimport { AnimatePresence, motion } from 'motion/react';\nimport { useEffect, useRef } from 'react';\n\nimport { WordRoll } from '@/components/core/word-roll';\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\nimport { cn } from '@/registry/ndeko/lib/utils';\nimport { AnimatedSize } from '@/registry/ndeko/ui/animated-size';\n\nimport { CommentComposer } from './comment-composer';\nimport { NOW, type TaskComment, type WorkEvent } from './data';\nimport { ENTER, EXIT, heightPresenceOf, RollingCount } from './motion-parts';\nimport { CommentText, EventGlyph, PersonAvatar } from './work-glyphs';\nimport { actorNameOf, clockOf, personOf, relativeTimeOf } from './work-model';\n\nexport type Typing = {\n  id: string;\n  authorId: string;\n};\n\ntype CommentItem = {\n  kind: 'comment';\n  id: string;\n  at: string;\n  seq: number;\n  comment: TaskComment;\n  isTyping: boolean;\n};\n\ntype EventItem = {\n  kind: 'event';\n  id: string;\n  at: string;\n  seq: number;\n  event: WorkEvent;\n};\n\ntype ConversationItem = CommentItem | EventItem;\n\nconst DOT_DELAYS = [0, 0.15, 0.3];\n\nconst FADE_PRESENCE = {\n  initial: { opacity: 0 },\n  animate: { opacity: 1 },\n  exit: { opacity: 0, transition: EXIT },\n  transition: ENTER,\n};\n\nfunction commentItemOf(comment: TaskComment): ConversationItem {\n  return {\n    kind: 'comment',\n    id: comment.id,\n    at: comment.at,\n    seq: comment.seq ?? 0,\n    comment,\n    isTyping: false,\n  };\n}\n\nfunction eventItemOf(event: WorkEvent): ConversationItem {\n  return {\n    kind: 'event',\n    id: event.id,\n    at: event.at,\n    seq: event.seq ?? 0,\n    event,\n  };\n}\n\nfunction typingItemOf(typing: Typing): ConversationItem {\n  const placeholder: TaskComment = {\n    id: typing.id,\n    authorId: typing.authorId,\n    at: NOW,\n    body: '',\n  };\n  return {\n    kind: 'comment',\n    id: typing.id,\n    at: NOW,\n    seq: Number.MAX_SAFE_INTEGER,\n    comment: placeholder,\n    isTyping: true,\n  };\n}\n\nfunction isShownEvent(event: WorkEvent) {\n  return event.kind !== 'comment';\n}\n\nfunction byTimeThenOrder(first: ConversationItem, second: ConversationItem) {\n  const byTime = first.at.localeCompare(second.at);\n  if (byTime !== 0) {\n    return byTime;\n  }\n  return first.seq - second.seq;\n}\n\n/** Comments and the changes made around them, in the order they happened. */\nfunction itemsOf(\n  comments: TaskComment[],\n  events: WorkEvent[],\n  typing: Typing | null\n) {\n  const commentItems = comments.map(commentItemOf);\n  const shownEvents = events.filter(isShownEvent);\n  const eventItems = shownEvents.map(eventItemOf);\n  const items = [...commentItems, ...eventItems];\n  if (typing) {\n    items.push(typingItemOf(typing));\n  }\n  return items.sort(byTimeThenOrder);\n}\n\nfunction TypingDots() {\n  const shouldReduceMotion = usePrefersReducedMotion();\n  if (shouldReduceMotion) {\n    return (\n      <span aria-hidden='true' className='flex gap-1'>\n        {DOT_DELAYS.map((delay) => (\n          <span\n            key={delay}\n            className='bg-muted-foreground/60 size-1.5 rounded-full'\n          />\n        ))}\n      </span>\n    );\n  }\n  return (\n    <span aria-hidden='true' className='flex gap-1'>\n      {DOT_DELAYS.map((delay) => (\n        <motion.span\n          key={delay}\n          animate={{ opacity: [0.25, 1, 0.25] }}\n          transition={{\n            duration: 1.2,\n            delay,\n            repeat: Infinity,\n            ease: 'linear',\n          }}\n          className='bg-muted-foreground size-1.5 rounded-full'\n        />\n      ))}\n    </span>\n  );\n}\n\nfunction contentKeyOf(item: CommentItem) {\n  if (item.isTyping) {\n    return 'typing';\n  }\n  return 'comment';\n}\n\n/** One row that holds the typing state, then becomes the comment once it is sent. */\nfunction CommentEntry({ item }: { item: CommentItem }) {\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const person = personOf(item.comment.authorId);\n\n  return (\n    <motion.li\n      {...heightPresenceOf(shouldReduceMotion)}\n      className='overflow-hidden'\n    >\n      <div className='flex gap-3 py-2'>\n        <PersonAvatar person={person} className='size-7 text-[10px]' />\n        <AnimatedSize className='min-w-0 flex-1'>\n          <motion.div\n            key={contentKeyOf(item)}\n            initial={{ opacity: 0 }}\n            animate={{ opacity: 1 }}\n            transition={ENTER}\n          >\n            {item.isTyping && (\n              <p className='text-muted-foreground flex min-h-7 items-center gap-2 text-xs'>\n                <TypingDots />\n                {person.firstName} is typing\n              </p>\n            )}\n            {!item.isTyping && (\n              <>\n                <p className='flex min-h-7 items-center gap-1.5 text-[13px]'>\n                  <span className='truncate font-medium'>\n                    {actorNameOf(item.comment.authorId)}\n                  </span>\n                  <span aria-hidden='true' className='text-muted-foreground'>\n                    ·\n                  </span>\n                  <time\n                    dateTime={item.at}\n                    className='text-muted-foreground shrink-0 text-xs tabular-nums'\n                  >\n                    {relativeTimeOf(item.at)}\n                  </time>\n                </p>\n                <CommentText body={item.comment.body} />\n              </>\n            )}\n          </motion.div>\n        </AnimatedSize>\n      </div>\n    </motion.li>\n  );\n}\n\nfunction EventLine({ item }: { item: EventItem }) {\n  return (\n    <motion.li {...FADE_PRESENCE} className='flex gap-3 py-1.5 ps-0.5'>\n      <EventGlyph kind={item.event.kind} className='size-6' />\n      <p className='text-muted-foreground min-w-0 flex-1 pt-0.5 text-xs leading-5'>\n        <span className='text-foreground font-medium'>\n          {actorNameOf(item.event.actorId)}\n        </span>{' '}\n        {item.event.text}\n        <time dateTime={item.at} className='ms-1.5 tabular-nums'>\n          {clockOf(item.at)}\n        </time>\n      </p>\n    </motion.li>\n  );\n}\n\nfunction scrollBehaviorOf(shouldReduceMotion: boolean | null): ScrollBehavior {\n  if (shouldReduceMotion) {\n    return 'auto';\n  }\n  return 'smooth';\n}\n\nfunction commentWordOf(count: number) {\n  if (count === 1) {\n    return 'comment';\n  }\n  return 'comments';\n}\n\ntype ConversationPaneProps = {\n  comments: TaskComment[];\n  events: WorkEvent[];\n  typing: Typing | null;\n  onPost: (body: string) => void;\n  className?: string;\n};\n\nexport function ConversationPane({\n  comments,\n  events,\n  typing,\n  onPost,\n  className,\n}: ConversationPaneProps) {\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const scrollRef = useRef<HTMLDivElement>(null);\n  const hasScrolled = useRef(false);\n  const items = itemsOf(comments, events, typing);\n  const itemCount = items.length;\n  const commentCount = comments.length;\n  const commentWord = commentWordOf(commentCount);\n\n  useEffect(() => {\n    const area = scrollRef.current;\n    if (!area) {\n      return;\n    }\n    if (!hasScrolled.current) {\n      hasScrolled.current = true;\n      area.scrollTop = area.scrollHeight;\n      return;\n    }\n    area.scrollTo({\n      top: area.scrollHeight,\n      behavior: scrollBehaviorOf(shouldReduceMotion),\n    });\n  }, [itemCount, shouldReduceMotion]);\n\n  return (\n    <aside\n      aria-label='Conversation'\n      className={cn(\n        'bg-card hairline-ring ring-border flex min-h-0 flex-col rounded-xl shadow-[0_1px_2px_rgb(0_0_0/0.04)]',\n        className\n      )}\n    >\n      <header className='flex items-baseline justify-between gap-3 px-4 pt-4'>\n        <h2 className='text-sm font-medium'>Conversation</h2>\n        <p className='text-muted-foreground text-xs'>\n          <RollingCount value={commentCount} />{' '}\n          <WordRoll text={commentWord} value={commentCount} />\n        </p>\n      </header>\n      <div\n        ref={scrollRef}\n        className='min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 py-2'\n      >\n        <ul aria-live='polite'>\n          <AnimatePresence initial={false}>\n            {items.map((item) => {\n              if (item.kind === 'event') {\n                return <EventLine key={item.id} item={item} />;\n              }\n              return <CommentEntry key={item.id} item={item} />;\n            })}\n          </AnimatePresence>\n        </ul>\n      </div>\n      <CommentComposer\n        onSubmit={onPost}\n        placeholder='Write to the team'\n        className='px-4 pt-2 pb-4'\n      />\n    </aside>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/task-detail-04/conversation-pane.tsx"
    },
    {
      "path": "registry/ndeko/blocks/task-detail/task-detail-04/subtask-panel.tsx",
      "content": "'use client';\n\nimport { AnimatePresence, motion } from 'motion/react';\nimport { useState } from 'react';\n\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\nimport { PlusIcon } from '@/registry/ndeko/lib/icons';\nimport { cn } from '@/registry/ndeko/lib/utils';\nimport { Checkbox } from '@/registry/ndeko/ui/checkbox';\nimport { Kbd } from '@/registry/ndeko/ui/kbd';\n\nimport type { Subtask } from './data';\nimport { heightPresenceOf } from './motion-parts';\nimport { PersonAvatar, StrikeTitle } from './work-glyphs';\nimport { keyOf, personOf } from './work-model';\n\nfunction SubtaskRow({\n  subtask,\n  onToggle,\n}: {\n  subtask: Subtask;\n  onToggle: () => void;\n}) {\n  const shouldReduceMotion = usePrefersReducedMotion();\n\n  return (\n    <motion.li\n      {...heightPresenceOf(shouldReduceMotion)}\n      className='overflow-hidden'\n    >\n      <label className='hover:bg-foreground/[0.03] flex h-9 cursor-pointer items-center gap-3 rounded-lg px-2'>\n        <Checkbox checked={subtask.isDone} onCheckedChange={onToggle} />\n        <span className='text-muted-foreground hidden w-16 shrink-0 text-xs tabular-nums sm:inline'>\n          {keyOf(subtask.number)}\n        </span>\n        <StrikeTitle\n          title={subtask.title}\n          isDone={subtask.isDone}\n          className='flex-1'\n        />\n        {subtask.assigneeId && (\n          <PersonAvatar\n            person={personOf(subtask.assigneeId)}\n            className='size-5 text-[9px]'\n          />\n        )}\n      </label>\n    </motion.li>\n  );\n}\n\ntype SubtaskPanelProps = {\n  subtasks: Subtask[];\n  onToggle: (subtaskId: string) => void;\n  onAdd: (title: string) => void;\n};\n\nexport function SubtaskPanel({ subtasks, onToggle, onAdd }: SubtaskPanelProps) {\n  const [title, setTitle] = useState('');\n  const trimmed = title.trim();\n  const canAdd = trimmed.length > 0;\n\n  function add(event: React.FormEvent<HTMLFormElement>) {\n    event.preventDefault();\n    if (!canAdd) {\n      return;\n    }\n    onAdd(trimmed);\n    setTitle('');\n  }\n\n  function handleKeyDown(event: React.KeyboardEvent<HTMLInputElement>) {\n    if (event.key === 'Escape') {\n      setTitle('');\n    }\n  }\n\n  return (\n    <div className='flex flex-col gap-1'>\n      <ul>\n        <AnimatePresence initial={false}>\n          {subtasks.map((subtask) => (\n            <SubtaskRow\n              key={subtask.id}\n              subtask={subtask}\n              onToggle={() => onToggle(subtask.id)}\n            />\n          ))}\n        </AnimatePresence>\n      </ul>\n      <form\n        onSubmit={add}\n        className='hairline-border border-foreground/20 focus-within:border-foreground/35 flex h-9 items-center gap-3 rounded-lg border-dashed ps-2 pe-1.5 transition-colors'\n      >\n        <PlusIcon className='text-muted-foreground size-4 shrink-0' />\n        <input\n          value={title}\n          onChange={(event) => setTitle(event.target.value)}\n          onKeyDown={handleKeyDown}\n          aria-label='New sub-task title'\n          placeholder='Add a sub-task'\n          className='placeholder:text-muted-foreground/75 h-8 min-w-0 flex-1 bg-transparent text-base outline-none md:text-[13px]'\n        />\n        <Kbd\n          aria-hidden='true'\n          className={cn(\n            'transition-opacity duration-150',\n            !canAdd && 'opacity-0'\n          )}\n        >\n          Enter\n        </Kbd>\n        <button type='submit' className='sr-only'>\n          Add sub-task\n        </button>\n      </form>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/task-detail-04/subtask-panel.tsx"
    },
    {
      "path": "registry/ndeko/blocks/task-detail/task-detail-04/comment-composer.tsx",
      "content": "'use client';\n\nimport { useState } from 'react';\n\nimport { cn } from '@/registry/ndeko/lib/utils';\nimport { Button } from '@/registry/ndeko/ui/button';\nimport { Textarea } from '@/registry/ndeko/ui/textarea';\n\nimport { PersonAvatar } from './work-glyphs';\nimport { currentUser } from './work-model';\n\ntype CommentComposerProps = {\n  onSubmit: (body: string) => void;\n  placeholder?: string;\n  className?: string;\n};\n\nfunction isSendKey(event: React.KeyboardEvent<HTMLTextAreaElement>) {\n  const isCommand = event.metaKey || event.ctrlKey;\n  return isCommand && event.key === 'Enter';\n}\n\nexport function CommentComposer({\n  onSubmit,\n  placeholder = 'Leave a comment',\n  className,\n}: CommentComposerProps) {\n  const [body, setBody] = useState('');\n  const me = currentUser();\n  const trimmed = body.trim();\n  const canSend = trimmed.length > 0;\n\n  function submit() {\n    if (!canSend) {\n      return;\n    }\n    onSubmit(trimmed);\n    setBody('');\n  }\n\n  function handleSubmit(event: React.FormEvent<HTMLFormElement>) {\n    event.preventDefault();\n    submit();\n  }\n\n  function handleKeyDown(event: React.KeyboardEvent<HTMLTextAreaElement>) {\n    if (isSendKey(event)) {\n      event.preventDefault();\n      submit();\n      return;\n    }\n    if (event.key === 'Escape') {\n      event.stopPropagation();\n      event.currentTarget.blur();\n    }\n  }\n\n  return (\n    <form\n      onSubmit={handleSubmit}\n      className={cn('flex items-start gap-3', className)}\n    >\n      <PersonAvatar person={me} className='mt-1 size-7 text-[10px]' />\n      <div className='relative min-w-0 flex-1'>\n        <Textarea\n          value={body}\n          onChange={(event) => setBody(event.target.value)}\n          onKeyDown={handleKeyDown}\n          rows={1}\n          aria-label={`Comment as ${me.name}`}\n          placeholder={placeholder}\n          className='min-h-9 py-2 pe-24'\n        />\n        <Button\n          type='submit'\n          size='sm'\n          disabled={!canSend}\n          className='absolute end-1 bottom-1'\n        >\n          Comment\n        </Button>\n      </div>\n    </form>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/task-detail-04/comment-composer.tsx"
    },
    {
      "path": "registry/ndeko/blocks/task-detail/task-detail-04/work-glyphs.tsx",
      "content": "import {\n  CheckIcon,\n  CircleDashedIcon,\n  ClockIcon,\n  ListTreeIcon,\n  MessageCircleIcon,\n  PlusIcon,\n  UserIcon,\n  type Icon,\n} from '@/registry/ndeko/lib/icons';\nimport { cn } from '@/registry/ndeko/lib/utils';\nimport { Avatar } from '@/registry/ndeko/ui/avatar';\n\nimport type { Person, StatusId, WorkEventKind } from './data';\nimport { segmentsOf } from './work-model';\n\nconst STATUS_COLOR: Record<StatusId, string> = {\n  backlog: 'var(--muted-foreground)',\n  todo: 'var(--muted-foreground)',\n  in_progress: 'var(--warning)',\n  in_review: 'var(--primary)',\n  done: 'var(--success)',\n};\n\nexport const STATUS_NAME: Record<StatusId, string> = {\n  backlog: 'Backlog',\n  todo: 'Todo',\n  in_progress: 'In progress',\n  in_review: 'In review',\n  done: 'Done',\n};\n\nconst PIE_RADIUS = 2;\n\nconst PIE_CIRCUMFERENCE = 2 * Math.PI * PIE_RADIUS;\n\nfunction StartedShape({ share }: { share: number }) {\n  const filled = share * PIE_CIRCUMFERENCE;\n  return (\n    <>\n      <circle cx='7' cy='7' r='6' stroke='currentColor' strokeWidth='1.5' />\n      <circle\n        cx='7'\n        cy='7'\n        r={PIE_RADIUS}\n        stroke='currentColor'\n        strokeWidth={PIE_RADIUS * 2}\n        strokeDasharray={`${filled} ${PIE_CIRCUMFERENCE}`}\n        transform='rotate(-90 7 7)'\n      />\n    </>\n  );\n}\n\nfunction statusShapeOf(status: StatusId) {\n  if (status === 'backlog') {\n    return (\n      <circle\n        cx='7'\n        cy='7'\n        r='6'\n        stroke='currentColor'\n        strokeWidth='1.5'\n        strokeDasharray='1.6 1.9'\n      />\n    );\n  }\n  if (status === 'todo') {\n    return (\n      <circle cx='7' cy='7' r='6' stroke='currentColor' strokeWidth='1.5' />\n    );\n  }\n  if (status === 'in_progress') {\n    return <StartedShape share={0.5} />;\n  }\n  if (status === 'in_review') {\n    return <StartedShape share={0.75} />;\n  }\n  return (\n    <>\n      <circle cx='7' cy='7' r='7' fill='currentColor' />\n      <path\n        d='M4.4 7.2 6.2 9l3.4-3.8'\n        stroke='var(--card)'\n        strokeWidth='1.6'\n        strokeLinecap='round'\n        strokeLinejoin='round'\n      />\n    </>\n  );\n}\n\nexport function StatusGlyph({\n  status,\n  className,\n}: {\n  status: StatusId;\n  className?: string;\n}) {\n  const glyphStyle = { color: STATUS_COLOR[status] } as React.CSSProperties;\n  return (\n    <svg\n      viewBox='0 0 14 14'\n      fill='none'\n      aria-hidden='true'\n      style={glyphStyle}\n      className={cn('size-3.5 shrink-0', className)}\n    >\n      {statusShapeOf(status)}\n    </svg>\n  );\n}\n\nexport function PersonAvatar({\n  person,\n  className,\n}: {\n  person: Person;\n  className?: string;\n}) {\n  return (\n    <Avatar\n      className={cn('size-6 text-[10px]', className)}\n      seed={person.name}\n    />\n  );\n}\n\nexport function PeopleStack({\n  people,\n  ringClassName = 'ring-background',\n}: {\n  people: Person[];\n  ringClassName?: string;\n}) {\n  return (\n    <span className='flex items-center -space-x-1.5'>\n      {people.map((person) => (\n        <PersonAvatar\n          key={person.id}\n          person={person}\n          className={cn('size-5 text-[9px] ring-2', ringClassName)}\n        />\n      ))}\n    </span>\n  );\n}\n\nconst RING_RADIUS = 6.5;\n\nconst RING_LENGTH = 2 * Math.PI * RING_RADIUS;\n\nfunction shareOf(done: number, total: number) {\n  if (total === 0) {\n    return 0;\n  }\n  return done / total;\n}\n\nexport function ProgressRing({ done, total }: { done: number; total: number }) {\n  const share = shareOf(done, total);\n  const isComplete = total > 0 && done === total;\n  const dashOffset = RING_LENGTH * (1 - share);\n  return (\n    <svg viewBox='0 0 16 16' aria-hidden='true' className='size-4 -rotate-90'>\n      <circle\n        cx='8'\n        cy='8'\n        r={RING_RADIUS}\n        fill='none'\n        strokeWidth='2'\n        className='stroke-foreground/10'\n      />\n      <circle\n        cx='8'\n        cy='8'\n        r={RING_RADIUS}\n        fill='none'\n        strokeWidth='2'\n        strokeLinecap='round'\n        strokeDasharray={RING_LENGTH}\n        strokeDashoffset={dashOffset}\n        className={cn(\n          'stroke-primary transition-[stroke-dashoffset,stroke] duration-300 ease-(--ease-out-strong)',\n          isComplete && 'stroke-success'\n        )}\n      />\n    </svg>\n  );\n}\n\n/** A title struck from left to right when its sub-task is done. */\nexport function StrikeTitle({\n  title,\n  isDone,\n  className,\n}: {\n  title: string;\n  isDone: boolean;\n  className?: string;\n}) {\n  return (\n    <span\n      className={cn(\n        'relative min-w-0 truncate text-[13px] transition-colors duration-200',\n        isDone && 'text-muted-foreground',\n        className\n      )}\n    >\n      {title}\n      <span\n        aria-hidden='true'\n        className={cn(\n          'bg-foreground/35 pointer-events-none absolute inset-x-0 top-1/2 h-px origin-left scale-x-0 transition-transform duration-200 ease-(--ease-out-strong)',\n          isDone && 'scale-x-100'\n        )}\n      />\n    </span>\n  );\n}\n\nconst EVENT_ICON: Record<WorkEventKind, Icon> = {\n  created: PlusIcon,\n  status: CircleDashedIcon,\n  assignee: UserIcon,\n  estimate: ClockIcon,\n  subtask: ListTreeIcon,\n  comment: MessageCircleIcon,\n};\n\nexport function EventGlyph({\n  kind,\n  className,\n}: {\n  kind: WorkEventKind;\n  className?: string;\n}) {\n  const Glyph = EVENT_ICON[kind];\n  return (\n    <span\n      className={cn(\n        'keycap-3d text-muted-foreground relative flex size-6 shrink-0 items-center justify-center rounded-full [&_svg]:size-3',\n        className\n      )}\n    >\n      <Glyph />\n    </span>\n  );\n}\n\nexport function DoneMark() {\n  return (\n    <span className='bg-success/15 text-success-foreground flex size-4 items-center justify-center rounded-full'>\n      <CheckIcon strokeWidth={3} className='size-2.5' />\n    </span>\n  );\n}\n\nexport function CommentText({\n  body,\n  className,\n}: {\n  body: string;\n  className?: string;\n}) {\n  const segments = segmentsOf(body);\n  return (\n    <p\n      className={cn(\n        'text-[13px] leading-5 [overflow-wrap:anywhere] whitespace-pre-wrap',\n        className\n      )}\n    >\n      {segments.map((segment, index) => {\n        const key = `${index}-${segment.text}`;\n        if (segment.isMention) {\n          return (\n            <span\n              key={key}\n              className='bg-primary/10 text-primary-ink dark:bg-primary/20 rounded-[4px] px-0.5 font-medium'\n            >\n              {segment.text}\n            </span>\n          );\n        }\n        return <span key={key}>{segment.text}</span>;\n      })}\n    </p>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/task-detail-04/work-glyphs.tsx"
    },
    {
      "path": "registry/ndeko/blocks/task-detail/task-detail-04/motion-parts.tsx",
      "content": "'use client';\n\nimport {\n  AnimatePresence,\n  motion,\n  type MotionProps,\n  type Transition,\n  type Variants,\n} from 'motion/react';\nimport { useState } from 'react';\n\nimport { usePrefersReducedMotion } from '@/registry/ndeko/hooks/use-prefers-reduced-motion';\nimport { cn } from '@/registry/ndeko/lib/utils';\n\nexport const EASE_OUT_STRONG: [number, number, number, number] = [\n  0.23, 1, 0.32, 1,\n];\n\nexport const ENTER: Transition = { duration: 0.2, ease: EASE_OUT_STRONG };\n\nexport const EXIT: Transition = { duration: 0.15, ease: EASE_OUT_STRONG };\n\nexport type PresenceProps = Pick<\n  MotionProps,\n  'initial' | 'animate' | 'exit' | 'transition'\n>;\n\nconst HEIGHT_PRESENCE: PresenceProps = {\n  initial: { height: 0, opacity: 0 },\n  animate: { height: 'auto', opacity: 1 },\n  exit: { height: 0, opacity: 0, transition: EXIT },\n  transition: ENTER,\n};\n\nconst FADE_PRESENCE: PresenceProps = {\n  initial: { opacity: 0 },\n  animate: { opacity: 1 },\n  exit: { opacity: 0, transition: EXIT },\n  transition: ENTER,\n};\n\n/** Rows that arrive or leave a list: their height opens and closes so the rows after them slide. */\nexport function heightPresenceOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return FADE_PRESENCE;\n  }\n  return HEIGHT_PRESENCE;\n}\n\nconst SWAP_TRANSITION: Transition = { duration: 0.15, ease: EASE_OUT_STRONG };\n\nconst SWAP_VARIANTS: Variants = {\n  hidden: { opacity: 0, scale: 0.6, filter: 'blur(2px)' },\n  shown: { opacity: 1, scale: 1, filter: 'blur(0px)' },\n};\n\nconst FADE_VARIANTS: Variants = {\n  hidden: { opacity: 0 },\n  shown: { opacity: 1 },\n};\n\nfunction swapVariantsOf(shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return FADE_VARIANTS;\n  }\n  return SWAP_VARIANTS;\n}\n\ntype SwapProps = {\n  swapKey: string;\n  children: React.ReactNode;\n  className?: string;\n};\n\n/** An icon or a short label that becomes another one in place. */\nexport function Swap({ swapKey, children, className }: SwapProps) {\n  const shouldReduceMotion = usePrefersReducedMotion();\n\n  return (\n    <span className={cn('relative inline-flex', className)}>\n      <AnimatePresence mode='popLayout' initial={false}>\n        <motion.span\n          key={swapKey}\n          variants={swapVariantsOf(shouldReduceMotion)}\n          initial='hidden'\n          animate='shown'\n          exit='hidden'\n          transition={SWAP_TRANSITION}\n          className='inline-flex'\n        >\n          {children}\n        </motion.span>\n      </AnimatePresence>\n    </span>\n  );\n}\n\nconst COUNT_SLIDE = 8;\n\nconst COUNT_TRANSITION: Transition = { duration: 0.18, ease: EASE_OUT_STRONG };\n\nconst COUNT_VARIANTS: Variants = {\n  enter: (offset: number) => ({ y: offset, opacity: 0 }),\n  center: { y: 0, opacity: 1 },\n  leave: (offset: number) => ({ y: -offset, opacity: 0 }),\n};\n\nfunction directionOf(previous: number, next: number) {\n  if (next < previous) {\n    return -1;\n  }\n  return 1;\n}\n\nfunction offsetOf(direction: number, shouldReduceMotion: boolean | null) {\n  if (shouldReduceMotion) {\n    return 0;\n  }\n  return direction * COUNT_SLIDE;\n}\n\ntype RollingCountProps = {\n  value: number;\n  /** Writes the value, such as a duration; the digits still roll on the number. */\n  format?: (value: number) => string;\n  className?: string;\n};\n\nfunction plainNumber(value: number) {\n  return String(value);\n}\n\n/** A figure the person just changed: the new digits slide in from the side of the change. */\nexport function RollingCount({\n  value,\n  format = plainNumber,\n  className,\n}: RollingCountProps) {\n  const shouldReduceMotion = usePrefersReducedMotion();\n  const [previous, setPrevious] = useState(value);\n  const [direction, setDirection] = useState(1);\n\n  if (previous !== value) {\n    setDirection(directionOf(previous, value));\n    setPrevious(value);\n  }\n\n  const offset = offsetOf(direction, shouldReduceMotion);\n\n  return (\n    <span\n      className={cn(\n        'relative inline-flex overflow-hidden tabular-nums',\n        className\n      )}\n    >\n      <AnimatePresence mode='popLayout' initial={false} custom={offset}>\n        <motion.span\n          key={value}\n          custom={offset}\n          variants={COUNT_VARIANTS}\n          initial='enter'\n          animate='center'\n          exit='leave'\n          transition={COUNT_TRANSITION}\n          className='inline-block'\n        >\n          {format(value)}\n        </motion.span>\n      </AnimatePresence>\n    </span>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/task-detail-04/motion-parts.tsx"
    },
    {
      "path": "registry/ndeko/blocks/task-detail/task-detail-04/work-model.ts",
      "content": "import {\n  differenceInCalendarDays,\n  differenceInMinutes,\n  format,\n  parseISO,\n} from 'date-fns';\n\nimport {\n  CURRENT_USER_ID,\n  NOW,\n  PEOPLE,\n  TEAM_KEY,\n  type Subtask,\n  type TaskComment,\n  type WorkEvent,\n} from './data';\n\nexport type WorkState = {\n  subtasks: Subtask[];\n  comments: TaskComment[];\n  events: WorkEvent[];\n};\n\nexport type EventDay = {\n  key: string;\n  label: string;\n  events: WorkEvent[];\n};\n\nconst MINUTES_PER_HOUR = 60;\n\nconst FIRST_FREE_NUMBER = 230;\n\nlet createdCount = 0;\n\nexport function nextSeq() {\n  createdCount += 1;\n  return createdCount;\n}\n\nfunction nextIdOf(prefix: string) {\n  return `${prefix}-${nextSeq()}`;\n}\n\nexport function personOf(id: string) {\n  const found = PEOPLE.find((person) => person.id === id);\n  if (found) {\n    return found;\n  }\n  return PEOPLE[0];\n}\n\nexport function currentUser() {\n  return personOf(CURRENT_USER_ID);\n}\n\nexport function actorNameOf(id: string) {\n  if (id === CURRENT_USER_ID) {\n    return 'You';\n  }\n  return personOf(id).name;\n}\n\nexport function keyOf(number: number) {\n  return `${TEAM_KEY}-${number}`;\n}\n\nexport function countLabel(count: number, singular: string, plural: string) {\n  if (count === 1) {\n    return `${count} ${singular}`;\n  }\n  return `${count} ${plural}`;\n}\n\nexport function doneCountOf(subtasks: Subtask[]) {\n  return subtasks.filter((subtask) => subtask.isDone).length;\n}\n\nfunction daysBeforeNow(iso: string) {\n  return differenceInCalendarDays(parseISO(NOW), parseISO(iso));\n}\n\nexport function relativeTimeOf(iso: string) {\n  const minutes = differenceInMinutes(parseISO(NOW), parseISO(iso));\n  if (minutes < 1) {\n    return 'Just now';\n  }\n  if (minutes < MINUTES_PER_HOUR) {\n    return `${minutes}m ago`;\n  }\n  const days = daysBeforeNow(iso);\n  if (days === 0) {\n    const hours = Math.floor(minutes / MINUTES_PER_HOUR);\n    return `${hours}h ago`;\n  }\n  if (days === 1) {\n    return 'Yesterday';\n  }\n  return format(parseISO(iso), 'MMM d');\n}\n\nexport function clockOf(iso: string) {\n  return format(parseISO(iso), 'HH:mm');\n}\n\nexport function dueLabelOf(iso: string) {\n  const days = -daysBeforeNow(iso);\n  if (days === 0) {\n    return 'Due today';\n  }\n  if (days === 1) {\n    return 'Due tomorrow';\n  }\n  if (days > 1) {\n    return `Due in ${days} days`;\n  }\n  return `${Math.abs(days)} days late`;\n}\n\nfunction dayLabelOf(iso: string) {\n  const days = daysBeforeNow(iso);\n  if (days === 0) {\n    return 'Today';\n  }\n  if (days === 1) {\n    return 'Yesterday';\n  }\n  return format(parseISO(iso), 'EEEE, MMM d');\n}\n\n/** Newest day first, newest event first inside each day. */\nexport function eventDaysOf(events: WorkEvent[]) {\n  const sorted = [...events].sort((first, second) =>\n    second.at.localeCompare(first.at)\n  );\n  const days: EventDay[] = [];\n  for (const event of sorted) {\n    const key = event.at.slice(0, 10);\n    const last = days.at(-1);\n    const isSameDay = last?.key === key;\n    if (isSameDay) {\n      last.events.push(event);\n      continue;\n    }\n    days.push({ key, label: dayLabelOf(event.at), events: [event] });\n  }\n  return days;\n}\n\nfunction toggleEventOf(subtask: Subtask): WorkEvent {\n  let verb = 'reopened';\n  if (subtask.isDone) {\n    verb = 'completed';\n  }\n  return {\n    id: `toggle-${subtask.id}`,\n    kind: 'subtask',\n    actorId: CURRENT_USER_ID,\n    at: NOW,\n    text: `${verb} ${keyOf(subtask.number)} ${subtask.title}`,\n    seq: nextSeq(),\n  };\n}\n\n/** A sub-task checked then unchecked in the same visit leaves one line in the log, not two. */\nfunction withEvent(events: WorkEvent[], event: WorkEvent) {\n  const others = events.filter((item) => item.id !== event.id);\n  return [...others, event];\n}\n\nexport function toggledSubtask(state: WorkState, subtaskId: string) {\n  const target = state.subtasks.find((subtask) => subtask.id === subtaskId);\n  if (!target) {\n    return state;\n  }\n  const toggled: Subtask = { ...target, isDone: !target.isDone };\n  const subtasks = state.subtasks.map((subtask) => {\n    if (subtask.id !== subtaskId) {\n      return subtask;\n    }\n    return toggled;\n  });\n  const events = withEvent(state.events, toggleEventOf(toggled));\n  const next: WorkState = { ...state, subtasks, events };\n  return next;\n}\n\nfunction nextNumberOf(subtasks: Subtask[]) {\n  const numbers = subtasks.map((subtask) => subtask.number);\n  return Math.max(FIRST_FREE_NUMBER, ...numbers) + 1;\n}\n\nexport function addedSubtask(state: WorkState, title: string) {\n  const number = nextNumberOf(state.subtasks);\n  const subtask: Subtask = {\n    id: nextIdOf('subtask'),\n    number,\n    title,\n    isDone: false,\n  };\n  const event: WorkEvent = {\n    id: nextIdOf('event'),\n    kind: 'subtask',\n    actorId: CURRENT_USER_ID,\n    at: NOW,\n    text: `added ${keyOf(number)} ${title}`,\n    seq: nextSeq(),\n  };\n  const next: WorkState = {\n    ...state,\n    subtasks: [...state.subtasks, subtask],\n    events: [...state.events, event],\n  };\n  return next;\n}\n\nexport function postedComment(state: WorkState, body: string) {\n  const comment: TaskComment = {\n    id: nextIdOf('comment'),\n    authorId: CURRENT_USER_ID,\n    at: NOW,\n    body,\n    seq: nextSeq(),\n  };\n  return withComment(state, comment);\n}\n\nexport function withComment(state: WorkState, comment: TaskComment) {\n  const event: WorkEvent = {\n    id: nextIdOf('event'),\n    kind: 'comment',\n    actorId: comment.authorId,\n    at: comment.at,\n    text: 'commented',\n    seq: comment.seq,\n  };\n  const next: WorkState = {\n    ...state,\n    comments: [...state.comments, comment],\n    events: [...state.events, event],\n  };\n  return next;\n}\n\nexport type Segment = {\n  text: string;\n  isMention: boolean;\n};\n\nconst MENTION_TOKENS = PEOPLE.map((person) => `@${person.name}`);\n\nfunction pushPlain(segments: Segment[], text: string) {\n  if (text.length === 0) {\n    return;\n  }\n  segments.push({ text, isMention: false });\n}\n\n/** Splits a comment into plain text and mentions of known people, written \"@First Last\". */\nexport function segmentsOf(text: string) {\n  const segments: Segment[] = [];\n  let plain = '';\n  let index = 0;\n  while (index < text.length) {\n    const token = MENTION_TOKENS.find((candidate) =>\n      text.startsWith(candidate, index)\n    );\n    if (token) {\n      pushPlain(segments, plain);\n      segments.push({ text: token, isMention: true });\n      plain = '';\n      index += token.length;\n      continue;\n    }\n    plain += text[index];\n    index += 1;\n  }\n  pushPlain(segments, plain);\n  return segments;\n}\n",
      "type": "registry:component",
      "target": "components/blocks/task-detail-04/work-model.ts"
    },
    {
      "path": "registry/ndeko/blocks/task-detail/task-detail-04/data.ts",
      "content": "export type StatusId =\n  'backlog' | 'todo' | 'in_progress' | 'in_review' | 'done';\n\nexport type Person = {\n  id: string;\n  name: string;\n  firstName: string;\n};\n\nexport type Subtask = {\n  id: string;\n  number: number;\n  title: string;\n  isDone: boolean;\n  assigneeId?: string;\n};\n\nexport type TaskComment = {\n  id: string;\n  authorId: string;\n  at: string;\n  body: string;\n  /** Order of what was added during the visit, which all shares the same time. */\n  seq?: number;\n};\n\nexport type WorkEventKind =\n  'created' | 'status' | 'assignee' | 'estimate' | 'subtask' | 'comment';\n\nexport type WorkEvent = {\n  id: string;\n  kind: WorkEventKind;\n  actorId: string;\n  at: string;\n  text: string;\n  seq?: number;\n};\n\nexport type Task = {\n  key: string;\n  title: string;\n  project: string;\n  status: StatusId;\n  assigneeIds: string[];\n  due: string;\n  description: string;\n};\n\n/** The previews read every time against one fixed moment, so the server and the browser print the same labels. */\nexport const NOW = '2026-11-05T11:00:00';\n\nexport const TEAM_KEY = 'MOS';\n\nexport const CURRENT_USER_ID = 'amara';\n\nexport const PEOPLE: Person[] = [\n  {\n    id: 'amara',\n    name: 'Amara Okafor',\n    firstName: 'Amara',\n  },\n  {\n    id: 'leo',\n    name: 'Léo Martin',\n    firstName: 'Léo',\n  },\n  {\n    id: 'sana',\n    name: 'Sana Iqbal',\n    firstName: 'Sana',\n  },\n  {\n    id: 'tomas',\n    name: 'Tomás Rivera',\n    firstName: 'Tomás',\n  },\n  {\n    id: 'mei',\n    name: 'Mei Lin',\n    firstName: 'Mei',\n  },\n];\n\nexport const TASK: Task = {\n  key: 'MOS-214',\n  title: 'Export invoices as CSV',\n  project: 'Billing',\n  status: 'in_progress',\n  assigneeIds: ['leo', 'tomas'],\n  due: '2026-11-07',\n  description:\n    'Finance copies invoices into the ledger by hand every month. Add an export on the invoices page that writes the filtered range to a CSV file finance can import as it is.',\n};\n\nexport const SUBTASKS: Subtask[] = [\n  {\n    id: 'mos-215',\n    number: 215,\n    title: 'Pick the columns finance needs',\n    isDone: true,\n    assigneeId: 'leo',\n  },\n  {\n    id: 'mos-216',\n    number: 216,\n    title: 'Write the CSV writer with escaped fields',\n    isDone: true,\n    assigneeId: 'leo',\n  },\n  {\n    id: 'mos-218',\n    number: 218,\n    title: 'Add the totals row',\n    isDone: false,\n    assigneeId: 'leo',\n  },\n  {\n    id: 'mos-219',\n    number: 219,\n    title: 'Dates in the account time zone',\n    isDone: false,\n    assigneeId: 'tomas',\n  },\n  {\n    id: 'mos-220',\n    number: 220,\n    title: 'Download button on the invoices page',\n    isDone: false,\n    assigneeId: 'mei',\n  },\n];\n\nexport const COMMENTS: TaskComment[] = [\n  {\n    id: 'c1',\n    authorId: 'sana',\n    at: '2026-11-04T15:20:00',\n    body: 'Should the export include voided invoices? Finance filters them out by hand today.',\n  },\n  {\n    id: 'c2',\n    authorId: 'leo',\n    at: '2026-11-04T16:05:00',\n    body: 'I would keep them with a Status column, so the totals still match the ledger.',\n  },\n  {\n    id: 'c3',\n    authorId: 'tomas',\n    at: '2026-11-05T10:05:00',\n    body: '@Amara Okafor the time zone part is in review. Dates now follow the account setting.',\n  },\n];\n\nexport const EVENTS: WorkEvent[] = [\n  {\n    id: 'e1',\n    kind: 'created',\n    actorId: 'sana',\n    at: '2026-11-03T09:12:00',\n    text: 'created the task',\n  },\n  {\n    id: 'e2',\n    kind: 'assignee',\n    actorId: 'mei',\n    at: '2026-11-04T10:05:00',\n    text: 'assigned Léo and Tomás',\n  },\n  {\n    id: 'e3',\n    kind: 'estimate',\n    actorId: 'leo',\n    at: '2026-11-04T10:20:00',\n    text: 'set the estimate to 6h',\n  },\n  {\n    id: 'e4',\n    kind: 'status',\n    actorId: 'leo',\n    at: '2026-11-04T14:02:00',\n    text: 'moved the task to In progress',\n  },\n  {\n    id: 'e5',\n    kind: 'subtask',\n    actorId: 'leo',\n    at: '2026-11-05T09:40:00',\n    text: 'completed MOS-216 Write the CSV writer with escaped fields',\n  },\n];\n\nexport const LATER_REPLIES: TaskComment[] = [\n  {\n    id: 'later-1',\n    authorId: 'leo',\n    at: NOW,\n    body: 'Thanks, I will fold that into the totals row change.',\n  },\n  {\n    id: 'later-2',\n    authorId: 'tomas',\n    at: NOW,\n    body: 'Noted. I will check it on the October file after lunch.',\n  },\n];\n",
      "type": "registry:component",
      "target": "components/blocks/task-detail-04/data.ts"
    }
  ],
  "categories": [
    "blocks",
    "task-detail"
  ],
  "type": "registry:block"
}