fix(preview): restore continuous document scrolling

This commit is contained in:
caoqianming 2026-08-12 10:57:26 +08:00
parent 16cfa45f38
commit 641a69455d
5 changed files with 16 additions and 3 deletions

View File

@ -5,6 +5,10 @@
> 所以不是每个版本号都有条目。条目格式 `## <版本> — <日期>`,新条目加在最上面。
> 工程口径的完整记录见 `PROGRESS.md` / git log。
## 0.63.11 — 2026-08-12
- 修复 PDF 和 PPT 连续预览无法正常滚动的问题,现在可直接上下滚动浏览全部页面。
## 0.63.10 — 2026-08-11
- 在文件预览中发送消息后,预览框现在会自动关闭,便于立即查看助手生成的回答。

View File

@ -2,7 +2,7 @@
> 配合 `DESIGN.md`。本文件只记 phase 状态、决策偏差、文件量、下一步。每条 1-2 句:做了啥 + 关键判断;细节查 `git log` / `git diff` / `DESIGN §7.9`
最后更新:2026-08-11(发送消息后自动关闭预览,bump 0.63.10)
最后更新:2026-08-12(PDF/PPT 连续预览滚动布局修复,bump 0.63.11)
---
@ -21,6 +21,10 @@
## 已完成关键能力
### 2026-08-12
- **08-12 / 0.63.11 / PDF/PPT 连续预览滚动布局修复**:补齐 PDF 预览根容器的纵向 Flex 布局与可收缩高度约束,使内部连续页 viewport 获得实际可用高度和独立滚动区域,不再被外层 `overflow:hidden` 裁断回归测试同步锁定根容器、viewport 与页列表三层布局契约。Node 前端预览 11 项、JavaScript 语法及 diff 检查通过;无 schema、migration、HTTP API、依赖或运行方式变化未连接生产 DB。
### 2026-08-11
- **08-11 / 0.63.10 / 发送消息后自动关闭文件预览**:消息通过发送前校验并进入发送流程时统一关闭文件主预览与粘贴附件小预览避免遮挡已开始生成的助手回答空消息、附件上传中和只读渠道等未发送场景保持预览不动。Node 前端预览 11 项、JavaScript 语法及 diff 检查通过;无 schema、migration、HTTP API、依赖或运行方式变化未连接生产 DB。

View File

@ -1,3 +1,3 @@
# zcbot 版本号单一事实源:web/app.py 的 FastAPI version、/healthz 返回、前端展示都引这里。
# 改版本只动这一行。
__version__ = "0.63.10"
__version__ = "0.63.11"

View File

@ -88,6 +88,8 @@ test("PDF previews render a continuously scrollable lazy page list", () => {
assert.match(previewJs, /root: viewportHost/);
assert.match(previewJs, /viewportHost\.addEventListener\("scroll"/);
assert.doesNotMatch(previewJs, /class="small pdf-(?:prev|next)"/);
assert.match(pageHtml, /\.pdf-preview\s*\{[^}]*display:\s*flex[^}]*flex-direction:\s*column[^}]*min-height:\s*0/s);
assert.match(pageHtml, /\.pdf-viewport\s*\{[^}]*flex:\s*1[^}]*min-height:\s*0[^}]*overflow:\s*auto/s);
assert.match(pageHtml, /\.pdf-pages-list\s*\{[^}]*flex-direction:\s*column/s);
});

View File

@ -1373,7 +1373,10 @@
}
#file-preview-modal .body iframe.preview-frame { width: 100%; height: 100%; border: 0; }
iframe.preview-html-frame { background: #fff; }
.pdf-preview { padding: 0 !important; overflow: hidden !important; background: #eef1f5; }
.pdf-preview {
display: flex; flex-direction: column; min-height: 0;
padding: 0 !important; overflow: hidden !important; background: #eef1f5;
}
.pdf-toolbar {
min-height: 44px; padding: 6px 10px; display: flex; align-items: center; gap: 7px;
background: var(--panel); border-bottom: 1px solid var(--border); flex: 0 0 auto;