Repository navigation
refactor: 清理死代码、无效测试与归档(约 −4.7 万行,行为不变) - #45
Merged
Merged
Conversation
产品代码和测试都不引用的常量、计算属性与方法,连同提到它们的过期注释。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
最低系统提到 macOS 15 时旧系统的主线程投递路径已删,这个邮箱从那以后只剩测试在用。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
终端 App 清单、耳朵透明度、最小形宽和刘海一排的圆角/格宽各有一份产品不用的副本; 删副本,测试不再断言两份抄来的常量相等。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
queryBudget、droppedBytes、evictions、activeSlotCount、usesSharedTap、notchDraws 只给测试读, 断言等于把实现再写一遍;axRef 没有调用方。notchDraws 的断言改为直接验 visible。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
28 处只给测试用的声明:产品已有另一套实现(菜单动态行、日程唤醒、键线渐变、状态文案、 刘海一排竖线等)或纯 helper(系统岛 tag、动画解析峰值、文件架名称省略等)。 能改验真实实现的断言改过去(quantity.drawing、dividerXs、SystemIslandPolicy.yields、 WindowBrowserStatusPresentationFactory、keyPress、SwellKick 采样峰值),其余随之删除。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
审批卡 2 分钟缩回、音乐右耳剩余时间、岛贴边平移、拖窗靠近刘海时提醒变点、 授权确认的按键新鲜度、欢迎窗日历权限行、Raycast 命令别名、钥匙串存不了的文案、 空的滚轮白名单。产品从未调用它们;以后要做时按规格重写。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
约 4.5 万行已完结轮次的证据快照、一次性研究探针和旧版发布关文档,不参与构建和门禁。 文档里的链接改指 git 历史 026091e 的永久链接;一并删掉只为 1.0.18 发布关写的 tests/vm/run-updater-phase3-1018.sh(读的正是归档里的清单草稿)。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 0e16d8a7-c184-4051-8c5a-02c6029a6d98) |
- 删掉值永远不变的开关:FileDragSensor.shelfEnabled、 WS2HookConfigPreview.writesUserHome、IdentityEvidenceBar.requireCalibratedThreshold、 ScreenCaptureBridge.deliverMain、ActionBar.showsMoreButton、NotchLevelControl.wantsKeyboardLight - 删掉没人接的回调与功能:加速度计设置页状态刷新、WS2FocusEffectExecutor.onBlocked、 FoldRenderer.motionX/Y、手柄扳机阻力反馈 - 去掉调用方已保证的夹值与空检查:网格列数 max(1,…)、p95 下标、音量二次夹值、 ArrangeController 的 ?? 兜底、NotchRow 负宽度、缩略图尺寸 isFinite 等 - 测试同步删掉只验证这些兜底的断言 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
restTuckAdmitted 恒为 false,休息时整屏收起与任意键放回的全局监听从未运行: .tuckAll 改为直接跳过,删掉 FocusRestReturnMonitor 及其测试与隐私登记。 admitted 恒为 true,删掉两处永远通过的检查。行为不变。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes / 改了什么
清理低价模型留下的死代码与无效测试,产品行为不变。共约 −4.7 万行:app 代码 −584 行、测试约 −500 行,其余是三个 archive 目录。
按 commit 分:
LatestFrameMailbox:最低系统提到 macOS 15 后调用方已全删,只剩测试。queryBudget、droppedBytes、evictions、activeSlotCount、usesSharedTap、notchDraws及其专用访问器;无调用方的CrashTrap.axRef。quantity.drawing、dividerXs、SystemIslandPolicy.yields、WindowBrowserStatusPresentationFactory、keyPress、SwellKick采样峰值),其余删除。tests/、tools/、docs/下的 archive:文档链接改指026091e9的永久链接;一并删掉读归档清单的tests/vm/run-updater-phase3-1018.sh。刻意保留:规划中路线(WS2Silent*、遥控/配对、CarPlay、认出你、电量)的未接骨架;能抓到真实回归的测试访问器;
FrameRhythmAnalysis(tools/probes/README.md留给 MO-02)。Reviewer 注意:滚轮白名单为空且
WS2InputController写死confirmedWheel: nil,滚动平滑和反向永远装不上,但设置里仍有开关——本 PR 只删空白名单,是否补核对或撤掉设置项需另定。How I checked / 怎么验证的
cd prototype && ./build.sh --checkpasses(scripts/local-gate.sh check全部通过,含 doc-links)scripts/local-gate.sh unit --jobs 6:261 项全部通过(跳过 0)🤖 Generated with Claude Code
Note
Low Risk
Mostly deletions and documentation; low runtime risk aside from force-unwrap changes in
ArrangeControllerif empty collections can still occur at runtime.Overview
Large hygiene refactor that removes ~47k lines without intended product behavior changes: deleted
docs/archive/(and relatedtests/archive//tools/archive/content), trimmed unused Swift and test-only code, and rewired doc links to permanent GitHub URLs at git commit026091e9instead of in-tree archive paths.App / prototype changes are mostly deletion of unreachable code and tightening call sites: removed unused
AppNapActivity.releaseBase(), dropped deadCountdownTimerSettings.chimeKey, simplifiedCalendarPresenterarc drawing, and replaced several??fallbacks with force unwraps inArrangeControllerwhere callers already guarantee non-empty collections.Docs now state archives live only in history;
code-map.md,testing.md,known-failures.md, and release cross-links follow the same pattern.tests/vm/run-updater-phase3-1018.shwas removed with the archived appcast drafts it depended on.Reviewed by Cursor Bugbot for commit e21dd02. Bugbot is set up for automated code reviews on this repo. Configure here.