Improve dashboard maintainability before the next release
The dashboard had several oversized orchestration, component, and CSS files that made product-copy changes and mobile/performance work risky. This refactor preserves behavior while splitting scan terminal CSS, opportunity helpers, future forecast panels, history/detail charts, and probability/model sections into smaller ownership boundaries. Constraint: No user-visible version bump because this batch is architecture and performance cleanup, not a release announcement. Rejected: Rewrite dashboard state management in the same batch | too broad for a safe upload after CSS and component splitting. Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep new component/CSS boundaries instead of moving product copy back into the large dashboard files. Tested: npm run build; npm run test:business; git diff --check Not-tested: Browser visual smoke test after push
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { memo, useEffect, useMemo, useState } from "react";
|
||||
import { getWindowPhaseMeta } from "@/components/dashboard/OpportunityTable";
|
||||
import { getWindowPhaseMeta } from "@/components/dashboard/opportunity-window-phase";
|
||||
import type { ScanOpportunityRow } from "@/lib/dashboard-types";
|
||||
import { getLocalizedCityName } from "@/lib/dashboard-home-copy";
|
||||
import { formatTemperatureValue } from "@/lib/temperature-utils";
|
||||
@@ -73,7 +73,7 @@ const CalendarActionCard = memo(function CalendarActionCard({
|
||||
);
|
||||
});
|
||||
|
||||
export function CalendarView({
|
||||
export const CalendarView = memo(function CalendarView({
|
||||
rows,
|
||||
locale,
|
||||
selectedRowId,
|
||||
@@ -181,5 +181,5 @@ export function CalendarView({
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ const OpportunityDecisionCard = memo(function OpportunityDecisionCard({
|
||||
);
|
||||
});
|
||||
|
||||
export function OpportunityOverview({
|
||||
export const OpportunityOverview = memo(function OpportunityOverview({
|
||||
rows,
|
||||
terminalData,
|
||||
loading,
|
||||
@@ -212,5 +212,5 @@ export function OpportunityOverview({
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user