From 59e8f2d30bcd2fe7792105e9288c13e529fa15b5 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Thu, 7 May 2026 10:30:52 -0700 Subject: [PATCH] style(web): remove stage label/duration header from run stages tab The stage label and ticking duration were a redundant repeat of the sidebar's selected entry. Drop the sticky header (and the now-unused RunningStageDuration helper) so the right column focuses on the stage activity. Co-Authored-By: Claude Opus 4.7 (1M context) --- apps/fabro-web/app/routes/run-stages.tsx | 49 +----------------------- 1 file changed, 2 insertions(+), 47 deletions(-) diff --git a/apps/fabro-web/app/routes/run-stages.tsx b/apps/fabro-web/app/routes/run-stages.tsx index b23637f62..d6ef9514d 100644 --- a/apps/fabro-web/app/routes/run-stages.tsx +++ b/apps/fabro-web/app/routes/run-stages.tsx @@ -35,15 +35,13 @@ markedSafe.use({ import { CommandLineIcon, ChatBubbleLeftIcon, PlayIcon } from "@heroicons/react/24/outline"; import { ToolBlock } from "../components/tool-use"; import type { ToolUse } from "../components/tool-use"; -import { StageSidebar, statusConfig } from "../components/stage-sidebar"; +import { StageSidebar } from "../components/stage-sidebar"; import type { Stage } from "../components/stage-sidebar"; import { EmptyState } from "../components/state"; import { CopyButton } from "../components/ui"; -import { formatDurationSecs } from "../lib/format"; -import { useTickingNow } from "../lib/time"; import { fetchRunCommandLog, useRunStageEvents, useRunStages } from "../lib/queries"; import { STAGE_ACTIVITY_EVENT_TYPES, type StageActivityEventType } from "../lib/run-events"; -import { ACTIVE_STAGE_STATES, formatStageLabel, mapRunStagesToSidebarStages } from "../lib/stage-sidebar"; +import { mapRunStagesToSidebarStages } from "../lib/stage-sidebar"; import { getNumber, getString, type UnknownRecord } from "../lib/unknown"; import { CommandOutputStream, @@ -554,32 +552,6 @@ function CommandBlock({ ); } -function RunningStageDuration({ - isRunning, - duration, -}: { - isRunning: boolean; - duration: string; -}) { - const [startedAt, setStartedAt] = useState(() => - isRunning ? Date.now() : null, - ); - - useEffect(() => { - setStartedAt((current) => { - if (!isRunning) return null; - return current ?? Date.now(); - }); - }, [isRunning]); - - const now = useTickingNow(isRunning); - - if (isRunning && startedAt) { - return formatDurationSecs(Math.floor((now - startedAt) / 1000)); - } - return duration; -} - export default function RunStages() { const { id, stageId } = useParams(); const stagesQuery = useRunStages(id); @@ -598,7 +570,6 @@ export default function RunStages() { : [], [stageEventsQuery.data, selectedStageId], ); - const isActive = selectedStage ? ACTIVE_STAGE_STATES.has(selectedStage.status) : false; if (!id || !stages.length) { return ( @@ -611,9 +582,6 @@ export default function RunStages() { ); } - const selectedConfig = statusConfig[selectedStage.status]; - const SelectedIcon = selectedConfig.icon; - return (
@@ -623,19 +591,6 @@ export default function RunStages() {