From 05865197c71b05aa4513f4fc8ec4c5a8e6936db4 Mon Sep 17 00:00:00 2001 From: Eyejoker Date: Tue, 28 Apr 2026 14:04:34 +0900 Subject: [PATCH] Extract dashboard RoomCardV2 component (#59) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * review: harden readonly git checks and lint verification * test: satisfy readonly reviewer sandbox typing * test: fix readonly reviewer sandbox assertions * test: remove impossible readonly sandbox guards * test: relax readonly sandbox assertions * test: cast readonly sandbox expectation shape * test: cast readonly sandbox expectation through unknown * Phase 0 — STEP_DONE/TASK_DONE split + owner-follow-up integration smoke * Add STEP_DONE guards, verdict storage, and stale delivery suppression * style: format paired stepdone telemetry files * Route STEP_DONE through reviewer * Add structured Discord attachments * style: format structured attachment test * Fix room thread bot output parity * Remove duplicate work item attachment migration from owner branch * Remove legacy dashboard rooms renderer * Extract dashboard parsed body renderer * Extract dashboard redaction helpers * Extract dashboard RoomCardV2 component * Include RoomCardV2 test in vitest suite --- apps/dashboard/src/App.tsx | 506 +-------------- apps/dashboard/src/RoomCardV2.test.ts | 112 ++++ apps/dashboard/src/RoomCardV2.tsx | 869 ++++++++++++++++++++++++++ 3 files changed, 989 insertions(+), 498 deletions(-) create mode 100644 apps/dashboard/src/RoomCardV2.test.ts create mode 100644 apps/dashboard/src/RoomCardV2.tsx diff --git a/apps/dashboard/src/App.tsx b/apps/dashboard/src/App.tsx index c5e687f..84ee950 100644 --- a/apps/dashboard/src/App.tsx +++ b/apps/dashboard/src/App.tsx @@ -1,5 +1,4 @@ -import { useEffect, useMemo, useRef, useState, type ReactNode } from 'react'; -import { Send } from 'lucide-react'; +import { useEffect, useMemo, useState, type ReactNode } from 'react'; import { type ClaudeAccountSummary, @@ -55,11 +54,8 @@ import { type DashboardFreshness, type DashboardView, } from './DashboardNav'; -import { - buildRoomThreadEntries, - isInternalProtocolPayload, - isWatcherRoomMessage, -} from './roomThread'; +import { isInternalProtocolPayload } from './roomThread'; +import { RoomCardV2, type RoomEntryWithService } from './RoomCardV2'; import { ParsedBody } from './ParsedBody'; import { redactSecretsForPreview } from './redaction'; import './styles.css'; @@ -1742,54 +1738,6 @@ function HealthPanel({ ); } -function RoomMessageForm({ - busy, - onChange, - onSubmit, - t, - value, -}: { - busy: boolean; - onChange: (value: string) => void; - onSubmit: () => void; - t: Messages; - value: string; -}) { - return ( -
{ - event.preventDefault(); - onSubmit(); - }} - > -