feat(report): drop the report sky cover; docs, checklist and progress for M1–M5 (M5+M3)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N4f2nya58RoRu4yEmJgRGE
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
60b5542b7d
commit
447a19b561
@@ -18,8 +18,6 @@ import { createSupabasePersonalReportJobService } from "@/lib/personal-report-jo
|
||||
import { createPersonalReportSectionService } from "@/lib/personal-report-section-service";
|
||||
import { isSupabaseConfigurationError } from "@/lib/supabase/config";
|
||||
import { createServerSupabaseClient } from "@/lib/supabase/server";
|
||||
import { subjectBirthFingerprint } from "@/lib/report-birth-binding";
|
||||
import { loadSubjectBirth } from "@/lib/subject-birth";
|
||||
|
||||
export const runtime = "nodejs";
|
||||
|
||||
@@ -51,7 +49,6 @@ async function resolvePersistenceForUser() {
|
||||
jobs: null,
|
||||
listSections: undefined,
|
||||
loadLongformAppendix: undefined,
|
||||
loadCurrentBirthFingerprint: undefined,
|
||||
};
|
||||
}
|
||||
const persistence = createSupabasePersonalReportService(supabase);
|
||||
@@ -87,17 +84,12 @@ async function resolvePersistenceForUser() {
|
||||
markdown: row.markdown,
|
||||
};
|
||||
},
|
||||
// Report cover binding: the same stored-row fingerprint the chart page uses.
|
||||
// A foreign, deleted or unreadable subject throws and resolves to no cover.
|
||||
loadCurrentBirthFingerprint: async (ownerId: string, subjectId: string) => (
|
||||
subjectBirthFingerprint((await loadSubjectBirth(supabase, ownerId, subjectId)).row)
|
||||
),
|
||||
};
|
||||
}
|
||||
|
||||
export async function GET(request: Request, context: RouteContext) {
|
||||
try {
|
||||
const { userId, persistence, jobs, listSections, loadLongformAppendix, loadCurrentBirthFingerprint } = await resolvePersistenceForUser();
|
||||
const { userId, persistence, jobs, listSections, loadLongformAppendix } = await resolvePersistenceForUser();
|
||||
const { reportId } = await context.params;
|
||||
if (!uuidPattern.test(reportId)) {
|
||||
return NextResponse.json(
|
||||
@@ -124,7 +116,6 @@ export async function GET(request: Request, context: RouteContext) {
|
||||
jobs: jobs ?? undefined,
|
||||
listSections,
|
||||
loadLongformAppendix,
|
||||
loadCurrentBirthFingerprint,
|
||||
validateReadyDocument: (document) => {
|
||||
const parsed = safeParseServerReportDocument(document);
|
||||
return parsed.ok
|
||||
|
||||
Reference in New Issue
Block a user