From 9e510ce0881abd1e859a29aad905da90ed7a4827 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=87=AF?= Date: Fri, 5 Jun 2026 19:00:13 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BC=9A=E5=95=86?= =?UTF-8?q?=E5=85=AC=E5=BC=80=E5=88=86=E4=BA=AB=E9=A1=B5=EF=BC=8C=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E6=80=BB=E6=8E=A7=E7=BB=93=E8=AE=BA=E4=B8=8E=E5=90=84?= =?UTF-8?q?=E5=B8=AD=E4=BD=8D=E4=BA=A4=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 公开分享页拆分为落地页与独立报告页,后端补充 consensus_text 与 seat_deliveries 字段。 Co-authored-by: Cursor --- frontend-web/src/App.tsx | 6 +- .../src/core/roundtable-draft-shares/api.ts | 10 + .../src/pages/PublicRoundtableSharePage.tsx | 213 +++++++++++++++--- .../routers/roundtable_draft_shares.py | 55 ++++- 4 files changed, 253 insertions(+), 31 deletions(-) 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 ? ( +