Repository navigation
cmux NEXT: a closing sidebar row shifts with a viewport re-anchor - #20795
Conversation
cx-y2uf5 item 1: a close above the viewport re-anchors it while an earlier close's row is still closing; that row stays at its old y and jumps by the shift against its neighbors. Red on the fleet before the fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cx-y2uf5 item 1. A close above the viewport re-anchors it (rows and offset shift together), but a row still closing from an earlier change was not in rowViews: it stayed at its old y and kept closing toward its old end, so it jumped by the shift against its neighbors. A closing row now remembers its end frame (SidebarRowView.closingEnd, cleared when its close recycles it); RowMotion.shift moves it and its end with the rows and re-targets its close on the same .move spring. Red: fleet step d5ec16f4a3881f553153b4d2 (aws-m4pro-9, test commit 6799b83): SidebarCloseWhileScrolledTests.swift:73: Expectation failed: (abs(now - gap) → 26.0) < 0.5 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 |
|
Not verified: macOS jobs did not run: compile and app tests were skipped on CI passes on Written by |
…bar-leaving-rows-reanchor
…bar-leaving-rows-reanchor
|
Found 1 test failure on Blacksmith runners: Failure
|
|
The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/38702990697 at ed9bbb8 failed: cmux-next generated files. |
cx-y2uf5 item 1. When the sidebar was scrolled and a row closed while the list re-anchored its viewport, the closing row stayed at its old frame and jumped one row height (26 px) against its neighbor.
SidebarListView+CloseScroll.applyKeepingViewportshiftedrowViews, decorations and group lines by the delta, but a leaving row is no longer inrowViews:RowMotion.runanimated it to its end frame without tracking it.Fix
SidebarRowView.closingEnd. The field is cleared on every path where its close recycles it.RowMotion.shift(_:by:)movesrowViews, the closing rows and their ends by the delta, then re-targets each close on the same.movespring. The original close's completion still recycles the row.Testing
SidebarCloseWhileScrolledTests.swift:73:(abs(now - gap) → 26.0) < 0.5. A first run on aws-m4pro-4 skipped the test, because that host has no display and motion snaps there.aRowStillClosingShiftsWithItsNeighborsWhenTheViewportReanchors()passes. The step still exits 1 onSidebarInsertWhileDisplayAsleepTests. That's a base red, and it fails identically on the test-only commit; test(cmux-next): a closed sidebar row may park hidden in the list (base red) #20793 fixes it.--base origin/feat-cmux-next), check-concurrency and crash_ratchet all pass.Captures
Real cmux NEXT DEV builds of the merge-base and this head on a capture mini, recorded with
debug.window_recordat 60 fps. The setup:What it shows:
motion.spring.moveresponse 1.2 s, labelled), a half-faded ghost then sits in the reopened gap for about 8 frames.The "playback 4x slower" clip is slowed in post-processing only. Base and head events differ by up to 2 frames, because socket timing varies.
Open observation, the same on base and head: at the re-anchor frame the rows below the gap dip 10-15 px and glide back. This fix doesn't change that, and it will be a follow-up bead if it's unintended.
Changelog
Fixed: a sidebar row closing while the list scrolls no longer jumps against its neighbor
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes a sidebar row that jumps by one row height when a close above the viewport re-anchors it mid-close.
A closing row wasn't part of
rowViews, so a viewport re-anchor left it at its old frame while its neighbors shifted with the scroll offset. Now each closing row records its end frame inSidebarRowView.closingEnd, andRowMotion.shiftmoves the closing rows and their ends with the rows, then re-targets the close on the same.movespring.SidebarCloseWhileScrolledTestscovering two closes in quick succession in a scrolled sidebar.Written for commit e67b448. Summary will update on new commits.
Showcase
Full quality: compare-fast-light-playback4x-slow.mp4
Full quality: compare-fast-dark.mp4
Open the live gallery