Repository navigation
cmux-next sidebar: the list matches a fresh rebuild after each operation (invariant test, rails in list order) - #23389
Conversation
…tion Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15ba7-3152-78b2-bfdf-bb6eb0d5a053&host=cosmic-gray
…n list order foldLines appended the folded group's rail and showMissing appended a shown one, so after a fold the list's rails were out of the order a full rebuild gives them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15ba7-3152-78b2-bfdf-bb6eb0d5a053&host=cosmic-gray
…ebar-rebuild-invariant
|
Owned by claude-sr2/sidebar-drag-bugs on cosmic-gray · session |
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Not verified: macOS jobs did not run: compile and app tests were skipped on CI passes on Written by |
|
PASS (review on head 81a8496, correctness first; priority-view lane, session 6807b41c). The test goes through the app's paths.
The fix is correct.
Non-blocking notes
I did not run it; I relied on your fleet red and green and on CI for the merged head. |
|
Bead |
|
Shipped in:
|
…, Pinned and custom sections, multi-row drags and motion; a dragged tab stays glass (#23542) * test(next): sidebar rebuild invariant covers Group by Folder, filters, Pinned and custom sections, multi-row drags and motion; a dragged tab stays glass Extends SidebarIncrementalMatchesRebuildTests (#23389) to the gaps it named, each through the list's own pointer and key handlers, and pins #22807: the tab drag lands in Work between docs and web, and a lifted strip tab keeps its glass fill at every step of a real pointer drag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15ba7-3152-78b2-bfdf-bb6eb0d5a053&host=cosmic-gray * test(next): the rebuild check waits for the list's springs with motion on; the gap drags move like a hand With motion on the check compared after 90 ms, while springs and fades still ran: half-point offsets and rows mid-fade. It now waits until no animation runs in the list (at most 3 s), then compares. The gap scenarios' drags move 4 pt per step, and the Pinned and two-row drags check what they are about. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15ba7-3152-78b2-bfdf-bb6eb0d5a053&host=cosmic-gray * test(next): the rebuild check waits until the list stops moving, not for layer animations A row's spring writes its frame on each display frame and leaves no layer animation, so the check now waits until two looks 50 ms apart agree (at most 3 s) before it compares. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15ba7-3152-78b2-bfdf-bb6eb0d5a053&host=cosmic-gray --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
#23182 was one bug of a class: an incremental sidebar path drifted from what a full rebuild draws, and the drift stayed until a rebuild. This adds one invariant test for the class, and fixes the one drift it found.
The invariant
SidebarIncrementalMatchesRebuildTestsruns seven operations on a realSidebarView, through the paths the app uses (the sidebar document's drag, the model's fold, a click, an external tab drag), then the daemon's echo:After each step, and after every group then folds and opens and a few rows are clicked, it compares the list on screen with a list built fresh from the same model: rows, their order and frames, row views (frame, alpha, selection, untracked strays), drawn rails, the list's rail records, selection, suppressed rows and the gap. Motion is off (Reduce Motion), so the list shows the spring's ends. A mismatch prints a field-by-field diff.
The drift it found
A fold put the folded group's rail last in the list's rail records (
foldLines), andshowMissing(#23182's path) appended the rail it showed. The rails drew in the right place, but in a different order from a rebuild: 12 mismatches over 6 of the 7 operations, all this one cause. Both now insert a rail at its place in the list, top to bottom.Changelog
none
No capture: nothing users see changes. The fix only reorders the list's internal rail records (
groupLineViews.lines); every rail already drew at the same frame.Observed / Not run
package-test-lane.sh ... SidebarIncrementalMatchesRebuildTests, fleet step 98ba6d7e5236: 12 issues, every one a rail-order diff, e.g.order: [g-infra, g-work]vsfresh: [g-work, g-infra]after Work folds and opens.tabAcrossGroups(the step passes on an unexpected drop) is a follow-up.🤖 Generated with Claude Code
Agent session: cosmic-gray