fix: 消除会话列表解析阻塞并按需加载工具详情
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{"_example": "Fill with {\"file\": \"<path>\", \"reason\": \"<why>\"}. Put spec/research files only — no code paths. Run `python3 .trellis/scripts/get_context.py --mode packages` to list available specs. Delete this line once real entries are added."}
|
||||
@@ -0,0 +1,4 @@
|
||||
{"_example": "Fill with {\"file\": \"<path>\", \"reason\": \"<why>\"}. Put spec/research files only — no code paths. Run `python3 .trellis/scripts/get_context.py --mode packages` to list available specs. Delete this line once real entries are added."}
|
||||
{"file": ".trellis/spec/frontend/index.md", "reason": "前端入口规范"}
|
||||
{"file": ".trellis/spec/frontend/quality-guidelines.md", "reason": "保留既有前端加载行为"}
|
||||
{"file": ".planning/file-browser-image-gallery/findings.md", "reason": "现有图片弹层与加载入口"}
|
||||
25
.trellis/tasks/10-17-file-browser-image-gallery/prd.md
Normal file
25
.trellis/tasks/10-17-file-browser-image-gallery/prd.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# 文件预览全屏与目录切图
|
||||
|
||||
## 用户需求
|
||||
当前图片预览被容器缩放,需要点击放大全屏,并能左右切换当前文件夹图片;优先复用 cc-web 现成组件。
|
||||
|
||||
## 验收条件
|
||||
- 点击文件预览中已加载的图片打开已有附件图片弹层的全屏模式,图片适应整个可用视口,保留加载、失败、关闭操作。
|
||||
- 查看器提供前后按钮和左右方向键,在当前文件夹中按文件列表顺序切换支持的图片;跳过目录和文本。
|
||||
- 显示文件名、当前位置;单图与首尾行为清晰。
|
||||
- 移动端按钮可用,关闭全屏返回原文件浏览器,不误触关闭文件浏览器。
|
||||
- 图片按需鉴权加载,SVG 延续现有安全路径;切换时处理加载、失败、过期请求和 Blob URL 释放。
|
||||
- 文件夹变化或文件浏览器关闭时正确清理查看器状态。
|
||||
- 原有消息图片查看体验保持可用。
|
||||
|
||||
## 已定位的复用入口
|
||||
- public/app.js:openAttachmentPreviewModal / closeAttachmentPreviewModal;现有组件目前是居中大图弹层,没有缩放平移功能。
|
||||
- public/app.js:openFileBrowserFile / renderFileBrowserDirectory / loadFileBrowserDirectory / showFileBrowser。
|
||||
- 文件图片继续通过 fetchAuthImage 读取 /api/fs/image,SVG 用 data URL,其余用 Blob URL。
|
||||
|
||||
## 约束
|
||||
复用现有组件,不新增图库依赖;不做额外代码审计;本轮不打包、不提交、不推送、不重启。
|
||||
|
||||
## 验证结果
|
||||
- file-browser-image、file-preview-encoding、frontend-asset-version 专项回归通过。
|
||||
- Chromium 149 桌面和手机视口 20 项交互验证通过,页面无未捕获异常。
|
||||
26
.trellis/tasks/10-17-file-browser-image-gallery/task.json
Normal file
26
.trellis/tasks/10-17-file-browser-image-gallery/task.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"id": "file-browser-image-gallery",
|
||||
"name": "file-browser-image-gallery",
|
||||
"title": "文件预览复用全屏图片查看器并支持目录切图",
|
||||
"description": "",
|
||||
"status": "completed",
|
||||
"dev_type": null,
|
||||
"scope": null,
|
||||
"package": null,
|
||||
"priority": "P2",
|
||||
"creator": "shiyue",
|
||||
"assignee": "shiyue",
|
||||
"createdAt": "2026-10-17",
|
||||
"completedAt": "2026-10-17",
|
||||
"branch": null,
|
||||
"base_branch": "main",
|
||||
"worktree_path": null,
|
||||
"commit": null,
|
||||
"pr_url": null,
|
||||
"subtasks": [],
|
||||
"children": [],
|
||||
"parent": null,
|
||||
"relatedFiles": [],
|
||||
"notes": "已复用附件图片弹层实现全视口图库;三项专项回归和 Chromium 桌面/手机 20 项交互验证通过;按用户要求跳过额外审计;未打包、提交、推送或重启。",
|
||||
"meta": {}
|
||||
}
|
||||
Reference in New Issue
Block a user