edit | blame | history | raw

2026-06-26 inline target 统一

用户目标

在先完成 git commit + freeze tag 之后,继续下一步,把
selection / current line 的正文目标区间选择策略统一成一层纯逻辑。

已完成事项

  1. 冻结基线
  • 仓库:/Users/ar/Projects/ExcalidrawX/P1-Txtflowy
  • 提交:
    • 90d333dc6cc2196740ab94862896e49a1e9c0e0d
    • refactor: freeze 0.5.21 editor planner baseline
  • Tag:
    • v0.5.21-build20260626.1928-freeze
  • 说明:
    • 当前仓库没有 git remote
    • 本次冻结为本地冻结基线
  1. 统一 inline target range 纯逻辑
  • 文件:
    • /Users/ar/Projects/ExcalidrawX/P1-Txtflowy/src/editor/txtflowyInlineStylePrimitives.ts
  • 新增:
    • resolveTxtflowyInlineTargetRange
  1. 更新编辑器接线
  • 文件:
    • /Users/ar/Projects/ExcalidrawX/P1-Txtflowy/src/editor/TxtflowyEditorExtension.ts
  • 变化:
    • 颜色覆盖不再单独判断“选区 or 当前标题”
    • 高亮 / 加粗包裹不再各自决定 target range
    • 三者统一走 resolveTxtflowyInlineTargetRange
  1. 扩展测试
  • 文件:
    • /Users/ar/Projects/ExcalidrawX/P1-Txtflowy/tests/editor-inline-style.test.mjs
  • 新增覆盖:
    • 显式选区 passthrough
    • selection-only 模式下空选区返回 null
    • selection-or-current-node-title 模式下空选区回退到当前节点标题
  1. 更新记录
  • /Users/ar/Projects/ExcalidrawX/P1-Txtflowy/GTD-TxtFlowy.md
  • /Users/ar/Projects/ExcalidrawX/P1-Txtflowy/docs/implementation-log.md
  • /Users/ar/Projects/ExcalidrawX/P1-Txtflowy/CHANGELOG.md
  • /Users/ar/Projects/ExcalidrawX/P1-Txtflowy/README.md

验证结果

冻结前验证:

npx --yes pnpm@10.10.0 test
npx --yes pnpm@10.10.0 build

冻结后继续开发这轮验证:

npx --yes pnpm@10.10.0 test
npx --yes pnpm@10.10.0 build

结果:

  • test 通过:35/35
  • build 通过

当前状态

  • 冻结点已建立,可随时回到:
  • commit 90d333dc6cc2196740ab94862896e49a1e9c0e0d
  • tag v0.5.21-build20260626.1928-freeze
  • 冻结之后,工作区已重新进入下一轮未提交开发状态

后续建议

下一步最顺的是继续收:

  1. Enter / Ctrl+Enter 的 guard / planner
  2. 或者再往前一步,把 paste / color / bold / highlight 的 action dispatch 输入统一成一层 action plan