Skip to content

fix: stabilize window focus and tiled frames - #110

Merged
qeude merged 6 commits into
mainfrom
t3code/fix/window-focus-and-borders
Sep 29, 2026
Merged

qeude merged 6 commits into
mainfrom
t3code/fix/window-focus-and-borders

Conversation

@qeude

@qeude qeude commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Keep tiled layouts and scroll offsets aligned with sizes accepted by applications.
  • Improve parking verification, animation fallback, and border tracking after native frame changes.
  • Trace hotkey sources and preserve focus behavior around transient windows.

Testing

  • Not run (change request content only).

Review in cubic

Note

Stabilize window focus, tiled frame acceptance, and border parking verification

  • Pointer focus is now denied when a selected non-modal transient window sits outside the target's ancestry, matching the existing cross-application modal block (FocusSelection.swift)
  • Tiled windows record the frame a native app accepts versus the requested layout frame. Layout, column widths, and scrolling now use accepted sizes, and reconciliation preserves accepted sizes unless the window is fullscreen, externally changed, or the discovered frame no longer matches (Layout.swift, RuntimeState.swift)
  • Parking verification schedules now carry an expected point and 1.4s deadline, and stale or duplicate verification callbacks are ignored. A parking repair is only recorded after a successful post-write readback (AXFrameCoordinatorSettlement.swift)
  • Border geometry is now timestamp-ordered: delayed observations and size writes without a verified readback can no longer replace newer committed geometry. Animation capability decisions use up to 16 recent latency samples per process instead of only the smoothed prediction, and animated frames fall back to an instant commit when a process cannot support intermediate frames
  • Safe-corner parking retains each window's original vertical position instead of defaulting to the bottom of the parking frame (Parking.swift)
  • Risk: columnLayoutWidth and focusedColumnLeftScrollOffset/focusedColumnTargetScrollOffset in WorkspaceScrolling.swift changed signatures and gained accepted-size-aware widths; column widths and scroll offsets can shrink or expand when windows accept sizes different from the preferred layout

Macroscope summarized a0561b5.

@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: c6c88d4f-2f65-40ba-97ce-e717275358da

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread Sources/DefiCore/Layout.swift Outdated
@macroscopeapp

macroscopeapp Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This is a broad runtime behavior change across tiling, focus, scrolling, border presentation, and asynchronous Accessibility writes, with new state and coordination logic rather than a small isolated fix. The parking verification retry path also has an unresolved medium-severity concern about continuing beyond its intended deadline.

Adjust the Minimum Blocking Severity for this repo — including turning it Off — in Settings. You can add or adjust custom eligibility rules. Learn more.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 23 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread Sources/DefiRuntime/WindowReconciliation.swift Outdated
Comment thread Sources/DefiCore/Layout.swift Outdated
Comment thread Sources/DefiMacOS/AXFrameCoordinatorSettlement.swift Outdated
Comment thread Sources/DefiRuntime/FocusSelection.swift
Comment thread Sources/DefiMacOS/MacOSPlatform+WindowBorderObservation.swift Outdated
Comment thread Sources/DefiModel/Window.swift Outdated
Comment thread Sources/DefiMacOS/HotKeyModels.swift
Comment thread Sources/DefiDaemon/DaemonCommands.swift Outdated
Comment thread Sources/DefiMacOS/AXFrameCoordinator.swift Outdated
Comment thread Tests/DefiRuntimeTests/WindowLifecycleTests.swift
@qeude
qeude force-pushed the t3code/fix/window-focus-and-borders branch from 01e6e1f to 2033c65 Compare September 28, 2026 22:22

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 7 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread Sources/DefiMacOS/AXFrameCoordinatorWrites.swift
Comment thread Sources/DefiMacOS/AXFrameCoordinator.swift
Comment thread Sources/DefiMacOS/AXFrameCoordinator.swift Outdated
Comment thread Sources/DefiMacOS/AXFrameCoordinatorSettlement.swift
@qeude
qeude merged commit f0d83a2 into main Sep 29, 2026
4 checks passed
@qeude
qeude deleted the t3code/fix/window-focus-and-borders branch September 29, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant