From 13f05273d79a7850d1fd98127a215b5c7ad5a8c2 Mon Sep 17 00:00:00 2001 From: Eyejoker Date: Tue, 28 Apr 2026 14:35:43 +0900 Subject: [PATCH] Extract dashboard EmptyState component (#61) 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 * Extract dashboard RoomBoardV2 component * Extract dashboard EmptyState component --- apps/dashboard/src/App.tsx | 7 ++----- apps/dashboard/src/EmptyState.tsx | 5 +++++ apps/dashboard/src/RoomBoardV2.tsx | 7 ++----- 3 files changed, 9 insertions(+), 10 deletions(-) create mode 100644 apps/dashboard/src/EmptyState.tsx diff --git a/apps/dashboard/src/App.tsx b/apps/dashboard/src/App.tsx index a4ae937..0506cc8 100644 --- a/apps/dashboard/src/App.tsx +++ b/apps/dashboard/src/App.tsx @@ -1,4 +1,4 @@ -import { useEffect, useMemo, useState, type ReactNode } from 'react'; +import { useEffect, useMemo, useState } from 'react'; import { type ClaudeAccountSummary, @@ -53,6 +53,7 @@ import { } from './DashboardNav'; import { isInternalProtocolPayload } from './roomThread'; import { RoomBoardV2 } from './RoomBoardV2'; +import { EmptyState } from './EmptyState'; import { ParsedBody } from './ParsedBody'; import { redactSecretsForPreview } from './redaction'; import './styles.css'; @@ -628,10 +629,6 @@ function inboxTargetHref(item: InboxItem): string | null { return null; } -function EmptyState({ children }: { children: ReactNode }) { - return
{children}
; -} - function LanguageSelector({ locale, onLocaleChange, diff --git a/apps/dashboard/src/EmptyState.tsx b/apps/dashboard/src/EmptyState.tsx new file mode 100644 index 0000000..0410bca --- /dev/null +++ b/apps/dashboard/src/EmptyState.tsx @@ -0,0 +1,5 @@ +import type { ReactNode } from 'react'; + +export function EmptyState({ children }: { children: ReactNode }) { + return
{children}
; +} diff --git a/apps/dashboard/src/RoomBoardV2.tsx b/apps/dashboard/src/RoomBoardV2.tsx index 70235bb..1b93bfe 100644 --- a/apps/dashboard/src/RoomBoardV2.tsx +++ b/apps/dashboard/src/RoomBoardV2.tsx @@ -1,4 +1,4 @@ -import { useEffect, useState, type ReactNode } from 'react'; +import { useEffect, useState } from 'react'; import type { DashboardOverview, @@ -7,6 +7,7 @@ import type { } from './api'; import type { Locale, Messages } from './i18n'; import { RoomCardV2, type RoomEntryWithService } from './RoomCardV2'; +import { EmptyState } from './EmptyState'; import type { RoomActivityMap } from './useRoomActivity'; type InboxItem = DashboardOverview['inbox'][number]; @@ -47,10 +48,6 @@ export interface RoomBoardV2Props { t: Messages; } -function EmptyState({ children }: { children: ReactNode }) { - return
{children}
; -} - function roomFilterLabel( filter: RoomFilter, statusLabel: (status: string, t: Messages) => string,