Repository navigation
Fix two main breakages from the CI-disabled window: reorderPanel overflow, double shortcut notification - #8153
Merged
Merged
Conversation
reorderPanel(_:by:) computed currentIndex + offset before clamping, so offset = Int.max / Int.min (exactly what reorderPanelClampsExtremeOffsetsWithoutOverflow drives) trapped with a Swift runtime arithmetic-overflow crash and killed the whole CmuxCanvasUI test process before it printed its summary. Saturate via addingReportingOverflow, then clamp as before. This landed broken in #8080, which merged while the repo's CI workflows were manually disabled, and has broken swift-package-tests on main since.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughPanel reordering now handles integer-overflowing offsets safely. Settings reloads report whether they emitted a change notification, allowing the host callback to avoid duplicate notifications. ChangesPanel reordering
Settings notification coordination
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (23 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
notifyShortcutSettingsDidChange() called settingsFileStore.reload(), which already posts didChangeNotification when the file's contents changed, then unconditionally posted the same notification again — every real settings-file change notified listeners twice, and changedSettingsFilePostsOneShortcutNotification (added with the same PR, #8091) fails on it in CI (app-host shard 4/4, red on main). reload() now reports whether it posted; the action only posts when the reload saw no change, preserving the exactly-once contract both tests encode.
This branch was successfully deployed
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.
Main has been red since today's window where the repo's CI workflows were manually disabled — two PRs merged unchecked and each broke a different job. Both fixes here:
CanvasModel.reorderPanelarithmetic overflow (from Add surface and workspace reorder shortcuts #8080):currentIndex + offsettrapped onInt.max/Int.minbefore the clamp, crashing the whole CmuxCanvasUI suite mid-run (swift-package-testsred). Fixed with a saturatingaddingReportingOverflowbefore the existing clamp.swift test --package-path Packages/macOS/CmuxCanvasUI: 45/45 with the summary printed.Double
didChangeNotificationon settings-file change (from Fix Settings shortcut display for legacy overrides #8091):notifyShortcutSettingsDidChange()calledreload()(which posts when contents changed) then posted again unconditionally, so every real change notified listeners twice;changedSettingsFilePostsOneShortcutNotificationfails on exactly this (app-host unit tests (4/4)red, three runs in a row here and on main's own CI).reload()now reports whether it posted and the action posts only when it didn't, keeping the exactly-once contract both Fix Settings shortcut display for legacy overrides #8091 tests encode.Related flaky-test hardening tracked separately: #8159
Summary by CodeRabbit