5.1: memoize createRectificationShellSetters so the four shell setters keep a stable identity across renders, then list the two the entry-summary effect uses in its dependency array. Lint warnings 120 -> 119 with no new warning. 5.2: move the four synastry useStates and draftSynastryQuestionFromChart into the new useSynastry hook. Home keeps only two stable callbacks the chart-library effect calls; the chart-library dialog receives one spread synastryPanel object. Zero behavior change, zero copy change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JUei7K13cYxLHE3Axe4A45
31 lines
1.0 KiB
TypeScript
31 lines
1.0 KiB
TypeScript
import { existsSync, readFileSync } from "node:fs";
|
|
|
|
const homeSurfaceFiles = [
|
|
"../src/app/page.tsx",
|
|
"../src/lib/home-types.ts",
|
|
"../src/components/onboarding-chat-message.tsx",
|
|
"../src/lib/home-profile.ts",
|
|
"../src/lib/home-cloud-sync.ts",
|
|
"../src/components/birth-location-fields.tsx",
|
|
"../src/components/profile-fields.tsx",
|
|
"../src/components/chart-library-panel.tsx",
|
|
"../src/components/chart-profile-form.tsx",
|
|
"../src/components/profile-panel.tsx",
|
|
"../src/components/starter-home.tsx",
|
|
] as const;
|
|
|
|
const optionalHomeHookFiles = [
|
|
"../src/hooks/use-session-management.ts",
|
|
"../src/hooks/use-consultation-run.ts",
|
|
"../src/hooks/use-profile-onboarding.ts",
|
|
"../src/hooks/use-rectification-surface.ts",
|
|
"../src/hooks/use-synastry.ts",
|
|
] as const;
|
|
|
|
export const homeSurface = [
|
|
...homeSurfaceFiles,
|
|
...optionalHomeHookFiles.filter((relativePath) => existsSync(new URL(relativePath, import.meta.url))),
|
|
]
|
|
.map((relativePath) => readFileSync(new URL(relativePath, import.meta.url), "utf8"))
|
|
.join("\n");
|