Skip to content

fix: keep the focused window's box steady on hover without magnification - #631

Merged
M4n0x merged 1 commit into
mainfrom
fix/626-focused-window-hover
Nov 13, 2026
Merged

M4n0x merged 1 commit into
mainfrom
fix/626-focused-window-hover

Conversation

@M4n0x

@M4n0x M4n0x commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

Problem

With focusedWindowStyle set and magnification off, the box behind the focused window's icon shrinks from 20 × 18 to 18 × 14 pt whenever the pointer is over the workspace widget. Fixes #626.

Changes

  • WorkspaceView passed magnifier.isActive to FocusedWindowHighlight as magnifying. The magnifier tracks every hover, whether magnification is set or not, so on any hover the box switched to its magnified outset: 2 pt beside the icon and none above and below, instead of 3 and 2 pt.
  • A magnifying property now also requires magnification. With magnification set nothing changes: the box still hugs the zoomed icon.

Testing

  • swift build --build-tests; swift test --filter on the scene, magnification, workspace layout and architecture tests: 53 pass. scripts/check.sh --quick and commitlint pass.
  • Images below: offscreen renders with Tonhalle Line 1.1.0, "windows": true and Terminal focused, in dark and light. Scenes can't hover, so the "pointer over" row is drawn with the outset main applies on hover (2 pt beside the icon, 0 above and below). With this fix, hover keeps the resting box.
  • No scene shows hover, so the screens bot shows no change.
  • Not checked: hovering a running bar.

The focused window's box before and after, with the pointer away and over the widget

Merging

One commit, any merge method. The feature for #627 changes the box's outset in another part of BarView.swift; the two merge cleanly in either order.

Claude Opus 5.5 via Claude Code

The box behind the focused window's icon hugs the icon while magnification zooms it. It read
that from the magnifier, which tracks every hover whether magnification is on or not, so
with magnification off the box still shrank from 20 × 18 to 18 × 14 pt on every hover.

It now counts as magnifying only when the widget sets magnification.

Fixes #626
@coderabbitai

coderabbitai Bot commented Nov 13, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

WorkspaceView now passes FocusedWindowHighlight a magnifying condition that is true only when magnification is configured and the pointer-tracking magnifier is active.

Changes: Focused-window highlight

Layer / File(s) Summary
Gate highlight magnification
Sources/StableBar/BarView.swift
WorkspaceView now uses the magnifying condition for FocusedWindowHighlight. The condition requires configured magnification and an active magnifier. A comment notes that pointer tracking continues when magnification is off.

Severity of issue fixed: Low

Merge Risk: Minimal · up to 944ea

With magnification off, the focused-window box no longer shrinks when the pointer hovers over the workspace widget. With magnification on, the box behavior is unchanged. No merge-blocking risk was found.

Pre-merge checks: Passed 2 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Linked Issues check Inconclusive Issue #626 requires the focused-window box to keep its size and shape on hover when magnification is not set. The PR description and the raw summary state the intended change: WorkspaceView passes a n… Provide readable source for the changed hunks in Sources/StableBar/BarView.swift at the reviewed head, or a narrowed read of WorkspaceView and the magnifying property. Confirm that magnifying is false when magnification is unset, regardless…
Passed Passed checks: 2 passed

Check name Status Explanation
Description check Passed The description follows the repository template. It has a Problem section that links issue #626. It has a Changes section that explains the cause and the fix. It has a Testing section that lists the b…
Out of Scope Changes check Passed The only change evidence available is the summary of Sources/StableBar/BarView.swift, reported as +4/-1 lines. It adds a magnifying gate and a comment that explains hover tracking. This change connect…
Full details: Description check

Explanation

The description follows the repository template. It has a Problem section that links issue #626. It has a Changes section that explains the cause and the fix. It has a Testing section that lists the build, test, and check runs, the offscreen renders, and what was not checked. It has a Merging section that states one commit works with any merge method and notes the merge order with #627. It ends with the model line that the Description check reads. The title line, which the template expects, is not part of the provided text, so it cannot be verified here.

Full details: Out of Scope Changes check

Explanation

The only change evidence available is the summary of Sources/StableBar/BarView.swift, reported as +4/-1 lines. It adds a magnifying gate and a comment that explains hover tracking. This change connects directly to #626. The summary and PR description show no unrelated change. The full changed-file list was not available, so files outside BarView.swift were not checked.

Full details: Linked Issues check

Explanation

Issue #626 requires the focused-window box to keep its size and shape on hover when magnification is not set. The PR description and the raw summary state the intended change: WorkspaceView passes a new magnifying property to FocusedWindowHighlight, and that property requires magnification to be set. This logic matches the issue diagnosis. However, the repository diff for Sources/StableBar/BarView.swift was unavailable, so the changed code was not read. The head file read was truncated before WorkspaceView and the magnifying property, so the implementation at the reviewed head was not confirmed. The tests cited in the PR description (53 passing, check script) were not verified. No automated test for the hover-without-magnification case was identified in the evidence.

Resolution

Provide readable source for the changed hunks in Sources/StableBar/BarView.swift at the reviewed head, or a narrowed read of WorkspaceView and the magnifying property. Confirm that magnifying is false when magnification is unset, regardless of magnifier.isActive. Confirm whether an automated test covers hover without magnification.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 0b4d4ed and 944eacd.

Files selected for processing: 1

  • Sources/StableBar/BarView.swift

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Before and after

main at 0b4d4ed → this pull request at 944eacd · 148 screens drawn in one CI job · 0 changed

148 unchanged screens

docs/essentials-clock-settings-dark, docs/essentials-clock-settings-light, docs/essentials-dark, docs/essentials-light, docs/essentials-settings-dark, docs/essentials-settings-light, docs/hero-dark, docs/hero-light, docs/popups-dark, docs/popups-light, docs/settings-dark, docs/settings-light, docs/themes-dark, docs/themes-light, scenes/accessibility-guide-dark, scenes/accessibility-guide-light, scenes/app-menu-popup-dark, scenes/app-menu-popup-light, scenes/apple-menu-settings-dark, scenes/apple-menu-settings-light, scenes/bottom-bar-popup-dark, scenes/bottom-bar-popup-light, scenes/chat-popup-dark, scenes/chat-popup-light, scenes/crowded-edit-bar-dark, scenes/crowded-edit-bar-light, scenes/dock-badges-bar-dark, scenes/dock-badges-bar-light, scenes/edit-bar-wide-group-dark, scenes/edit-bar-wide-group-light, scenes/essentials-clock-popup-dark, scenes/essentials-clock-popup-light, scenes/gruvbox-bar-dark, scenes/gruvbox-bar-light, scenes/horizontal-list-popup-dark, scenes/horizontal-list-popup-light, scenes/increase-contrast-bar-dark, scenes/increase-contrast-bar-light, scenes/increase-contrast-popup-dark, scenes/increase-contrast-popup-light, scenes/input-source-popup-dark, scenes/input-source-popup-light, scenes/notch-flare-bar-dark, scenes/notch-flare-bar-light, scenes/privacy-both-bar-dark, scenes/privacy-both-bar-light, scenes/privacy-hide-when-idle-bar-dark, scenes/privacy-hide-when-idle-bar-light, scenes/privacy-idle-bar-dark, scenes/privacy-idle-bar-light, scenes/privacy-microphone-bar-dark, scenes/privacy-microphone-bar-light, scenes/privacy-settings-dark, scenes/privacy-settings-light, scenes/reduce-transparency-bar-dark, scenes/reduce-transparency-bar-light, scenes/reduce-transparency-glass-bar-dark, scenes/reduce-transparency-glass-bar-light, scenes/settings-bar-dark, scenes/settings-bar-light, scenes/settings-bar-placement-bottom-dark, scenes/settings-bar-placement-bottom-light, scenes/settings-bar-placement-dark, scenes/settings-bar-placement-light, scenes/settings-crashes-dark, scenes/settings-crashes-light, scenes/settings-feedback-dark, scenes/settings-feedback-light, scenes/settings-general-dark, scenes/settings-general-light, scenes/settings-general-macos15-dark, scenes/settings-general-macos15-light, scenes/settings-general-move-dark, scenes/settings-general-move-failed-dark, scenes/settings-general-move-failed-light, scenes/settings-general-move-light, scenes/settings-general-move-moving-dark, scenes/settings-general-move-moving-light, scenes/settings-general-move-replace-dark, scenes/settings-general-move-replace-light, scenes/settings-general-setup-open-dark, scenes/settings-general-setup-open-light, scenes/settings-general-spaces-dark, scenes/settings-general-spaces-light, scenes/settings-help-dark, scenes/settings-help-light, scenes/settings-help-starred-dark, scenes/settings-help-starred-light, scenes/settings-narrow-dark, scenes/settings-narrow-light, scenes/settings-package-dark, scenes/settings-package-light, scenes/settings-package-widget-dark, scenes/settings-package-widget-light, scenes/settings-theme-dark, scenes/settings-theme-light, scenes/settings-uninstall-dark, scenes/settings-uninstall-failed-dark, scenes/settings-uninstall-failed-light, scenes/settings-uninstall-light, scenes/settings-widget-backgrounds-dark, scenes/settings-widget-backgrounds-light, scenes/settings-workspace-hidden-dark, scenes/settings-workspace-hidden-light, scenes/setup-look-below-menu-bar-dark, scenes/setup-look-dark, scenes/setup-look-no-notch-dark, scenes/setup-move-existing-dark, scenes/setup-move-failed-dark, scenes/setup-move-ready-dark, scenes/setup-move-replace-dark, scenes/setup-omniwm-connection-dark, scenes/setup-permissions-dark, scenes/setup-permissions-spaces-dark, scenes/setup-permissions-spaces-ready-dark, scenes/setup-placement-bottom-dark, scenes/setup-placement-dark, scenes/setup-touches-dark, scenes/setup-touches-macos15-dark, scenes/setup-touches-spaces-dark, scenes/setup-try-dark, scenes/setup-yabai-connection-dark, scenes/slider-end-stop-popup-dark, scenes/slider-end-stop-popup-light, scenes/stablebar-widget-bar-dark, scenes/stablebar-widget-bar-light, scenes/stablebar-widget-settings-dark, scenes/stablebar-widget-settings-light, scenes/starter-bar-dark, scenes/starter-bar-light, scenes/starter-edit-bar-dark, scenes/starter-edit-bar-light, scenes/system-monitor-memory-bar-dark, scenes/system-monitor-memory-bar-light, scenes/system-monitor-shows-settings-dark, scenes/system-monitor-shows-settings-light, scenes/update-popup-dark, scenes/update-popup-light, scenes/update-popup-star-github-cli-dark, scenes/update-popup-star-github-cli-light, scenes/update-popup-star-thanks-dark, scenes/update-popup-star-thanks-light, scenes/workspace-badges-bar-dark, scenes/workspace-badges-bar-light, scenes/workspace-focused-window-bar-dark, scenes/workspace-focused-window-bar-light, scenes/workspace-hidden-apps-bar-dark, scenes/workspace-hidden-apps-bar-light

Visual review: 148 screens, none changed.

@M4n0x
M4n0x merged commit 12814ec into main Nov 13, 2026
15 checks passed
@M4n0x
M4n0x deleted the fix/626-focused-window-hover branch November 13, 2026 15:12
@stablebar-releases

Copy link
Copy Markdown

🎉 This PR is included in version 0.15.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The focused window's box changes shape while the pointer is over a workspace widget

1 participant