Repository navigation
refactor: 减少防御性代码 - #46
Merged
Merged
Conversation
- 删掉值永远不变的开关: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>
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: 21e94b95-c638-42ad-b65d-12b1ddde3bc6) |
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.
接在 #45 之后(base 为
cleanup/dead-code),合并 #45 后改 base 为 main。改了什么
shelfEnabled、writesUserHome、requireCalibratedThreshold、deliverMain、showsMoreButton、wantsKeyboardLight。onBlocked、motionX/Y(从没赋值)、DualSense 扳机阻力反馈(注释自认无调用方,已记入内部待办)。ArrangeController的兜底、NotchRow负宽度、缩略图尺寸isFinite等。fileDrag.reason.shelfOff本地化键。没动的
restTuckAdmitted、WS2FocusWindowPort.admitted是有意的功能闸门,留待决定;系统 API 读数的夹值保留。检查
scripts/local-gate.sh check全过scripts/local-gate.sh unit --jobs 6:261 个全过🤖 Generated with Claude Code
Note
Medium Risk
Focus-rest window tucking and global “any key click to return” are removed; widespread
!assumes invariants—wrong inputs could trap, though unit tests passed.Overview
Strips constants and branches that never varied in practice: file-drag
shelfEnabled, hook previewwritesUserHome, identityrequireCalibratedThreshold(threshold is always required), capturedeliverMain, window-browsershowsMoreButton, notch keyboard-light probing, and related tests/localization (fileDrag.reason.shelfOff).Removes unused or unwired behavior:
FocusRestReturnMonitorand its tests/run script (rest no longer installs global key/mouse to restore windows—tap the focus card only); DualSense trigger feedback; fold renderermotionX/motionY; accelerometeronStatusTick;WS2FocusEffectExecutor.onBlocked.Focus window effects: rest-phase
tuckAllis a no-op (count only);WS2FocusWindowPortdropsadmitted/restTuckAdmittedgates—chat tuck runs when the port has an owner.Simplifies math/UI paths where callers already guarantee valid inputs: many
??/max(0, …)clamps become force unwraps or direct math (ArrangeController,NotchRow, Launchpad pager, volume stepping, calendar progress ring always strokes, etc.).Reviewed by Cursor Bugbot for commit 268d657. Bugbot is set up for automated code reviews on this repo. Configure here.