[中] 打开工程不清理待确认框与选眼撤销记录;旧分析任务仍可能写缓存
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
Research direction
Start in Sources/BirdLockApp/AppState.swift, reading openProject/closeProject around lines 1210-1237 and the state declarations at :397 and :664-671 (pendingCustomBox, eyeUndo, cropEdit), then PreviewArea.swift:356 to see how per-frame boxes are rendered. Trace startAnalysis cancellation and scheduleSave to find where the old isCancelled check sits relative to ProxyCache.shared.saveAnalysis(a). Done means stale selections no longer survive a project switch and a cancelled task or outdated snapshot can no longer write the cache; the issue reports a static audit only, so a reproduction is still needed first.
Written by the indexing model from the issue text.
Description
位置:Sources/BirdLockApp/AppState.swift:1210-1237、:397、:664-671;Sources/BirdLockApp/Views/PreviewArea.swift:356
现象:openProject/closeProject 没有清空 pendingCustomBox、eyeUndo(也未清 cropEdit)。旧工程里已框选但未确认的自定义框会在新工程里按帧号显示,帧号相同时甚至会被当作新工程的框。startAnalysis 取消旧任务后,旧任务可能已越过最后的 isCancelled 检查,仍执行 ProxyCache.shared.saveAnalysis(a);scheduleSave 捕获的旧快照也可能晚于新快照落盘。
建议:在 openProject/closeProject 清空这些状态;saveAnalysis 前检查取消标志;scheduleSave 执行前比较 fingerprint/编辑版本。
来源:2026-11-15 全仓只读审计,PR #7 未包含此项。 未在实机复现(静态审计)。
- Dominant language
- Swift
- Stars
- 2
- Forks
- 2
- Avg merge
- 1h 11m
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cyandee/BirdLock
-
Difficulty 2/5 Under an hour Newbie friendliness 62/100
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100