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
2 changes: 1 addition & 1 deletion .claude/skills/verify-openminutes/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ node .claude/skills/verify-openminutes/scripts/browse.mjs <runId> <label> @steps
node .claude/skills/verify-openminutes/scripts/browse.mjs <runId> open-detail '[{"goto":"#/library"},{"waitFor":"button.row__main"},{"click":"button.row__main"},{"waitText":"返回录音"},{"eval":"location.hash"},{"screenshot":"detail.png"},{"aria":"detail.aria.txt"}]'
```

页面路由:`#/library`(默认,可带 `?stage=failed|ready|transcribed|pending`)、`#/rec/<id>`、`#/device`、`#/live`、`#/calendar`(可带 `?day=YYYY-MM-DD&rec=<id>`)、`#/categories`、`#/settings`、`#/settings/diagnostics`。`#/overview` 和未知哈希会被改写为 `#/library`。侧边导航是 `navigation "主导航"` 下的 6 个按钮:录音 / 录音笔 / 实时字幕 / 日历 / 分类 / 设置,每页 `<h1>` 与导航标签一致。详情页的返回按钮文字随来源变化(「返回录音」「返回日历」)。
页面路由:`#/library`(默认,可带 `?stage=failed|ready|transcribed|pending`)、`#/today`(可带 `?day=YYYY-MM-DD`)、`#/rec/<id>`、`#/device`、`#/live`、`#/calendar`(可带 `?day=YYYY-MM-DD&rec=<id>`)、`#/categories`、`#/settings`、`#/settings/diagnostics`。`#/overview` 和未知哈希会被改写为 `#/library`。侧边导航是 `navigation "主导航"` 下的 7 个按钮:录音 / 今日 / 录音笔 / 实时字幕 / 日历 / 分类 / 设置,每页 `<h1>` 与导航标签一致。详情页的返回按钮文字随来源变化(「返回录音」「返回日历」)。

入口速查(每个功能只有一个入口):导入本地文件夹在录音页头「导入」→「扫描并导入」;连接、同步录音、断开连接、清理已同步的录音、停止只在录音笔页;录音与日程的关联只在日历页;本机环境、Python/ffmpeg 路径、传输方式、最近设备操作、设备协议指令参考、手动登记清单只在「设置 › 诊断与高级」(`#/settings/diagnostics`,自动展开 `details#diagnostics`)。错误主行是中文结论,技术原文要点「查看详情」才出现。

Expand Down
7 changes: 5 additions & 2 deletions .claude/skills/verify-openminutes/features/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,19 @@

## 功能

导航固定 6 项:录音 / 录音笔 / 实时字幕 / 日历 / 分类 / 设置,每个功能只有一个入口(入口速查见 SKILL.md「Drive」)。
导航固定 7 项:录音 / 今日 / 录音笔 / 实时字幕 / 日历 / 分类 / 设置,每个功能只有一个入口(入口速查见 SKILL.md「Drive」)。

- [目录导入](./directory-import.md):录音页头「导入」对话框,扫描收件目录、复制入库并去重。
- [录音库检索](./library-search.md):全文搜索、阶段/分类/标签筛选、排序和空结果。
- [录音位置列](./library-location.md):列表「位置」列(录音笔 / 本机 + 文件夹)与点击打开所在文件夹(在 Floatboat 中 / 资源管理器)。
- [录音详情](./recording-detail.md):面包屑与返回、单一主按钮、Range 播放、改标题、改分类/重要度/标签、收藏、导出、删除、只读日程区。
- [导航与单一入口](./navigation.md):6 项导航、`aria-current` 与 h1 一致、`#/overview` 改写、主界面无技术词。
- [今日:场景时间线](./scenes-today.md):转录后自动切场景并按模板整理、时间线与卡片联动、空状态与日期切换。
- [导航与单一入口](./navigation.md):7 项导航、`aria-current` 与 h1 一致、`#/overview` 改写、主界面无技术词。
- [录音笔](./device-connection.md)(只用 `--fake-device`):点一次「连接」即同步、过程中「暂时断开外网」、诊断里的「无线快传」记录、「清理已同步的录音」、「断开连接」后自动连接暂停;`ble` 模式「已改用蓝牙」;同步中实时字幕被禁用。
- [错误分两层](./error-detail.md):`absent` 模式「没有找到录音笔」,「查看详情」或 toast「详情」后才出现 `DeviceNotFound`。
- [录音与日程关联](./calendar-link.md):详情页跳到日历、EventLinker 展开、一键关联、每条录音一个关联控件、详情只读。
- [诊断与高级](./diagnostics.md):`#/settings/diagnostics` 自动展开,含本机环境、运行时路径、传输方式、最近设备操作、宿主能力、设备协议指令参考、开发者工具;修改 `device_transport` 后用 `/api/settings` 读回。
- [同时转录的录音数](./asr-concurrency.md):诊断区「转录任务」里的 `asr_concurrency`(1–8,默认 3),保存读回、越界拒绝、改回默认。
- [分类管理](./categories.md):新建、改名、改色、删除,内置分类不可删。
- [转录与归类](./transcribe-organize.md):复用 Floatboat Host 验证单条、批量、人工修正与全文检索;显式无 Host 验证失败。
- [转录与归类成功路径](./transcribe-success.md):可选语言的离线 TTS、能力完整性检查和单条/批量 JSON 配方。
Expand Down
28 changes: 28 additions & 0 deletions .claude/skills/verify-openminutes/features/asr-concurrency.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 设置 › 诊断与高级 › 同时转录的录音数

转录最多同时进行 N 条(`asr_concurrency`,1–8,默认 3);归类、场景整理仍一条一条执行。唯一入口在「设置 › 诊断与高级 › 转录任务」,保存后对之后开始的转录生效,执行中的不打断。

## Sub-features

- `asr-concurrency-default`:展开诊断区后可见「转录任务」分区与「同时转录的录音数」输入框,初值与 `/api/settings` 读回的 `asr_concurrency` 都是 `3`。
- `asr-concurrency-save`:改为 `5` 后出现「有未保存的修改」,点「保存设置」提示「设置已保存」,读回 `5`。
- `asr-concurrency-reject`:填 `9` 保存,提示「…需为 1~8 的整数」,修改仍未保存,读回仍是 `5`。
- 最后改回 `3`,不影响后续配方。

并行上限是否真的生效(同时只跑 N 条、归类串行、调大立即补位)由单测 `tests/queue-lanes.test.ts` 与 `tests/settings.test.ts` 覆盖;断点续转与重启恢复见 `tests/transcribe-resume.test.ts`、`tests/startup-recovery.test.ts`。页面上没有可单独观察并行数的入口。

## How to get to it (user POV)

- 侧边导航「设置」→ 展开「诊断与高级」→「转录任务」。

## Driving it with browse.mjs

Preconditions:满足基线条件,普通启动(不需要 Host),doctor 的 exit 为 0。

- 运行 `browse.mjs <runId> asr-concurrency @.claude/skills/verify-openminutes/features/asr-concurrency.steps.json`(PowerShell 中 `@file` 参数整体加引号)。
- 预期 4 个读回 `eval` 依次返回 `"3"`、`"5"`、`"5"`、`"3"`,`console.log` 为空。

## Gotchas

- 保存设置会一并提交整页的设置草稿;隔离实例里目录等值来自 launch,不要在这一步编辑其它字段。
- 校验失败的 toast 文案来自服务端 `normalize`,包含设置键名;这是诊断区里的既有表现。
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[
{"goto":"#/settings/diagnostics"},
{"waitFor":"details#diagnostics[open]"},
{"waitText":"转录任务"},
{"expectText":"同时转录的录音数"},
{"eval":"(async () => { const r = await fetch('/api/settings', {headers: {connection: 'close'}}); const body = await r.json(); const value = body.data.find((item) => item.key === 'asr_concurrency')?.value; const input = document.querySelector('[aria-label=\"同时转录的录音数\"]'); if (value !== '3' || input.value !== '3') throw Error('Expected default 3, got api=' + value + ' input=' + input.value); return value; })()"},
{"screenshot":"01-before.png"},
{"aria":"01-before.aria.txt"},
{"fill":"aria=同时转录的录音数","value":"5"},
{"waitText":"有未保存的修改"},
{"click":"text=保存设置"},
{"waitText":"设置已保存"},
{"waitNoText":"有未保存的修改"},
{"eval":"(async () => { const r = await fetch('/api/settings', {headers: {connection: 'close'}}); const body = await r.json(); const value = body.data.find((item) => item.key === 'asr_concurrency')?.value; if (value !== '5') throw Error('asr_concurrency not saved: ' + value); return value; })()"},
{"screenshot":"02-saved.png"},
{"aria":"02-saved.aria.txt"},
{"fill":"aria=同时转录的录音数","value":"9"},
{"click":"text=保存设置"},
{"waitText":"1~8 的整数"},
{"expectText":"有未保存的修改"},
{"eval":"(async () => { const r = await fetch('/api/settings', {headers: {connection: 'close'}}); const body = await r.json(); const value = body.data.find((item) => item.key === 'asr_concurrency')?.value; if (value !== '5') throw Error('invalid value overwrote setting: ' + value); return value; })()"},
{"screenshot":"03-rejected.png"},
{"fill":"aria=同时转录的录音数","value":"3"},
{"click":"text=保存设置"},
{"waitText":"设置已保存"},
{"waitNoText":"有未保存的修改"},
{"eval":"(async () => { const r = await fetch('/api/settings', {headers: {connection: 'close'}}); const body = await r.json(); const value = body.data.find((item) => item.key === 'asr_concurrency')?.value; if (value !== '3') throw Error('asr_concurrency not restored: ' + value); return value; })()"}
]
31 changes: 31 additions & 0 deletions .claude/skills/verify-openminutes/features/library-location.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 录音位置列与打开所在文件夹

录音列表在「录音」和「分类」之间有一列「位置」:在录音笔中的录音显示「录音笔」;本机的录音显示「本机」和所在文件夹(~ 简写,过长时保留末尾,悬停 title 是完整路径);没有音频文件时显示「—」。点本机位置会打开该文件所在的文件夹。这是此功能的唯一入口(接口 `POST /api/recordings/:id/reveal`,只接受录音 id)。

打开方式由「设置 › 通用 › 打开录音所在文件夹」决定:「在 Floatboat 中打开」(默认)或「在 Windows 资源管理器中打开」。Floatboat 打开失败时提示「可以在设置中改为用 Windows 资源管理器打开」,不会自动改用资源管理器。860px 以下收起位置列。

## 测试开关

`launch.mjs` 给每个隔离实例都设置 `OPENMINUTES_FAKE_REVEAL=<证据目录>/reveal.log`:服务端只把要执行的调用追加到这个文件(每行一个 JSON),**不弹资源管理器,也不在用户的 Floatboat 里开标签页**。不要在没有这个变量的实例上点位置列。

## Driving it with browse.mjs

```bash
node .claude/skills/verify-openminutes/scripts/launch.mjs <runId> --no-host
ffmpeg -hide_banner -loglevel error -f lavfi -i "sine=frequency=440:duration=6" -ar 16000 -ac 1 -b:a 32k ".workbench/verify/<runId>/inbox/REC20261029_101500.mp3"
node .claude/skills/verify-openminutes/scripts/browse.mjs <runId> library-location '@.claude/skills/verify-openminutes/features/library-location.steps.json'
cat .workbench/verify-evidence/<runId>/reveal.log
```

步骤:导入 → 断言表头顺序「录音 / 位置 / 分类」、位置显示「本机」且文件夹以 `2026-10` 结尾 → 点位置(默认模式)出现「已在 Floatboat 中打开」→ 设置里改成资源管理器并保存、读回 `open_folder_with=explorer` → 再点位置出现「已在资源管理器中打开」→ 不存在的录音返回 `NOT_FOUND`。

副作用读回:`reveal.log` 应有两行:

- `{"mode":"floatboat","url":"file:///…/library/2026-10"}`
- `{"mode":"explorer","command":"explorer.exe","args":["/select,","…\\library\\2026-10\\REC20261029_101500.mp3"]}`

## 未覆盖

- 「录音笔」显示需要假录音笔(`--fake-device`,需 `MEMOTALK_TEST_PYTHON`);由 `tests/reveal.test.ts` 覆盖。
- Floatboat 打开失败的提示与 Host 参数(工作区选择、file:// URL)由 `tests/reveal.test.ts` 的假 Host 覆盖。
- Floatboat 是否真能在标签页里显示 file:// 目录,需要用户在真机上确认。
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[
{"goto":"#/library"},
{"click":"text=导入"},
{"waitText":"个音频文件"},
{"click":"text=扫描并导入"},
{"waitText":"已导入"},
{"press":"Escape"},
{"goto":"#/library"},
{"waitFor":"button.location-link"},
{"eval":"(() => { const head = [...document.querySelectorAll('.table__head > span')].map((s) => s.innerText.trim()); if (head[1] !== '录音' || head[2] !== '位置' || head[3] !== '分类') throw Error('Unexpected header: ' + JSON.stringify(head)); const link = document.querySelector('button.location-link'); const kind = link.querySelector('.location-link__kind')?.innerText.trim(); const shown = link.querySelector('.location-link__path')?.innerText.trim() ?? ''; if (kind !== '本机' || !/2026-10$/.test(shown) || !/2026-10$/.test(link.title.replace(/[\\/]+$/, ''))) throw Error('Unexpected location cell: ' + JSON.stringify({ kind, shown, title: link.title })); return { head, kind, shown, title: link.title }; })()"},
{"screenshot":"01-location-column.png"},
{"aria":"01-location-column.aria.txt"},
{"click":"button.location-link"},
{"waitText":"已在 Floatboat 中打开"},
{"screenshot":"02-reveal-floatboat.png"},
{"goto":"#/settings"},
{"waitFor":"aria=打开录音所在文件夹"},
{"expectText":"在 Floatboat 中打开"},
{"select":"aria=打开录音所在文件夹","value":"explorer"},
{"click":"text=保存设置"},
{"waitText":"设置已保存"},
{"eval":"(async () => { const body = await (await fetch('/api/settings', { headers: { connection: 'close' } })).json(); const entry = body.data.find((item) => item.key === 'open_folder_with'); if (entry?.value !== 'explorer') throw Error('Setting not stored: ' + JSON.stringify(entry)); return entry; })()"},
{"goto":"#/library"},
{"waitFor":"button.location-link"},
{"click":"button.location-link"},
{"waitText":"已在资源管理器中打开"},
{"expectNoText":"Host"},
{"screenshot":"03-reveal-explorer.png"},
{"eval":"(async () => { const r = await fetch('/api/recordings/999/reveal', { method: 'POST', headers: { 'content-type': 'application/json', connection: 'close' }, body: '{}' }); const body = await r.json(); if (body.ok || body.code !== 'NOT_FOUND') throw Error('Unexpected: ' + JSON.stringify(body)); return body.code; })()"}
]
4 changes: 2 additions & 2 deletions .claude/skills/verify-openminutes/features/navigation.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# 导航与单一入口

侧栏固定 6 项:录音、录音笔、实时字幕、日历、分类、设置。每页的 `<h1>` 与导航标签一致,当前页按钮带 `aria-current="page"`。详情页高亮「录音」,`#/settings/diagnostics` 高亮「设置」并自动展开「诊断与高级」。旧的 `#/overview` 和未知哈希都改写为 `#/library`。
侧栏固定 7 项:录音、今日、录音笔、实时字幕、日历、分类、设置。每页的 `<h1>` 与导航标签一致,当前页按钮带 `aria-current="page"`。详情页高亮「录音」,`#/settings/diagnostics` 高亮「设置」并自动展开「诊断与高级」。旧的 `#/overview` 和未知哈希都改写为 `#/library`。

## Sub-features

- `nav-six`:`nav[aria-label="主导航"] button` 恰好 6 个,顺序固定。
- `nav-seven`:`nav[aria-label="主导航"] button` 恰好 7 个,顺序固定。
- `nav-current`:逐个点击后 hash、`aria-current` 和 h1 三者一致。
- `nav-rewrite`:`#/overview` 落到录音页;页面上不出现「概览」「导入新录音」。
- `nav-diagnostics`:`#/settings/diagnostics` 高亮「设置」并展开 `details#diagnostics`;从别的页面进 `#/settings` 时默认折叠。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
{"goto":"#/overview"},
{"waitFor":"aria=主导航"},
{"eval":"(async () => { for (let i = 0; i < 50 && location.hash !== '#/library'; i += 1) await new Promise((r) => setTimeout(r, 100)); if (location.hash !== '#/library') throw Error('#/overview was not rewritten: ' + location.hash); return location.hash; })()"},
{"eval":"(() => { const items = [...document.querySelectorAll('nav[aria-label=\"主导航\"] button')].map((b) => b.querySelector('span')?.innerText.trim()); const want = ['录音', '录音笔', '实时字幕', '日历', '分类', '设置']; if (JSON.stringify(items) !== JSON.stringify(want)) throw Error('Unexpected nav: ' + JSON.stringify(items)); return items; })()"},
{"eval":"(() => { const items = [...document.querySelectorAll('nav[aria-label=\"主导航\"] button')].map((b) => b.querySelector('span')?.innerText.trim()); const want = ['录音', '今日', '录音笔', '实时字幕', '日历', '分类', '设置']; if (JSON.stringify(items) !== JSON.stringify(want)) throw Error('Unexpected nav: ' + JSON.stringify(items)); return items; })()"},
{"expectNoText":"概览"},
{"expectNoText":"导入新录音"},
{"screenshot":"01-library.png"},
{"aria":"01-library.aria.txt"},
{"eval":"(async () => { const want = [['录音', '#/library'], ['录音笔', '#/device'], ['实时字幕', '#/live'], ['日历', '#/calendar'], ['分类', '#/categories'], ['设置', '#/settings']]; const seen = []; for (const [label, hash] of want) { const button = [...document.querySelectorAll('nav[aria-label=\"主导航\"] button')].find((b) => b.querySelector('span')?.innerText.trim() === label); button.click(); let ok = false; for (let i = 0; i < 50; i += 1) { await new Promise((r) => setTimeout(r, 100)); const current = document.querySelector('nav[aria-label=\"主导航\"] [aria-current=\"page\"]'); const h1 = document.querySelector('main h1')?.innerText.trim(); if (location.hash.split('?')[0] === hash && current?.querySelector('span')?.innerText.trim() === label && h1 === label) { ok = true; break; } } if (!ok) throw Error('Nav ' + label + ' failed: hash=' + location.hash + ' h1=' + document.querySelector('main h1')?.innerText); seen.push([label, location.hash]); } return seen; })()"},
{"eval":"(async () => { const want = [['录音', '#/library'], ['今日', '#/today'], ['录音笔', '#/device'], ['实时字幕', '#/live'], ['日历', '#/calendar'], ['分类', '#/categories'], ['设置', '#/settings']]; const seen = []; for (const [label, hash] of want) { const button = [...document.querySelectorAll('nav[aria-label=\"主导航\"] button')].find((b) => b.querySelector('span')?.innerText.trim() === label); button.click(); let ok = false; for (let i = 0; i < 50; i += 1) { await new Promise((r) => setTimeout(r, 100)); const current = document.querySelector('nav[aria-label=\"主导航\"] [aria-current=\"page\"]'); const h1 = document.querySelector('main h1')?.innerText.trim(); if (location.hash.split('?')[0] === hash && current?.querySelector('span')?.innerText.trim() === label && h1 === label) { ok = true; break; } } if (!ok) throw Error('Nav ' + label + ' failed: hash=' + location.hash + ' h1=' + document.querySelector('main h1')?.innerText); seen.push([label, location.hash]); } return seen; })()"},
{"goto":"#/device"},
{"waitText":"录音笔未连接"},
{"expectNoText":"SDK"},
Expand Down
Loading