Skip to content
Open
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
6 changes: 3 additions & 3 deletions .claude/skills/verify-openminutes/features/categories.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

Preconditions:

- 满足基线条件。录音不是必需的。
- 满足基线条件。分类增删改查不需要录音;详情引用和删除后的录音归属需要先导入测试录音。

- **列表与内置项。** 运行 `browse.mjs <runId> cat '[{"goto":"#/categories"},{"waitText":"全部分类"},{"waitFor":"aria=会议纪要 的名称"},{"expectText":"内置"},{"screenshot":"01-list.png"},{"aria":"01-list.aria.txt"}]'`。
- **新建。** 在同一次调用里追加 `{"fill":"input[placeholder=\"例如:产品评审\"]","value":"验证分类"},{"fill":"input[placeholder=\"这类录音通常在什么场景下产生\"]","value":"verify run"},{"click":"text=创建分类"},{"waitText":"分类已创建"},{"waitFor":"aria=验证分类 的名称"},{"screenshot":"02-created.png"}`。读回验证:`curl -s "$URL/api/categories" | tee $E/cat/after-create.json` 中应包含「验证分类」,并且 `isSystem` 为 false。
Expand All @@ -33,5 +33,5 @@ Preconditions:
- 分类名显示在就地改名的 `<input>` 里,不属于可见文本,所以 `expectText:"会议纪要"` 会失败。要用 `waitFor:"aria=会议纪要 的名称"`。
- 新增表单的输入框没有 aria-label,只能用 placeholder 作为 CSS 选择器来定位。
- 改名在失焦(blur)时才保存。必须 `press Tab` 或点击别处,单纯 fill 不会触发保存。
- 列表里每一行都有「删除」按钮。`text=删除` 会命中第一个可见的那个,可能删错分类,所以要像上面那样先定位到行,再点该行的按钮。
- 名称输入框的 aria-label 是用加载时的名称生成的。改名后,要等页面刷新(toast 出现后重新 `goto`),新的 aria-label 才会生效。
- 只有自定义分类行有「删除」按钮,内置行显示「内置」。`text=删除` 会命中第一个可见的按钮,可能删错分类,所以要先定位到行,再点该行的按钮。
- 保存改名后页面会自动重新加载列表。等待新名称对应的 aria-label,例如 `waitFor:"aria=验证分类2 的名称"`,再继续操作;toast 出现不代表列表已经更新,无需重新 `goto`。
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
{"waitText":"最近设备操作"},
{"expectText":"本机环境"},
{"expectText":"运行时路径"},
{"expectText":"转录任务"},
{"expectText":"复制诊断报告"},
{"expectText":"传输方式"},
{"expectText":"无线快传阈值"},
{"expectText":"宿主能力"},
Expand All @@ -21,5 +23,7 @@
{"aria":"02-saved.aria.txt"},
{"select":"aria=传输方式","value":"auto"},
{"click":"text=保存设置"},
{"waitText":"设置已保存"}
{"waitText":"设置已保存"},
{"waitNoText":"有未保存的修改"},
{"eval":"(async () => { const body = await (await fetch('/api/settings', {headers: {connection: 'close'}})).json(); const value = body.data.find((item) => item.key === 'device_transport')?.value; if (value !== 'auto') throw Error('device_transport not restored: ' + value); return value; })()"}
]
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## Sub-features

- `import-scan`:扫描收件目录,导入新的 MP3,对话框内显示「已导入 N 条」等结果。
- `import-dedupe`:再次扫描同一个文件时,计入「已跳过」,不重复登记。
- `import-dedupe`:再次扫描同一个文件时,汇总显示「跳过 N 条」,文件行显示跳过原因,不重复登记。
- `import-copy`:源文件留在收件目录,副本落到 `library/<录制年月>/`。
- `import-failed-detail`:导入失败的文件主行只显示中文结论,技术原因收在这一行的「查看详情」里,可以展开和复制。配方:`--no-host` 启动后,在 `$R/library/` 下建一个名为 `2026-11` 的普通文件(占住月份目录,让 mkdir 失败),收件目录放 `REC20261115_090000.mp3`,运行 `browse.mjs <runId> import-failed-detail @.claude/skills/verify-openminutes/features/import-failed-detail.steps.json`。
- `import-empty`:收件目录里没有音频时,对话框提示「文件夹里还没有可以导入的录音文件。」;目录不存在时扫描会自动创建。
Expand All @@ -25,7 +25,7 @@ Preconditions:
- **入口与目录状态。** 运行 `browse.mjs <runId> import '[{"goto":"#/library"},{"waitFor":"aria=搜索录音"},{"click":"text=导入"},{"waitText":"1 个音频文件"},{"eval":"location.hash"},{"screenshot":"01-before.png"},{"aria":"01-before.aria.txt"}]'`。预期 `location.hash` 仍为 `#/library`,对话框显示「1 个音频文件」,路径行显示 `$R\inbox`。
- **扫描导入。** 在同一次调用里追加 `{"click":"text=扫描并导入"},{"waitText":"已导入 1 条","timeout":20000},{"screenshot":"02-after-scan.png"},{"click":"text=关闭"}`。预期对话框内列出该文件,hash 仍为 `#/library`。参考 `features/voice-import.steps.json`。
- **副作用读回。** 运行 `curl -s "$URL/api/recordings" | tee $E/import/recordings.json`。预期 `total` 为 1,`status` 为 `ready`,`durationSec` 为 6,`hasAudioFile` 为 true。再运行 `ls $R/library/2026-10/`,应该能看到 `REC20261029_101500.mp3`,同时 `$R/inbox/` 里的原文件仍在。
- **去重。** 不改动收件目录,重复上面的扫描步骤,等待对话框内显示「已跳过」。之后 `/api/recordings` 的 `total` 仍应为 1。
- **去重。** 不改动收件目录,重复上面的扫描步骤,等待对话框内显示「跳过 1 条」和「同名同大小的录音已存在」。之后 `/api/recordings` 的 `data.total` 仍应为 1;不要等待可能被原因文字替代的「已跳过」。
- **录音库里可见。** 运行 `browse.mjs <runId> import-library '[{"goto":"#/library"},{"waitText":"REC20261029_101500.mp3"},{"expectText":"当前显示 1 条"},{"screenshot":"03-library.png"}]'`。
- **一步跑完。** `browse.mjs <runId> import-dialog @.claude/skills/verify-openminutes/features/import-dialog.steps.json` 依次检查空状态只有说明和「录音笔」链接、对话框显示目录与音频数、「已导入 1 条」、全程 hash 为 `#/library`,最后读回 `/api/recordings`。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,14 @@
{"eval":"(() => { if (location.hash !== '#/library') throw Error('Import must stay on #/library, got ' + location.hash); return location.hash; })()"},
{"eval":"(async () => { const r = await fetch('/api/recordings', {headers: {connection: 'close'}}); const body = await r.json(); if (body.data.items.length !== 1 || body.data.items[0].status !== 'ready') throw Error('Unexpected library: ' + JSON.stringify(body.data.items)); return body.data.items.map((item) => ({ id: item.id, filename: item.filename, status: item.status })); })()"},
{"screenshot":"03-imported.png"},
{"aria":"03-imported.aria.txt"}
{"aria":"03-imported.aria.txt"},
{"click":"text=导入"},
{"waitText":"1 个音频文件"},
{"click":"text=扫描并导入"},
{"waitText":"跳过 1 条"},
{"expectText":"同名同大小的录音已存在"},
{"eval":"(async () => { const body = await (await fetch('/api/recordings', {headers: {connection: 'close'}})).json(); if (!body.ok || body.data.total !== 1 || body.data.items.length !== 1) throw Error('Duplicate import changed the library: ' + JSON.stringify(body)); return body.data; })()"},
{"screenshot":"04-deduplicated.png"},
{"aria":"04-deduplicated.aria.txt"},
{"click":"text=关闭"}
]
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ Preconditions:
- **打开详情。** 运行 `browse.mjs <runId> detail '[{"goto":"#/library"},{"waitFor":"button.row__main"},{"click":"button.row__main"},{"waitText":"返回录音"},{"eval":"location.hash"},{"screenshot":"01-open.png"},{"aria":"01-open.aria.txt"}]'`。预期 hash 为 `#/rec/1`,元数据里的「音频文件」指向 `$R\library\2026-10\…`。
- **音频可加载。** 在同一次调用里追加 `{"eval":"new Promise(r => { const a = document.querySelector('audio'); if (a.readyState >= 1) r(a.duration); else a.addEventListener('loadedmetadata', () => r(a.duration)); })"}`。预期结果为 `6`。
- **Range 协议。** 运行 `curl -s -D - -o /dev/null -H 'Range: bytes=100-199' "$URL/api/recordings/1/audio" | tee $E/detail/range.txt`。预期看到 `206`、`content-range: bytes 100-199/<size>` 和 `accept-ranges: bytes`。再用 `-H 'Range: bytes=999999-'` 请求一次,预期返回 `416`。
- **改标题。** 追加 `{"click":"aria=编辑标题"},{"fill":"aria=录音标题","value":"产品评审"},{"press":"Enter"},{"waitText":"标题已更新"},{"expectText":"产品评审"},{"screenshot":"02-title.png"}`。读回验证:`curl -s "$URL/api/recordings/1"` 返回的 `title` 应为「产品评审」。
- **重要度与标签。** 追加 `{"click":"aria=重要度 4"},{"waitText":"重要度设为 4"},{"fill":"aria=添加标签","value":"周会"},{"press":"Enter"},{"waitText":"已添加标签「周会」"},{"screenshot":"03-fields.png"}`。读回验证:`importance` 为 4,`tags` 包含「周会」。
- **改标题。** 追加 `{"click":"aria=编辑标题"},{"fill":"aria=录音标题","value":"产品评审"},{"press":"Enter"},{"waitText":"标题已更新"},{"expectText":"产品评审"},{"screenshot":"02-title.png"}`。读回验证:`curl -s "$URL/api/recordings/1"` 返回的 `data.recording.title` 应为「产品评审」。
- **重要度与标签。** 追加 `{"click":"aria=重要度 4"},{"waitText":"重要度设为 4"},{"fill":"aria=添加标签","value":"周会"},{"press":"Enter"},{"waitText":"已添加标签「周会」"},{"screenshot":"03-fields.png"}`。读回验证:`data.recording.importance` 为 4,`data.recording.tags` 中有 `name` 为「周会」的对象。
- **导出。** 收件目录里还留着同名的原文件,直接 `ls` 无法区分是不是导出的。所以先运行 `rm $R/inbox/REC20261029_101500.mp3`,再追加 `{"click":"text=导出"},{"waitText":"已导出到本机目录"}`。然后运行 `ls $R/inbox/ | tee $E/detail/export.txt`,被删掉的文件应该重新出现。
- **删除。** 追加 `{"click":"details.moremenu > summary"},{"click":"text=删除"},{"waitText":"录音已删除"}`(先展开「更多」)。`steps.log` 里应记录 `dialog confirm: 音频文件会移到数据目录的回收站,确认删除这条录音? -> accepted`。之后 `curl -s "$URL/api/recordings"` 的 `total` 减 1。

Expand Down