Files
Jyotisha/frontend/tests/home-surface.ts
T
Jesse_ChenandClaude Opus 5.5 8415fdca72 fix(people): 本人 can edit their own birth data in 星盘档案 (S1, BUG-1081)
The owner had no edit entry anywhere once /people replaced the settings
chart pane. 本人 now gets 编辑 with the same form; the save goes through
PATCH /api/account via a shared lib/self-profile-save.ts that the home
onboarding also uses. The dead saveProfile is removed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N4f2nya58RoRu4yEmJgRGE
2026-09-29 00:43:43 +08:00

40 lines
1.4 KiB
TypeScript

import { existsSync, readFileSync } from "node:fs";
const homeSurfaceFiles = [
"../src/app/(app)/page.tsx",
"../src/lib/home-types.ts",
"../src/components/onboarding-chat-message.tsx",
"../src/components/home-onboarding-shell.tsx",
"../src/components/home-bootstrap-error.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/people/people-page.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",
"../src/hooks/use-session-list.ts",
"../src/hooks/use-home-shell-registration.ts",
"../src/lib/session-list-context.tsx",
"../src/lib/session-list-filter.ts",
"../src/lib/home-bootstrap-run.ts",
"../src/lib/consultation-recovery-poll.ts",
"../src/lib/self-profile-save.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");