diff --git a/desktop/src/features/admin-console/AdminConsoleFeedbackTab.tsx b/desktop/src/features/admin-console/AdminConsoleFeedbackTab.tsx index 2ff1292dbd..a0e88f7022 100644 --- a/desktop/src/features/admin-console/AdminConsoleFeedbackTab.tsx +++ b/desktop/src/features/admin-console/AdminConsoleFeedbackTab.tsx @@ -93,7 +93,7 @@ export function FeedbackTab({ >
{text} - {status && status !== "new" && ( + {status !== "new" && ( {status} @@ -321,7 +321,7 @@ function FeedbackStatusControl({ onStatusChanged, }: { feedbackId: string; - currentStatus: AdminFeedbackStatus | null | undefined; + currentStatus: AdminFeedbackStatus | null; origin: string; onStatusChanged: (newStatus: AdminFeedbackStatus) => void; }) { @@ -391,9 +391,9 @@ export function FeedbackDetail({ onBack: () => void; }) { // Local status state: initialized from server, updated on PATCH. - const [localStatus, setLocalStatus] = useState< - AdminFeedbackStatus | null | undefined - >(undefined); + const [localStatus, setLocalStatus] = useState( + null, + ); const detailState: AsyncState = useAsyncLoad( () => getAdminFeedback(origin, feedbackId), @@ -402,16 +402,12 @@ export function FeedbackDetail({ ); // Sync localStatus from server data on load (but not on every re-render). + // `status` is a required wire field — read it directly, never default a + // missing value to "new" (that would misreport a reviewed/archived entry). // biome-ignore lint/correctness/useExhaustiveDependencies: intentional — sync once when data arrives useEffect(() => { if (detailState.status === "ok") { - setLocalStatus( - ( - detailState.data as AdminFeedbackDto & { - status?: AdminFeedbackStatus; - } - ).status ?? "new", - ); + setLocalStatus(detailState.data.status); } }, [detailState.status === "ok"]); diff --git a/desktop/src/features/admin-console/AdminConsolePanel.tsx b/desktop/src/features/admin-console/AdminConsolePanel.tsx index 6695852dab..d28b759ad0 100644 --- a/desktop/src/features/admin-console/AdminConsolePanel.tsx +++ b/desktop/src/features/admin-console/AdminConsolePanel.tsx @@ -591,15 +591,14 @@ function ReportsTab({ const isProcessing = status === "processing"; return (
  • + {/* Processing rows stay navigable: the enforcement state (progress, + retry, cancel) lives inside the detail view, so disabling the row + would hide exactly the controls an operator needs while an action + is pending. Detail suppresses only the resolve form for a + non-open report. */}