Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# TaskVision Change Log

## Unreleased

- Detect `TODO`/`FIXME` (and other tags) in `%`-style comments used by LaTeX, Matlab and Erlang by adding `%` to the default detection regex. (#3)

## v2.0.1 - 2026-02-21

- Fix image URL warning during extension packaging by updating package.json repository field.
Expand Down
8 changes: 8 additions & 0 deletions agent/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@

## Session Summary

- Active focus: Fixed GitHub issue #3 — added the `%` comment prefix (LaTeX/Matlab/Erlang) to the default TODO/FIXME detection regex so `% TODO`/`% FIXME` are detected.
- Verification: `npm ci`, `npm test` (120 passing, 0 failing, including the new `%`-comment case), `npm run webpack` (build succeeded).

## Active Session Task

| Priority | Task | Status | Owner | Due |
| -------- | --------------------------------------------------- | --------- | ----- | ---------- |
| P1 | Support `%`-style comment TODO detection (issue #3) | Completed | AI | 2026-07-08 |
- Active focus: Fixed the Windows-only `master` CI failure (`extension applies on-demand stable ID tracking policy`) caused by CRLF checkouts breaking `\n`-based multi-line source-scanning assertions.
- Root cause + fix: no repo `.gitattributes` + `core.autocrlf=true` ⇒ CRLF working tree; added `.gitattributes` (`* text=auto eol=lf`) to force LF checkout everywhere, and a `readSource()` EOL-normalizing helper in `test/extension.tests.js` for robustness against existing CRLF copies. No runtime code changed.
- Verification: isolated worktree off `origin/master` on Windows (CRLF working tree) reproduced the failure, then `node qunit test/extension.tests.js` (15 passing), `npm test` (145 passing), and `npm run webpack` all passed; `git check-attr` confirms `eol=lf`; staged diff is only `.gitattributes` + `test/extension.tests.js`.
Expand Down
2 changes: 2 additions & 0 deletions agent/timeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

| 日期时间 | 任务/变更 | 修改文件 | 实现逻辑 | 修改动机 | 结果/备注 |
| ---------------- | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 2026-07-08 11:05 | 支持 `%` 注释风格下的 TODO/FIXME 识别 (issue #3) | package.json, src/extension.js, reproduce_issue_v9.js, test/tests.js, CHANGELOG.md, agent/tasks.md, agent/timeline.md | 在默认检测正则 `taskvision.regex.regex` 的注释前缀选择组中加入 `%`(`(//\|#\|<!--\|;\|/\*\|%\|^\|...)`),并同步更新 `src/extension.js` 中“重置为默认”命令与 `reproduce_issue_v9.js` stub 中的同一字面量;新增断言 `% TODO fix this`/`% FIXME` 被默认正则识别、且 `//`、`#` 前缀仍生效的 QUnit 用例,并在 CHANGELOG 增加 Unreleased 记录 | LaTeX/Matlab/Erlang 使用 `%` 作为行注释符,原正则缺少 `%`,导致这些注释中的 TODO/FIXME 无法被检测(GitHub issue #3 反馈,报告者建议将 `%` 加入检测正则) | 已完成;验证执行 `npm ci`、`npm test`(120 passing, 0 failing,新增用例通过)、`npm run webpack`(构建成功)、`node -e` 校验 package.json 为合法 JSON 且默认正则含 `%` |
| 2026-04-29 20:45 | 重新分析 AI 上下文功能逻辑与协作思路 | agent/tasks.md, agent/timeline.md | 只读梳理 `aiContext` 导出器、扩展命令链路、task/context/session sidecar store、稳定 ID 生成、README 协议说明、配置 schema 与测试覆盖,并确认 `.taskvision` 生成文件当前被 Git 跟踪 | 用户要求重新检查 AI 上下文功能部分的逻辑与思路是否合理,需要在继续实现前判断产品定位、数据源边界、会话语义和协作契约是否自洽 | 已完成分析;结论为“外部 agent 交接包”的核心方向合理,但 implementation session 未进入导出、sidecar/source 权责边界、跟踪生成文件、状态报告语义和 Extension Host 集成测试仍需收敛;验证执行只读源码/文档/测试核查与 `git --no-pager ls-files .taskvision .gitignore`,未运行测试套件 |
| 2026-07-08 14:33 | 修复 Windows CRLF 导致的 master CI 测试失败 | .gitattributes(新增), test/extension.tests.js | 定位 `origin/master` CI 仅 `windows-latest` 失败于 `extension applies on-demand stable ID tracking policy`(`test/extension.tests.js:158`);根因为仓库无 `.gitattributes` 且 Windows `core.autocrlf=true` 使源码以 CRLF 检出,而该断言用 `indexOf` 匹配含 `\n` 的跨行字符串,CRLF 工作树下永不命中(LF 命中、CRLF 未命中已本机复现)。修复:新增仓库根 `.gitattributes`(`* text=auto eol=lf` + `*.js/*.json/*.md/*.yml/*.svg` 显式 LF + 图片/字体 `binary` 保护)根治各平台检出换行;并在 `test/extension.tests.js` 引入 `readSource()`(读后 `replace(/\r\n/g,'\n')`),将 12 处源码扫描断言改为经其读取,使既有 CRLF 工作副本亦健壮。仅动测试与属性文件,未改运行时代码 | `05bb7a7`(glass/alpha 高亮修正,本身无辜)推送触发 master CI,首次在 Windows 上暴露 `9ae1b2b` 引入的既有跨平台测试缺陷;需在不改运行时逻辑前提下修复 CI 并根治此类 EOL 敏感回归 | 已完成;隔离 worktree(基于 `origin/master`)在本机 Windows(CRLF 工作树)先复现 `not ok ... stable ID tracking policy`,应用修复后 `node qunit test/extension.tests.js`(15 passing)、`npm test`(145 passing)、`npm run webpack` 均通过;`git check-attr` 确认 `eol=lf`;`git diff --cached --stat` 仅 `.gitattributes` 与 `test/extension.tests.js` 两文件、无内容 churn |
| 2026-06-16 13:14 | 跨模型 deep-research:调研升级方向并产出 roadmap | agent/reports/taskvision-upgrade-research-2026-06-16.md(仅新增,未改源码) | deep-research 方法论主循环复刻(websearch+gh+codex search 三通道核实竞品与 2026 AI 任务管理趋势),定位差异化空缺=「扫真实代码 TODO+状态机+持久源锚+富上下文+安全 agent surface」完整组合无成熟者;经 mcp__codex__codex 跨模型对抗(REVISE/15 条)reconcile,P0 重构为 LanguageModelTool 或 MCP 双 surface + 只读共享核心 + 安全护栏(P2→P0)+ 类型化窄适配层 | 用户要求「与 codex 一起 deep-research 找网络/GitHub 热门相关项目对项目优化升级」 | 已完成;关键事实三通道核对、核心论断经 codex 对抗降级精确化;codex 反例 CodeGraph 经核实驳回(纯语义图不碰 TODO),ContextCode(13 装机/MCP 与 TODO 树割裂)精确化;未改源码/构建;后续可据 P0 落地 |
| 2026-06-04 14:47 | 深化玻璃高亮透明度模型 | src/highlights.js, src/schemes.js, test/highlights.tests.js, test/schemes.tests.js, README.md, README_zh.md, package.json, agent/tasks.md, agent/timeline.md | 将 8 位 hex 背景从“继承 alpha”改为“颜色提示 + 显式填充控制”;默认 glass scheme 不再生成 `backgroundColor` 或 border,避免背景 decoration 覆盖字形;默认 acrylic 改为文字层轻辉光和下划线,不再使用背景块;显式 `glassOpacity` / `glassBorderOpacity` / `glowOpacity` 仍可打开对应效果;将默认 `glassType` 收敛为 `tag`;把 `null` / `0` opacity 视为未设置,修复 VS Code 未配置 number 返回 0 时把文字变透明的问题;文档说明默认无填充/无边框、文字层 acrylic 和 `tag` / `line` / `whole-line` 的视觉差异 | 用户截图显示高亮仍是彩色长条且短徽标仍遮住标签字形;根因先后定位为默认 fill/border 覆盖、VS Code 默认 number 配置返回 0 导致文字被透明化,以及需要在不使用背景块的前提下恢复 acrylic 质感 | 已完成;验证执行 `npx qunit test/highlights.tests.js test/schemes.tests.js`(30 passing)、`npm test`(145 passing)、`npm run webpack`,均通过;CDP 截图 `/tmp/taskvision-cdp-visual-final-pass2.png` 显示无长彩条/无矩形背景块/文字可读,视觉子 agent 验收通过;`dist/extension.js` 已刷新;目标文件 `git diff --check` 通过 |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1677,7 +1677,7 @@
"type": "object",
"properties": {
"taskvision.regex.regex": {
"default": "(//|#|<!--|;|/\\*|^|^[ \\t]*(-|\\d+.))\\s*($TAGS)",
"default": "(//|#|<!--|;|/\\*|%|^|^[ \\t]*(-|\\d+.))\\s*($TAGS)",
"markdownDescription": "%taskvision.configuration.regex.regex.markdownDescription%",
"type": "string",
"minLength": 1,
Expand Down
2 changes: 1 addition & 1 deletion src/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ function activate(context) {
ignoreMarkdownUpdate = true;
addTag('[ ]');
addTag('[x]');
c.update('regex.regex', '(//|#|<!--|;|/\\*|^|^[ \\t]*(-|\\d+.))\\s*($TAGS)', true);
c.update('regex.regex', '(//|#|<!--|;|/\\*|%|^|^[ \\t]*(-|\\d+.))\\s*($TAGS)', true);
}
else if (button === MORE_INFO_BUTTON) {
vscode.env.openExternal(vscode.Uri.parse("https://github.com/Yuki-zik/taskvision#markdown-support"));
Expand Down
16 changes: 16 additions & 0 deletions test/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,22 @@ QUnit.test("utils.getRegexSource sorts the tags in reverse order to allow more s
assert.equal(utils.getRegexSource(), "(TODO\\(API\\)|TODO|FIXME)");
});

QUnit.test("default regex detects tags in %-style (LaTeX/Matlab) comments", function (assert) {
var testConfig = stubs.getTestConfig();
testConfig.regexSource = "(//|#|<!--|;|/\\*|%|^|^[ \\t]*(-|\\d+.))\\s*($TAGS)";
testConfig.tagList = ["TODO", "FIXME"];
utils.init(testConfig);

var regex = utils.getRegexForEditorSearch(false);

assert.ok(regex.test("% TODO fix this"), "matches % TODO");
assert.ok(regex.test("% FIXME later"), "matches % FIXME");
assert.ok(regex.test("// TODO still works"), "still matches // TODO");
assert.ok(regex.test("# TODO still works"), "still matches # TODO");

assert.equal(utils.extractTag("% TODO fix this").tag, "TODO", "extracts TODO from % comment");
});

QUnit.test("utils.getRegexSource returns the regex source and escapes other regex characters", function (assert) {
var testConfig = stubs.getTestConfig();
testConfig.tagList = [
Expand Down
Loading