Repository navigation
Conversation
00d208f to
0dc4422
Compare
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — This PR introduces substantial production behavior: constraint-aware stack sizing, rejected joins, drag-target changes, and automatic splitting of existing stacks when a viewport or app constraint changes. Because it adds a new user-facing workflow and changes multiple existing runtime paths, the scope warrants human review. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
Count each unconstrained window's gaps and 1pt drawable height in a stack's lower bound, so stackFit no longer accepts a stack that squeezes a sibling below the frame applyGaps emits.
There was a problem hiding this comment.
Review completed against the latest diff
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
2 issues found across 18 files
Confidence score: 3/5
- In
stacks_check.py, the unscoped calls change every monitor, but the journey selects only the first; cleanup can also overwrite every monitor’s bottom edge with one restore value. Scope the changes to the test monitor and restore its original bottom edge. - In
ScrollReconciliation.swift, splitting stacks on every monitor can leave monitors with no submitted layout in the old arrangement. Propagate the changed monitor IDs and include them in the layout.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="Sources/DefiRuntime/ScrollReconciliation.swift">
<violation number="1" location="Sources/DefiRuntime/ScrollReconciliation.swift:57">
P2: This splits stacks on every monitor, but callers can submit layout for only a subset, leaving other monitors' native frames in the old stack arrangement. Propagate the changed monitor IDs and include them in the layout submission.</violation>
</file>
<file name=".agents/skills/verify-defi/stacks_check.py">
<violation number="1" location=".agents/skills/verify-defi/stacks_check.py:186">
P1: These unscoped calls change every monitor, although the journey selects only the first; cleanup then replaces every bottom edge with one `--restore-bottom` value. Scope the changes to the test monitor and restore its saved edge.</violation>
</file>
Requires human review: Auto-approval blocked because this review re-detected 5 unresolved issues already reported by Cubic.
View guided diff | Turn on auto-fix | Re-trigger cubic
- format stack rejection heights as Double so an extreme minimum cannot trap - make WindowSizeConstraints.minimumHeight a let so callers cannot drop it - exclude native fullscreen windows from oversized-stack-windows - stacks journey: exact window ID matching, every completion kind, require the stack-constraint error, and fail unless exactly one daemon remains
There was a problem hiding this comment.
1 issue found across 6 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="Sources/DefiCore/StackConstraints.swift">
<violation number="1" location="Sources/DefiCore/StackConstraints.swift:15">
P3: `StackConstraints.swift` now uses Foundation's `formatted(...)` but does not import Foundation. It compiles only because `DefiModel` imports Foundation and Swift leaks that import. Add `import Foundation` explicitly.</violation>
</file>
- compute accepted-size slot offsets in one pass - describe viewport-based limits and capped-maximum centring in CONFIGURATION.md - stacks journey: require one monitor, validate --restore-bottom, and close a fixture whose setup fails
Import Foundation explicitly where StackRejection formats heights.
Enforce a window's verified maximum height on its final gapped frame, since applyGaps shrinks gaps wider than half a frame after the slot-level cap.
There was a problem hiding this comment.
All reported issues were addressed across 3 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Count each unconstrained window's gaps and 1pt drawable height in a stack's lower bound, so stackFit no longer accepts a stack that squeezes a sibling below the frame applyGaps emits.
- format stack rejection heights as Double so an extreme minimum cannot trap - make WindowSizeConstraints.minimumHeight a let so callers cannot drop it - exclude native fullscreen windows from oversized-stack-windows - stacks journey: exact window ID matching, every completion kind, require the stack-constraint error, and fail unless exactly one daemon remains
- compute accepted-size slot offsets in one pass - describe viewport-based limits and capped-maximum centring in CONFIGURATION.md - stacks journey: require one monitor, validate --restore-bottom, and close a fixture whose setup fails
Import Foundation explicitly where StackRejection formats heights.
Enforce a window's verified maximum height on its final gapped frame, since applyGaps shrinks gaps wider than half a frame after the slot-level cap.
881c670 to
3f09f75
Compare
Count each unconstrained window's gaps and 1pt drawable height in a stack's lower bound, so stackFit no longer accepts a stack that squeezes a sibling below the frame applyGaps emits.
- format stack rejection heights as Double so an extreme minimum cannot trap - make WindowSizeConstraints.minimumHeight a let so callers cannot drop it - exclude native fullscreen windows from oversized-stack-windows - stacks journey: exact window ID matching, every completion kind, require the stack-constraint error, and fail unless exactly one daemon remains
3f09f75 to
e7c5862
Compare
- compute accepted-size slot offsets in one pass - describe viewport-based limits and capped-maximum centring in CONFIGURATION.md - stacks journey: require one monitor, validate --restore-bottom, and close a fixture whose setup fails
Import Foundation explicitly where StackRejection formats heights.
Enforce a window's verified maximum height on its final gapped frame, since applyGaps shrinks gaps wider than half a frame after the slot-level cap.
Count each unconstrained window's gaps and 1pt drawable height in a stack's lower bound, so stackFit no longer accepts a stack that squeezes a sibling below the frame applyGaps emits.
- format stack rejection heights as Double so an extreme minimum cannot trap - make WindowSizeConstraints.minimumHeight a let so callers cannot drop it - exclude native fullscreen windows from oversized-stack-windows - stacks journey: exact window ID matching, every completion kind, require the stack-constraint error, and fail unless exactly one daemon remains
e7c5862 to
b89d0d1
Compare
- compute accepted-size slot offsets in one pass - describe viewport-based limits and capped-maximum centring in CONFIGURATION.md - stacks journey: require one monitor, validate --restore-bottom, and close a fixture whose setup fails
Import Foundation explicitly where StackRejection formats heights.
Enforce a window's verified maximum height on its final gapped frame, since applyGaps shrinks gaps wider than half a frame after the slot-level cap.
Balanced water-filling over per-window minimum and maximum heights, a pure stack fit decision, and a deterministic separation of impossible stacks.
…eight A target below a window's minimum is refused by the app and was re-sent on every desktop sync. Raising the target to the minimum, top-aligned, matches what the app accepts, mirroring how widths clamp to their minimum.
The window server reports a minimum no larger than the current frame, so a fixture window opened below its minimum hid it from the first constraint read. Also make the stacks journey wait for focus and adoption, judge oversized retries by applied writes, and fail if another install replaces the daemon mid-run.
Count each unconstrained window's gaps and 1pt drawable height in a stack's lower bound, so stackFit no longer accepts a stack that squeezes a sibling below the frame applyGaps emits.
- format stack rejection heights as Double so an extreme minimum cannot trap - make WindowSizeConstraints.minimumHeight a let so callers cannot drop it - exclude native fullscreen windows from oversized-stack-windows - stacks journey: exact window ID matching, every completion kind, require the stack-constraint error, and fail unless exactly one daemon remains
- compute accepted-size slot offsets in one pass - describe viewport-based limits and capped-maximum centring in CONFIGURATION.md - stacks journey: require one monitor, validate --restore-bottom, and close a fixture whose setup fails
Import Foundation explicitly where StackRejection formats heights.
Enforce a window's verified maximum height on its final gapped frame, since applyGaps shrinks gaps wider than half a frame after the slot-level cap.
A drag over a column only offers a stack when the stack fits the windows' verified minimum heights, so a drop never stacks and then splits. The overlay preview uses the same slot heights the layout will apply.
b89d0d1 to
4fe0976
Compare
…nstraints # Conflicts: # .agents/skills/verify-defi/features/README.md # Sources/DefiCore/Layout.swift # Sources/DefiDaemon/DaemonStatusLifecycle.swift
Why
Stacked windows got equal slots even when an app could not shrink that far. The app refused the height, Defi retried it on every desktop sync, and the window overflowed its slot. With the proxy overlay from #150 the refusal is also visible: the overlay draws the picture at the asked height, then fades to a native window of another height.
Closes #93.
What changed
This PR stacks on #150 (
feat/window-proxy-ribbon).Windowkeeps a verifiedminimumTiledHeightfrom the existing optional private constraint read. Without that read, stacks behave as before.Sources/DefiCore/StackConstraints.swiftsplits a column by water-filling within each window's verified minimum and maximum height. Unconstrained stacks are split exactly as before.join-windowrefuses a stack that cannot fit and leaves the workspace untouched. The CLI printscannot join: stack needs 1650pt but only 1367pt is available.oversized-stack-windows=indefi status.Scope
Stack heights,
join-window, and the drag-to-stack target from #150. Overview drops into a stack are unchanged. If such a stack cannot fit, the separation rule splits it on the next sync.Tradeoffs
TiledSizeAcceptance. Changing a request from it would start a resize battle.Blast Radius
Pure layout and runtime code, plus one more field from a constraint read that already ran. No new Accessibility writes, no per-frame work, no overlay or border code. The drag change only adds a feasibility check and a slot-height computation per pointer update, both pure math over one column.
Verification
python3 script/verify.py localpasses on this head. One earlier run failedFrameGeometryReadTestson a 3 s timing wait outside this diff. The suite passed alone and the full rerun passed.7f6d7608),python3 script/verify.py desktop <run> --wait --filter 'DesktopE2ETests/(testAppliedTargetConvergesWithRealWindowFrame|testManagedResizeAnimationConvergesWithAdaptiveSizeWrites|testReenteringWindowJoinsFirstAnimatedRibbonSample|testHorizontalAnimationFrameWritesPositionWithoutSize)'ran 4 tests, 4 passed, 0 skipped. Accessibility was available, and the session restore passed. One earlier run passed the same 4 tests but its restore hit a LaunchServicesopenerror -600. A manual restore under the desktop lock then succeeded.python3 script/desktop_lock.py --wait python3 .agents/skills/verify-defi/stacks_check.pyon the installed build: all six scenarios passed, with one daemon left afterwards.AGENTS.mdand theduration_ms = 0workspace switch. They do not touch stacks or drag, so the desktop checks were not repeated on this head.Note
Add automatic stack separation and window height constraints to Defi layout
minimumTiledHeight(Window.swift, WindowBorderPrivateProviders.swift), and stack slots are allocated with a water-filling algorithm that honors minimum and maximum heights per window (StackConstraints.swift).joinFocusedWindowrejects infeasible joins with aStackRejectionerror before mutating state, mouse drops hide stack targets that cannot fit, andsynchronizeScrollOffsetsautomatically separates infeasible columns into right-adjacent columns while preserving window order, focus, and scroll anchors (ScrollReconciliation.swift).oversized-stack-windowsindefi status.ClampFixtureDEFI_FIXTURE_MINmode, plus unit tests for allocation, rejection, separation, and mouse previews.separateInfeasibleStacksin StackConstraints.swift and thecomputeLayout/acceptedTiledSizeschanges in Layout.swift, which now use constrained slot geometry instead of equal-height slots.Macroscope summarized 488a223.