From 21dbfd82b6750dbaa927b735953bdb8f36c6939f Mon Sep 17 00:00:00 2001 From: Huarch Date: Wed, 19 Aug 2026 16:58:55 +0800 Subject: [PATCH] fix: decouple timeline from workspace layout The regression recurred because a floating timeline height was still exported as shared layout space and its z-index exceeded artifacts and notices. Reserve zero layout height and define the timeline below artifact and notification overlays. --- src/features/workbench/map-workbench-page.tsx | 10 ++-------- .../operational-timeline-model.test.ts | 5 +++++ .../operational-timeline/operational-timeline-model.ts | 3 ++- src/features/workbench/workspace/artifact-peek-bar.tsx | 2 +- .../workbench/workspace/workbench-main-frame.tsx | 7 +++++-- 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/features/workbench/map-workbench-page.tsx b/src/features/workbench/map-workbench-page.tsx index ee5bdf2..bc0a876 100644 --- a/src/features/workbench/map-workbench-page.tsx +++ b/src/features/workbench/map-workbench-page.tsx @@ -925,13 +925,7 @@ export function MapWorkbenchPage({ { ...WORKBENCH_LAYOUT_CSS_VARIABLES, "--workbench-agent-current-width": `${currentAgentWidth}px`, - "--workbench-timeline-height": `${ - !timelineVisible - ? 0 - : !isLargeScreen - ? OPERATIONAL_TIMELINE_LAYOUT.mobileSummaryHeight + timelineBottom - : OPERATIONAL_TIMELINE_LAYOUT[timelineMode].height + timelineBottom - }px` + "--workbench-timeline-height": `${OPERATIONAL_TIMELINE_LAYOUT.overlayReservedHeight}px` } as CSSProperties } > @@ -1094,7 +1088,7 @@ export function MapWorkbenchPage({ {shouldShowTaskTicker ? ( { + it("does not reserve workspace layout space for the floating timeline", () => { + expect(OPERATIONAL_TIMELINE_LAYOUT.overlayReservedHeight).toBe(0); + }); + it("creates linked plan and actual events for active work orders", () => { const events = createOperationalEvents([workOrder]); expect(events.map((event) => event.lane)).toEqual(["plan", "actual"]); diff --git a/src/features/workbench/operational-timeline/operational-timeline-model.ts b/src/features/workbench/operational-timeline/operational-timeline-model.ts index 034441e..49ffb6a 100644 --- a/src/features/workbench/operational-timeline/operational-timeline-model.ts +++ b/src/features/workbench/operational-timeline/operational-timeline-model.ts @@ -38,7 +38,8 @@ export const OPERATIONAL_TIMELINE_LAYOUT = { mapScaleSafeWidth: 520, floatingGap: 48, edgeInset: 24, - scaleCollisionOffset: 56 + scaleCollisionOffset: 56, + overlayReservedHeight: 0 } as const; export type TimelineScaleLayout = { diff --git a/src/features/workbench/workspace/artifact-peek-bar.tsx b/src/features/workbench/workspace/artifact-peek-bar.tsx index 6b3d745..b422ce1 100644 --- a/src/features/workbench/workspace/artifact-peek-bar.tsx +++ b/src/features/workbench/workspace/artifact-peek-bar.tsx @@ -17,7 +17,7 @@ export function ArtifactPeekBar({