Record the user adjudication of the preview decision points

Why: D1-D5 were settled by the user (deps in, full-fidelity pptx, OG
card plus optional embed, dual placement); the proposal status must
reflect that before implementation starts.

Evidence: decision section rewritten with the settled choices and the
accepted trade-off on D2 (fall back to outline level with evidence only
if no Vite-compatible renderer builds).

Impact: documentation only.

Refs: task feature/file-preview-caps.
This commit is contained in:
weichen
2026-09-30 16:15:41 +00:00
parent f0361f3856
commit 4f3b22d601
@@ -1,6 +1,6 @@
# 文件预览与保留能力(工件删除 / fs 工具)方案
日期:2026-09-30;状态:待裁定(D1–D5 决策点见 §5);作者:weichen + Agent
日期:2026-09-30;状态:已裁定(§5),实施任务 feature/file-preview-caps;作者:weichen + Agent
关联:2026-09-30-ui-redesign-and-auth.md §9(上轮"下载为主"的非目标,本提案补齐)
任务:feature/file-preview-proposal(本仓 PR 见任务卡)
@@ -96,13 +96,14 @@ mammoth + xlsx + jszip 全部动态 import,仅对应格式首次预览时加
| P3 URL 预览 | /api/url-preview + LinkPreview + 输入框 URL 卡 | go 测试:OG 解析正例 + SSRF 负例(localhost/私网/非 http 协议/超时);头链:链接卡→右栏预览 |
| P4 fs 工具 | 实现+门控+沙箱+测试(默认关) | go 测试:穿越负例全红、门控关时不注册;开启后 write_file 产物出现在工件面板 |
## 5. 决策点(待裁定后另立实施任务)
## 5. 决策点(2026-09-30 用户已裁定)
- **D1 Office 依赖**:引入 mammoth/SheetJS/JSZip(动态加载,推荐)|不引入(Office 维持下载)。
- **D2 pptx 深度**:文本大纲级(推荐)|全保真(需重型依赖,不推荐)|不做。
- **D3 URL 预览形态**:OG 卡 + 可选尝试内嵌(推荐)|仅 OG 卡|仅 iframe(不可靠,不推荐)。
- **D4 预览落位**:右栏 + 弹窗双落位(推荐)|仅弹窗|仅右栏。
- **D5 fs 开关可见性**:仅配置可开、设置页不显示(推荐)|设置页显示开关。
- **D1 Office 依赖**:✅ **引入** mammoth/SheetJS(动态加载,不进主包)。
- **D2 pptx 深度**:✅ **全保真渲染**(用户选择;接受重型依赖与还原度折衷——实施时在 pptx-preview / pptx2html 候选中取与 Vite 兼容者,若均不可构建则带回证据退回文本大纲级再裁定)。
- **D3 URL 预览形态**:✅ **OG 卡 + 可选尝试内嵌**。
- **D4 预览落位**:✅ **右栏 + 弹窗双落位**。
- **D5 fs 开关可见性**:按推荐默认执行——仅配置/环境可开(runtime.fsTools 默认 false),设置页不显示开关。
- 实施任务:feature/file-preview-caps(P1–P4 一体交付)。
## 6. 边界与不做