Forensics++ v1.0.0-beta.1
Forensics++ v1.0.0-beta.1
中文
这是第一个 beta 版本,标志着 Forensics++ 从 alpha 阶段进入正式可用性打磨阶段。核心工作集中在三项:案件报告工具全面重构、Service Worker 缓存根除重建后崩溃、以及全局 CSS/交互细节优化。
案件记录 / 证据报告 重构
原来的报告界面把 7 个导出按钮平铺在一行,并用三列布局把笔记列表、详情、完整性摘要、时间线和证据清单塞在一起,信息密度过高,操作路径不清晰。
重构后:
- 导出按钮合并为单一「导出」下拉菜单:Markdown、HTML、打印/PDF、复制 Markdown、JSON、Bundle JSON、索引 CSV 全部收纳在一个下拉中。
- 三列改为三个标签页:
- 证据列表:笔记列表 + 当前项详情(标题编辑、完整性摘要表、内容文本区、复制/删除操作)。
- 报告预览:全宽 HTML 渲染预览(iframe),支持渲染预览 / Markdown 源码切换和打印。
- 完整性与时间线:完整性摘要表 + 采集时间线 + 证据清单(含源文件核验功能)。
- 案件信息表单改为可折叠(有证据项时默认收起)。
- 报告摘要改为紧凑的统计条(6 个指标卡)。
- 页面顶部增加紧凑统计行(证据数 × 工具数 × 关注项数)。
Service Worker 缓存根除重建崩溃
原 Service Worker 对静态资源使用 cache-first 策略且 CACHE_VERSION 写死为包版本号。每次重建后 index.html 引用的 chunk 哈希变化,旧 SW 仍命中旧缓存 → loading chunk failed → 错误边界 → reload → 重复命中旧 SW → 所有懒加载工具连锁崩溃。
修复:
fetch改为 network-first + 仅离线回退缓存。CACHE_VERSION增加构建指纹(对dist/assets的 js/css 文件名排序后 SHA1 取前 10 位),每次资源变化 → 指纹变化 →activate自动删除旧 cache。
全局 CSS token 审计
脚本扫描全项目 var(--token) 引用 vs --token: 定义,发现并修复:
--app-mono被 40 处引用但从未定义 → 所有等宽 UI(hash 展示、hex dump、代码查看器)静默回退到 sans-serif。--app-border、--border-subtle、--text-secondary等 5 个 token 同样未定义 → 边框缺失、次要文字变全强度。--app-text-soft和--app-ok虽有 fallback,但 fallback 抹掉了设计意图 → 补全。- 滚动条样式改为主题色自适应(深色模式下滚动条更清晰可见)。
复制反馈
全局 copyText 被 72 处调用但全无反馈。新增依赖无关的「已复制」提示浮层,复制成功后底部居中弹出自动消失提示,prefers-reduced-motion 安全。
其他
- 密码工具分段按钮从三列网格改为单行布局,SQL 按钮不再折行。
- 修复多个 CSS 媒体查询空块和格式问题。
- 版本号升级为
1.0.0-beta.1。
验证
- 137 个自动测试通过。
- TypeScript、版权头、生产构建、静态发布包验证通过。
- 36 个工具的桌面/窄屏布局审计通过。
English
This is the first beta release, marking the transition from alpha to production-readiness polishing. The three main improvements: a complete Case Reporter UX overhaul, a Service Worker cache fix that eliminates post-rebuild crashes, and systematic CSS token auditing.
Case Reporter Redesign
The original reporter had seven export buttons in a single row and a three-column layout mixing notes, detail, integrity, timeline, and evidence register — too much information density with unclear operation paths.
The redesign:
- Seven export buttons merged into a single "Export" dropdown: Markdown, HTML, Print/PDF, Copy Markdown, JSON, Bundle JSON, and Index CSV are all in one menu.
- Three-column layout replaced with three tabs:
- Evidence: notes list + selected-note detail (title edit, integrity info table, content textarea, copy/delete actions).
- Report Preview: full-width HTML rendered preview in an iframe, with rendered-preview / Markdown-source toggle and print.
- Integrity & Timeline: integrity summary table + capture timeline + evidence register (with source-file verification).
- Case metadata form is now collapsible (collapsed by default when evidence items exist).
- Report summary replaced with a compact stat strip (6 metric cards).
- Header includes a compact stats row (evidence count × tool count × items needing review).
Service Worker Cache Fix
The original SW used cache-first for static assets with a hardcoded CACHE_VERSION matching the package version. After every rebuild, index.html referenced new chunk hashes while the old SW served stale cached chunks → loading chunk failed → error boundary → reload → repeat. This caused all lazily-loaded tools to break after a rebuild.
Fixes:
fetchhandler changed to network-first with offline cache fallback.CACHE_VERSIONnow includes a build fingerprint (first 10 characters of SHA1 of sorteddist/assetsjs/css filenames). Every asset change → new fingerprint →activatedeletes the old cache.
CSS Token Audit
A script diffing all var(--token) references against --token: definitions found and fixed:
--app-monoused 40× but never defined → all monospace UI (hash displays, hex dumps, code viewers) silently fell back to sans-serif.--app-border,--border-subtle,--text-secondaryand 3 other tokens also undefined → missing borders, secondary text rendered at full strength.--app-text-softand--app-okhad fallbacks that defeated their design intent → cleared.- Scrollbar styling made theme-aware (clearly visible in dark mode).
Copy Feedback
copyText was called 72 times with zero feedback. Added a dependency-free "Copied" toast that appears centered at the bottom and auto-dismisses, with prefers-reduced-motion safety.
Other
- Password tool segmented buttons: single-row layout, SQL button no longer wraps.
- Fixed several empty CSS media-query blocks and formatting issues.
- Version bumped to
1.0.0-beta.1.
Verification
- 137 automated tests passed.
- TypeScript, copyright headers, production build, and static package verification passed.
- Desktop and narrow-screen layout audit for all 36 tools passed.