diff --git a/frontend-web/src/App.tsx b/frontend-web/src/App.tsx index b231ad97..a24f9b53 100644 --- a/frontend-web/src/App.tsx +++ b/frontend-web/src/App.tsx @@ -64,11 +64,15 @@ export function App() { } /> {/* Public read-only conversation viewer — no authentication. */} } /> - {/* Public read-only roundtable result viewer — no authentication. */} + {/* Public read-only roundtable share — landing + full result report. */} } /> + } + /> {/* Public read-only scheduled-task runs viewer — no authentication. */} >(() => new Set()); + const toggle = (i: number) => + setExpanded((prev) => { + const next = new Set(prev); + if (next.has(i)) next.delete(i); + else next.add(i); + return next; + }); + + if (seats.length === 0) { + return ( +

本次会商暂无子智能体交付。

+ ); + } + return ( +
+ {seats.map((seat, idx) => { + const open = expanded.has(idx); + return ( +
+ + {open && ( +
+ + {seat.content || "(空)"} + +
+ )} +
+ ); + })} +
+ ); +} /** * Public, read-only roundtable-result viewer. * * Reachable at `#/roundtable-share/` with NO authentication — anyone with - * the link can open it. It renders the Step 3「结果绘制」report (a self-contained - * HTML document) inside a sandboxed iframe with no `allow-scripts`, mirroring the - * scheduled-task HTML-page preview, so a shared report can never execute code in - * the app origin. + * the link can open it. Two views, driven by the `report` prop / route: + * + * - landing (`#/roundtable-share/`): a read-only result page mirroring the + * in-app Step 3「最终方案展示」— 总控最终结论 + 各席位最终交付 + a 「查看结果绘制」 + * button that opens the full report in a NEW TAB (when one was generated). + * - report (`#/roundtable-share//report`): the Step 3 report (a + * self-contained HTML document) rendered full-screen inside a sandboxed + * `iframe` (no `allow-scripts`), so the agent-generated HTML can never execute + * code in the app origin. */ -export default function PublicRoundtableSharePage() { +export default function PublicRoundtableSharePage({ + report = false, +}: { + report?: boolean; +}) { const { shareCode } = useParams<{ shareCode: string }>(); const { data, isLoading, isError } = useQuery({ @@ -46,37 +125,113 @@ export default function PublicRoundtableSharePage() { ); } - return ( -
-
-
+ // ── 报告页:整页沙箱 iframe 展示第 3 步结果绘制 ────────────────────────────── + if (report) { + return ( +
+

{data.title || "未命名会商"}

+ 结果绘制 · 只读 + +
+
+ {data.has_report ? ( +