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.
This commit is contained in:
2026-08-19 16:58:55 +08:00
parent 760370c93f
commit 21dbfd82b6
5 changed files with 15 additions and 12 deletions
@@ -4,6 +4,7 @@ import {
canCenterTimelineBesideMapScale,
clusterOperationalEvents,
createOperationalEvents,
OPERATIONAL_TIMELINE_LAYOUT,
resolveTimelineScaleLayout
} from "./operational-timeline-model";
@@ -15,6 +16,10 @@ const workOrder: ScheduledConditionItem = {
};
describe("operational timeline model", () => {
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"]);
@@ -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 = {