docs: allow modular code and refresh the handoff state

- AGENTS.md: new files and module splits need no approval; bug fixes,
  refactors, tests and docs can be done directly with one commit each.
  Only out-of-repo changes, releases, new third-party code and invariant
  changes still stop for a decision. Adds the exe-size and readability
  invariants.
- HANDOFF/STATUS/roadmap/README: correct the stale test count, file
  sizes, session-restore claims and session.json entry; record per-tab
  edit mode/scroll, the .txt removal, and the open editor-styling design
  question.
This commit is contained in:
2026-11-03 22:11:52 +08:00
parent 8221eb5908
commit 44fe93ec20
5 changed files with 45 additions and 17 deletions

View File

@@ -1,9 +1,11 @@
# 项目状态(滚动更新)
> 最后更新:2026-11-02
> 最后更新:2026-11-03
> 用途:上下文压缩/交接后快速恢复。详细背景见 AGENTS.md、HANDOFF.md、scan-2026-10-21.md、roadmap.md。
>
> **当前(2026-11-02):仓库根迁移到 `D:\Scripts\md-preview\AgentLowWorking`,整棵树 Low、DSH workspace-write 可编译;成品只发布到 Nutstore;仓库内 exe 已删除。功能基线仍是 v1.4.2-local.5(59 tests)。**
> **当前(2026-11-03):仓库根 `D:\Scripts\md-preview\AgentLowWorking`,整棵树 Low、DSH workspace-write 可编译;成品只发布到 Nutstore;仓库内 exe 已删除。功能基线 v1.4.2-local.5 + 本地未发布修复(62 tests)。**
>
> 2026-11-03 已做:编辑模式与滚动位置改为按标签记忆;不再把 `.txt` 当文档;clippy 清零、`cargo fmt` 通过;AGENTS 允许拆模块/新增文件。下一步是讨论中的“编辑区富文本样式”。
## 1. 仓库
@@ -37,12 +39,18 @@
- `8644966` feat: 编辑 Tab/Shift+Tab 缩进 + 回车跟随缩进
- `618ac47` feat: 阅读 Find 选区填入、选区锚点、零滚动打开
- 若干 docs 提交(状态/路线图/HANDOFF、local.3/local.4/local.5 release notes)
- `d2b1630` chore: switch to Low workspace and Nutstore-only publish
- `8d98b5e` fix: add UTF-8 BOM to PowerShell scripts
- `dfe3889` fix: remember edit mode and scroll position per tab
- `c783a6d` fix: stop treating .txt as a supported document
- `8221eb5` chore: clear clippy warnings and tighten the build guard
- 忽略:`/target/`、`/MD-Preview-windows-x64.exe`、`/backup/`、`/agent/reports/*.png`
- **不变量(2026-11-02 起)**:仓库根 `D:\Scripts\md-preview\AgentLowWorking`;成品固定为 `C:\Users\wucl1\Nutstore\1\Scripts\MD-Preview-windows-x64.exe`(Medium),默认 .md 打开方式指向它;仓库内不再放 exe。
## 2. 当前构建/部署状态
- `cargo test`:59 passed / 0 failed(2026-10-30,编辑缩进 + Find 选区)。
- `cargo test`:62 passed / 0 failed(2026-11-03,per-tab 状态 + 扩展名白名单 + base64 向量)。
- `cargo clippy --all-targets`:0 warning;`cargo fmt -- --check`:通过(2026-11-03)。
- 当前固定 exe(2026-10-30 部署):
- 大小 5,505,024 字节;版本 1.4.2.0
- SHA256 `A632EF0363D04CE6F72B9779BA742681868AC31D36A7FE57E4F6D44E7BEAD988`
@@ -195,3 +203,16 @@ cargo test
- 发布:用户在自己的普通 PowerShell(Medium)运行 `.\agent\scripts\publish.ps1`;脚本复制到 Nutstore、设 Medium、校验 SHA256、刷新 `.md` 关联、删除旧 exe。
- 仓库内不再放成品 exe;默认打开指向 Nutstore。
- 迁移步骤与回滚见 `agent/docs/migration-2026-11-02.md`。
## 11. 2026-11-03 维护与待决策
- 已确认并实现(未发布):
- 编辑模式按标签记忆(原先属于窗口);切换标签恢复该标签离开时的编辑/阅读状态;detach 保留编辑状态。
- 滚动位置按标签记忆(相对比例,抗缩放/回流);标签动作携带比例,滚动回报带标签 id,避免迟到回报落到新标签;编辑/阅读切换仍保持滚动。
- `.txt` 不再作为文档类型:打开、重新定位、本地链接、命令行都只认 `md/markdown/mdown/mkd`。
- 非 md 本地链接(pdf/png/html)仍无反应,仅记录,不处理。
- 代码整理:`cargo fmt` 通过;clippy 7 条清零;保存写盘合并为 `save_active_file()`;`build.ps1` 的禁止字符串不再包含泛化的 `powershell`。
- 规则调整(`agent/AGENTS.md`):仓库内新增文件/拆模块不需要事先询问;bug 修复、重构、测试、文档可直接做(每项独立提交);只有仓库外修改、发布、新第三方库(>200 KB vendored 资源)和不变量变化需要先问。
- 下一步(讨论中,未动手):编辑区样式化——加粗、标题加粗加大、行内代码换字体。
- 技术前提:`<textarea>` 不支持字符级样式;改字号会改变软换行与光标位置,透明叠加层只适合“同字号”样式。
- 候选:A 透明 textarea + 样式层(只能同字号);B 自研 contenteditable 行编辑器;C 内嵌 CodeMirror 5(单文件、离线、约 +280 KB)。倾向 C,待用户确认体积与交互取舍。