Repository navigation
Lay out Bento again when the work area changes back before settling - #167
Conversation
A work-area change waits for its settlement before Bento records the new area. If the area changed back before that, Bento compared it with the old recorded area, saw no change, and left the windows sized for the area in between. Repair was the only way out. Keep the area of a written but unconfirmed layout in pendingWorkArea. A change from either the confirmed or the pending area now lays the windows out again. A failed settlement still leaves the change to retry, and confirming any work area clears the pending one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review summaryTraced the fix end to end: Checked the affected paths and their reverse transitions:
Checked repository rules: the diff touches only No confirmed code faults found, so no inline comments were posted. Not a code fault, flagging for completeness: the PR's evidence section only states I could not execute |
Problem
When a display's work area changes, Bento lays the windows out for the new
area but records that area only after the windows settle. If the area changed
back before then, Bento compared it with the old recorded area, saw no change,
and left the windows sized for the area in between. Only Repair Bento fixed it.
The window is a fraction of a second. A display change that is undone, a Dock
size change, or Leave space for Dock (#168) turned on and off quickly can hit it
when the windows settle slowly.
Change
A session keeps the work area of a written but unconfirmed layout in
pendingWorkArea. A change from either the confirmed or the pending area laysthe windows out again. A failed settlement still leaves the change to retry on
a later sweep. Confirming any work area, including through Repair, clears the
pending one. The field is runtime-only.
Evidence
aWorkAreaThatChangesBackBeforeSettlingIsAppliedAgainfails on
main. The change back returns no layout. The same stuck layoutappeared once in an app-model test on the Dock branch under full-suite load:
windows stayed at height 720 after the area returned to 800.
swift testpasses (all three test targets),including the existing settlement and retry tests. The Debug
xcodebuildwith
CODE_SIGNING_ALLOWED=NOsucceeds on this branch.Add Leave space for Dock and stop following the auto-hidden Dock #168, on a 1210×812 display with three windows in Bento:
on or off.
Limits
Responsive windows settle in about 80 ms, which is less than the 120 ms
display-refresh delay. The same rapid toggles on a build without this fix
never got stuck either. The Core test is the reproduction.
Safety
None. Core layout policy only. No permissions, private APIs, or stored data.
🤖 Generated with Claude Code