fix(report): project ordinary reports onto public prose only
This commit is contained in:
@@ -124,7 +124,7 @@ export function PersonalReportCenter() {
|
||||
[state.reports],
|
||||
);
|
||||
|
||||
const downloadProfessionalReference = useCallback(async (report: ReportListItem) => {
|
||||
const downloadOrdinaryReport = useCallback(async (report: ReportListItem) => {
|
||||
setExportingReportId(report.id);
|
||||
setExportError(null);
|
||||
try {
|
||||
@@ -222,7 +222,7 @@ export function PersonalReportCenter() {
|
||||
type="button"
|
||||
variant="ghost"
|
||||
disabled={exportingReportId === report.id}
|
||||
onClick={() => void downloadProfessionalReference(report)}
|
||||
onClick={() => void downloadOrdinaryReport(report)}
|
||||
>
|
||||
{exportingReportId === report.id ? <InlineSpinner size={14} /> : null}
|
||||
{PERSONAL_REPORT_EXPORT_LABEL}
|
||||
|
||||
@@ -25,6 +25,7 @@ import {
|
||||
PERSONAL_REPORT_GENERATING_COPY,
|
||||
PERSONAL_REPORT_LEGACY_PLACEHOLDER,
|
||||
} from "@/lib/personal-report-longform-copy";
|
||||
import { projectOrdinaryReportMarkdown } from "@/lib/report-public-projection";
|
||||
import {
|
||||
describeReportProgress,
|
||||
REPORT_PROGRESS_STALL_MS,
|
||||
@@ -121,7 +122,8 @@ export function classifyReportEnvelope(statusCode: number, json: unknown): Repor
|
||||
const view = json.report as Partial<ReportEnvelopeView>;
|
||||
switch (view.status) {
|
||||
case "ready": {
|
||||
const markdown = typeof json.longformMarkdown === "string" ? json.longformMarkdown.trim() : "";
|
||||
const stored = typeof json.longformMarkdown === "string" ? json.longformMarkdown : "";
|
||||
const markdown = projectOrdinaryReportMarkdown(stored).trim();
|
||||
if (markdown.length > 0) {
|
||||
return {
|
||||
phase: "markdown-ready",
|
||||
|
||||
Reference in New Issue
Block a user