Skip to content

build: draw the Accessibility guide with its bundled icon - #625

Merged
Seb-GRAF merged 2 commits into
mainfrom
fix/accessibility-guide-icon-renders
Nov 13, 2026
Merged

Seb-GRAF merged 2 commits into
mainfrom
fix/accessibility-guide-icon-renders

Conversation

@Seb-GRAF

@Seb-GRAF Seb-GRAF commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The screens bot reports changes around the Accessibility guide's icon on unrelated PRs, including #619, even when AppIcon.icns is identical in both builds. The guide reads the icon through NSApp.applicationIconImage, so the capture depends on macOS's application-icon lookup.

Fixes #624.

Changes

The Accessibility guide accepts an icon, keeping the current application icon as its default. Its scene loads AppIcon.icns directly from the bundle and selects its 256-point artwork before SwiftUI scales it, following WorkspaceAppIcons. Keeping the multi-representation image made the first CI capture soft because drawing could select small artwork. An unbundled executable keeps the existing fallback.

The running guide and its drag image keep their current icon source. Both scenes remain covered, and comparison thresholds are unchanged. No configuration or user-facing behavior changes.

Testing

  • swift build --build-tests and scripts/check.sh --quick pass.
  • Existing scene and fixed-rendering tests: 54 pass on macOS 27.2.1. The first run of the final change had one pixel-equality failure in the unchanged setupSceneDrawsTheSameStepHoweverLongItSettles; it passed alone and all 54 passed on the full rerun. The cause of that initial failure was not established.
  • Rendered both appearances from separate head.app and base.app bundles and repeated the head capture. All corresponding PNG files are byte-identical; the existing CI comparison reports zero changed pixels.
  • Replaced the icon in a disposable bundle with the older v0.9.0 artwork. The comparison detects 1,488 changed pixels in dark mode and 1,532 in light mode, all around the icon, confirming genuine artwork changes remain visible.
  • Compared unchanged main with the fix: only the icon changes (718 pixels in dark mode, 595 in light mode). No bar was launched and no personal configuration was loaded. The intermittent native-icon difference itself was not reproduced between two unchanged local builds; CI on macOS 26 remains the runner-specific check. M4n0x's audit of 55 CI runs found the same bundled-versus-macOS icon difference in seven runs.
  • git diff --check and commit hooks pass. No new UI test: the evidence is the actual scene captures and their pixel comparisons.
Appearance Before After
Dark Accessibility guide before, dark Accessibility guide after, dark
Light Accessibility guide before, light Accessibility guide after, light

This PR can still show an icon difference against main because it changes the source used to draw the icon. Subsequent comparisons use the bundled artwork on both sides.

Merging

Two build commits; use a rebase merge to preserve their subject-only messages. This changes scene capture tooling and does not need an app release.

GPT-6 Astra (gpt-6-astra) via the Codex harness in T3 Code.

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The accessibility guide view now accepts an icon image and uses it for the StableBar image. The scene renderer loads and converts AppIcon.icns from the main bundle, then uses NSApp.applicationIconImage if loading or conversion fails.

Changes: Accessibility guide icon

Layer / File(s) Summary
Load and display the guide icon
Sources/StableBar/AccessibilityGuide.swift, Sources/StableBar/SceneRenderer.swift
AccessibilityGuideView accepts an icon and uses it for the StableBar image. The scene renderer loads and converts AppIcon.icns from the main bundle and falls back to NSApp.applicationIconImage if loading or conversion fails.

Severity of issue fixed: Medium

Merge Risk: Minimal · up to 9a4ba

The Accessibility guide now draws its icon from the bundled artwork and keeps the previous fallback when the file is missing. No concrete merge-blocking risk was found. The remaining runner-specific check is the macOS 26 CI run.

Pre-merge checks: Passed 3

Check name Status Explanation
Linked Issues check Passed [#624] Requirement: unchanged icon artwork must produce identical Accessibility guide captures, and real artwork changes must stay detectable. Diagnosis: the scene read NSApp.applicationIconImage, w…
Out of Scope Changes check Passed The changes are limited to Sources/StableBar/AccessibilityGuide.swift (new icon property with default NSApp.applicationIconImage, used in the displayed image) and `Sources/StableBar/SceneRendere…
Description check Passed The description follows the repository template closely. It has all four sections (Problem, Changes, Testing, Merging) and a final model line. The Problem section explains the cause and links issue #6…
Full details: Linked Issues check

Explanation

[#624] Requirement: unchanged icon artwork must produce identical Accessibility guide captures, and real artwork changes must stay detectable. Diagnosis: the scene read NSApp.applicationIconImage, which depends on macOS icon lookup. Evidence at head: Sources/StableBar/SceneRenderer.swift, case .accessibilityGuide, loads AppIcon.icns from Bundle.main, sets a 256×256 size, converts it to a CGImage, and passes it as AccessibilityGuideView(icon:). It falls back to NSApp.applicationIconImage only when the resource or conversion fails. Sources/StableBar/AccessibilityGuide.swift at head declares var icon: NSImage = NSApp.applicationIconImage and renders Image(nsImage: icon). The running guide still uses the default, and the drag image still uses NSApp.applicationIconImage, so those paths keep their current source. Both dark and light scenes use this path. The author reports byte-identical repeated captures and zero changed pixels, and a detected change with older artwork. Unresolved: the whole-PR text diff could not be read because changed blobs were unavailable, so the change set is confirmed from file contents at head and the summary. The CI result on macos-26, the issue's runner, is not in the evidence. The intermittent difference was not reproduced locally.

Full details: Out of Scope Changes check

Explanation

The changes are limited to Sources/StableBar/AccessibilityGuide.swift (new icon property with default NSApp.applicationIconImage, used in the displayed image) and Sources/StableBar/SceneRenderer.swift (accessibility-guide scene loads the bundled AppIcon.icns with a fallback). The head content of both files confirms these changes. Both directly implement #624. The default parameter preserves the running guide and drag image behavior, which matches the PR's statement of no user-facing change. No unrelated files appear in the supplied summary. Limit: the whole-PR diff was unavailable, so the complete file list rests on the summary.

Full details: Description check

Explanation

The description follows the repository template closely. It has all four sections (Problem, Changes, Testing, Merging) and a final model line. The Problem section explains the cause and links issue #624 with "Fixes #624." The Changes section explains the icon-source change and why it is needed, including the soft-capture trade-off. The Testing section lists the commands run, the test results, byte-identical captures, the negative control with older artwork, and what was not reproduced. It also gives before/after screenshots. The Merging section states the merge method (rebase, to keep subject-only commit messages) and that no app release is needed. The final line names the model and harness. The description is thorough and specific. Minor gaps: the Merging section does not clearly say which commit messages semantic-release will read beyond the note on subject-only messages, and the template's placeholder for the screens bot is addressed only by the screenshots, which is acceptable.

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 845e480 and 9a4ba08.

Files selected for processing: 1

  • Sources/StableBar/SceneRenderer.swift

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

@M4n0x

M4n0x commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

Checked the screens artifacts of the last PR runs to be sure it's that: 7 out of 55 runs had the diff (#555, #568, #583, #584, #596, #615, #619), always the exact same pair of images, the before one is pixel for pixel the 128px rep of AppIcon.icns scaled to 48px and the after one matches no rep of the icns at any size, so it's macOS's own version of the icon, drawing the bundled file like here should kill it

Accessibility guide icon, before and after

left before, right after, 8×

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Before and after

main at 2777713 → this pull request at 9a4ba08 · 148 screens drawn in one CI job · 2 changed

Screen Change Where (image pixels)
scenes/accessibility-guide-dark 828 pixels 96,150 · 40×40
scenes/accessibility-guide-light 808 pixels 96,150 · 40×40

scenes/accessibility-guide-dark

Before After
Before After

Difference, changed pixels in red:

Difference

scenes/accessibility-guide-light

Before After
Before After

Difference, changed pixels in red:

Difference

146 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/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: 2 changed screens approved.

@Seb-GRAF Seb-GRAF added the visual-ok A maintainer looked at the changed screens and approves them label Nov 13, 2026
@Seb-GRAF
Seb-GRAF merged commit 0b4d4ed into main Nov 13, 2026
29 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

visual-ok A maintainer looked at the changed screens and approves them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accessibility guide screenshots report icon changes on unrelated pull requests

2 participants