A recording that ends at its maxDurationSec cap never gets a durationSec
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 82/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
阅读 src/utils/recorder.ts 中 attachExitHandler 附近的代码,追踪结束的录制如何获得其时长;比较分段录制路径与普通文件路径。检查 src/tools/stopRecording.ts 和 src/cli.ts 如何使用 durationSec,然后运行 npm test。完成标准:达到上限的录制会通过 stop_recording 和 get_session 报告其时长,并且 CLI --last 会将 GIF 限制在请求的时间窗口内。
由索引模型根据 Issue 内容生成。
描述
Summary
When capture exits on its own (cap reached, window closed), attachExitHandler writes the end status but probes the file only for segmented recordings or ones with a webcam. An ordinary recording keeps durationSec undefined, so stop_recording returns durationSec: null and the CLI's --last window is lost.
Where
src/utils/recorder.ts:129-140(attachExitHandler)src/tools/stopRecording.ts:115(durationSec: record.durationSec ?? null)src/cli.ts:296-297, 512, 547, 642-656(tailWindow(null, lastSec)returns{})
Impact
- Agents calling stop_recording after the cap get a null duration, and get_session never shows one, although the tool promises "returns the path and duration".
screencast-mcp record -- <cmd>in the case it warns about (the run outlived the cap) makes the evidence GIF and the OCR error scan cover the whole recording (up to the cap) instead of the last--lastseconds.
Steps to reproduce
start_recording {"target":"region:0,0,64,64","maxDurationSec":2}, then wait 5 s.stop_recordingreturns{status:"stopped", endReason:"max_duration", durationSec:null}.
Suggested fix
On every unrequested exit that leaves a file, probe record.outputPath and patch durationSec (a small async finalizeEnded() that either joins segments or just probes). Alternatively, have stop_recording's not-active branch probe the file when durationSec is missing.
Acceptance criteria
- A capped recording reports its duration from stop_recording and get_session.
- CLI
--lastlimits the GIF on a capped run.
Getting started
- Relevant files:
src/utils/recorder.ts,src/tools/stopRecording.ts,src/cli.ts - How to run tests:
npm test
Filed by repo-audit/full-audit at b9b94fa. Severity: medium. Effort: S. audit-key: bug|src/utils/recorder.ts|attachExitHandler
- 主要语言
- TypeScript
- 星标
- 1
- 派生
- 4
- 平均合并
- 14 小时 8 分钟
- 30 天内合并 PR
- 48
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TMHSDigital/screencast-mcp 的其他 Issue
-
effort: small good first issue priority: medium testing
难度 2/5 1-3 小时 新手友好度 84/100
TMHSDigital/screencast-mcp#351 ·
维护者通常 1 天内回复
-
bug effort: small good first issue priority: medium
难度 2/5 1-3 小时 新手友好度 82/100
TMHSDigital/screencast-mcp#343 ·
维护者通常 1 天内回复
-
effort: medium help wanted priority: medium testing
难度 3/5 1-2 天 新手友好度 76/100
TMHSDigital/screencast-mcp#350 ·
维护者通常 1 天内回复
-
effort: medium priority: medium testing
难度 4/5 1-2 天 新手友好度 70/100
TMHSDigital/screencast-mcp#349 ·
维护者通常 1 天内回复
-
effort: medium help wanted priority: medium testing
难度 3/5 1-2 天 新手友好度 65/100
TMHSDigital/screencast-mcp#348 ·
维护者通常 1 天内回复
查看 TMHSDigital/screencast-mcp 的全部 Issue
相似的 Issue
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
难度 2/5 1-3 小时 新手友好度 82/100
openclaw/openclaw#200365 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
area-templates triage:bot-seen triage:needs-human
难度 2/5 1-3 小时 新手友好度 75/100
microsoft/aspire#22356 · 1 条评论 ·
维护者通常 1 天内回复
-
Archiving an agent that is not loaded keeps its old updatedAt可能已有人在做 @luoph 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
content triage
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复