Repository navigation
cmux-next: stop the layout migration tests indexing past the defaults (Index out of range crash) - #18399
Conversation
…p crashing SIDEBAR-NO-RECENTS dropped Recents from SidebarLayoutDocument.defaults, so the defaults have three sections. theGridBottomRowBecomesTheMinimalFooter and aCustomizedGridBottomIsKept still wrote sections[3], an index past the end, which traps (Swift/ContiguousArrayBuffer.swift:705: Index out of range) and kills CmuxNextPackageTests, so about 1,700 tests never report. They now find the bottom section by id behind #require. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Not verified: macOS jobs did not run: compile and app tests were skipped on CI passes on Written by |
With the crash gone, two tests the crash hid were red: aStoredRailLayoutBecomesTheSectionsDefaults expected the account in section 3, and aDestinationTurnsTheFooterIntoOneWideBackButton measured Back against the bottom band, which a bare sidebar's minimal footer leaves empty. The first now finds the bottom section by id; the second expects Back at the bottom edge when the band is empty. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/37689519735 at 3e0a1ad failed: cmux-next generated files. |
Summary
Fixes the base-red crash that hides every Swift result.
CmuxNextPackageTestsdies withSwift/ContiguousArrayBuffer.swift:705: Fatal error: Index out of range(signal 5), so about 1,700 tests never report.Cause: SIDEBAR-NO-RECENTS removed Recents from
SidebarLayoutDocument.defaults, so the defaults now have three sections. Two tests inSidebarLayoutMigrationTestsstill replaced the footer withstored.sections[3] = …, an index past the end:theGridBottomRowBecomesTheMinimalFooteraCustomizedGridBottomIsKeptFix: a helper finds the bottom section by
bottomSectionIDbehindtry #require. A future change to the defaults then fails one test instead of trapping the whole process. Test-only change.With the crash gone, the run finishes and showed two more tests with the same Recents-era layout assumption. Both are fixed here:
aStoredRailLayoutBecomesTheSectionsDefaultsexpected the account in section 3; it now finds the bottom section by id.aDestinationTurnsTheFooterIntoOneWideBackButton(from cmux-next sidebar: the footer becomes Back on a destination page #18326) measured Back against the bottom band. A bare sidebar's minimal footer (f3962c5) leaves that band empty, so Back sits at the bottom edge, as the app does. The test now expects that when the band is empty.How it was found
37f48efa7d6(run 37628869285) and is absent at07637f3853e(run 37626290032, a full 7,136-test summary). That range is the all-chats / SIDEBAR-NO-RECENTS merge, which droppedrecentsSectionfrom the defaults.sections[N]writes in the tests, only these two index the layout defaults past 2.Testing
ContextMenuExportParityTests: a separate fix is waiting for the catalog queue.germanTableIsRead,everyKeyShipsInEnglishAndJapanese,theJapaneseTableIsRead, …):Bundle.moduletables come up nil on the runner.Changelog
none
🤖 Generated with Claude Code
Note
Low Risk
Changes are limited to Swift unit tests; no production sidebar or migration logic is modified.
Overview
Fixes test-only failures that were trapping the whole
CmuxNextPackageTestsrun after SIDEBAR-NO-RECENTS shrankSidebarLayoutDocument.defaultsto three sections.SidebarLayoutMigrationTestsstops writingstored.sections[3]when building grid-bottom fixtures. A newdefaultsWithGridBottom()helper resolves the footer viabottomSectionID(with#require), and rail migration expectations locate the account item in that bottom section instead of assuming index3.SidebarFooterBackTestsbroadens back-button placement checks for the minimal footer: when the footer band is shorter than the button, the test expects alignment to the bottom edge rather than the (empty) band’s vertical center.Reviewed by Cursor Bugbot for commit 18654d1. Bugbot is set up for automated code reviews on this repo. Configure here.