/** * Shared issue row used by every list-style issue surface on mobile — * (tabs)/my-issues, more/issues (workspace-wide), and project detail's * related-issues bucket. * * Layout mirrors web's `packages/views/issues/components/list-row.tsx`: * [status?] priority identifier title … assignee * * `showStatus` is opt-in because the my-issues SectionList already groups * by status (rendering it again per-row would be visual noise). The * project-related-issues view doesn't section by status, so it asks for * the inline status icon. New callers should default to false unless they * mix multiple statuses inside a single ungrouped list. * * Behavioral parity: * - Same `Issue` type, same `assignee_type`/`assignee_id` semantics * (root CLAUDE.md "Data identity must agree"). * - Mirrors web `packages/views/issues/components/list-row.tsx:52`: * render the assignee whenever `assignee_type && assignee_id` are both * truthy — `ActorAvatar` itself handles member / agent / squad rendering * (rounded square + people glyph or `squad.avatar_url` for squads). A * future fourth enum value falls through to ActorAvatar's initials * fallback, which is the real "enum drift downgrades, not crashes" * behavior — earlier whitelist (member/agent only) silently dropped * squad assignees instead. */ import { Pressable, View } from "react-native"; import type { Issue } from "@multica/core/types"; import { Text } from "@/components/ui/text"; import { ActorAvatar } from "@/components/ui/actor-avatar"; import { PriorityIcon } from "@/components/ui/priority-icon"; import { StatusIcon } from "@/components/ui/status-icon"; interface Props { issue: Issue; onPress: () => void; /** Render the status icon inline at the start of the row. Default: false. */ showStatus?: boolean; } export function IssueRow({ issue, onPress, showStatus = false }: Props) { return ( {showStatus ? : null} {issue.identifier} {issue.title} {issue.assignee_type && issue.assignee_id ? ( ) : null} ); }