Repository navigation
Conversation
…ser one A run outside the app bundle has no icon for macOS to draw, so the Dock shows the generic executable. dock_icon.rs now paints one when the main bundle names none: the flat legacy tile, or on macOS 26 the shipped icon as that macOS draws it, since Liquid Glass is never applied to an image set at run time. make dock-icons renders both, the glass one by macOS itself through NSWorkspace from a throwaway bundle. The bundle also ships packaging/macos/AppIcon.icon when Xcode 26's actool is at hand: Assets.car and CFBundleIconName beside the icns, so macOS 26 draws its own shape and glass instead of normalizing a padded icns, which 26.6.2 puts on a light plate. Without that actool the bundle is as before. CI builds the bundle on macos-26 too, and the aarch64 release moves there.
…con at size macOS 26 reports 16.0 to a binary linked against an older SDK, so NSProcessInfo picked the flat icon for a build made with the Command Line Tools or Xcode 16. The kernel release does not depend on the SDK. The flat Dock icon now comes from sips at 512 px, as the iconset does, rather than a resample of the 1024 px check render. The plist marker is the bare token, so a reindented template still takes it.
The style check compared the glass and flat renders at the mark's title bar and green block, which only line up while AppGlyph.svg draws the mark at the flat icon's size. A smaller mark put the title-bar probe on the tile, and the script blamed the icon style. The probes are now the canvas centre, which is the mark's green block at any centred size, and the tile just inside its edge.
At the full 1024 pt canvas the mark's panel reached 80 pt from the edge and macOS 26's mask clipped its square corners. The panel is now 700 pt, 68% of the canvas and 162 pt in from each edge, about the weight of Slack's glyph or 1Password's ring beside it in the Dock, with 100 pt corners so it reads as a squircle inside the squircle, as Finder's does. Only the Icon Composer layer and the glass Dock icon change. Drop this commit to keep the mark at full size.
huntharo
force-pushed
the
codex/pwrsnap-pwragnt-dock-icon-d840ce
branch
from
October 14, 2026 17:30
743b89b to
290814c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes two problems with disktree's icon on macOS.
make run,cargo runand the bare release binary have no bundle for macOS to read, so the Dock shows a generic "exec" tile..icns, so macOS 26 squeezes it into its own icon shape instead of drawing a Liquid Glass icon. On 26.6.1 the mark's square panel runs into the corners of the mask, as the before image shows. On 26.6.2 a padded.icnslike this one comes out as a dark tile on a light grey plate. PwrSnap and PwrGit hit that and wrote it up in fix(desktop): ship an Icon Composer .icon alongside the legacy .icns pwrdrvr/PwrSnap#563.The fix follows what PwrSnap and PwrAgent settled on.
Before and after
In the Dock, left to right: an unbundled run before this PR, main's bundle, an unbundled run of this branch, and this branch's bundle.
The bundled icon as macOS 26.6.1 draws it, read back through
NSWorkspace.shared.icon(forFile:)at 512 px:What changes
packaging/macos/AppIcon.iconis the package:icon.jsonwith the mark's background as the fill, and one layer drawn bysipsfrom the newAppGlyph.svg, the mark without its background. Whenxcrun actoolis 26 or newer,cargo xtask bundlecompiles it intoContents/Resources/Assets.carand addsCFBundleIconNameto the plist.AppIcon.icnsstays asCFBundleIconFilefor macOS 15 and earlier. Without actool 26, as with the Command Line Tools alone, an older Xcode, or themacos-15runner, the bundle is built as before and the task prints a note.crates/disktree-app/src/dock_icon.rschecks whether the main bundle names an icon. When it does not, it setsNSApplication.applicationIconImagefrom a PNG embedded in the binary:DockIcon-glass.pngon macOS 26 and later,DockIcon.pngbefore that. It reads the Darwin kernel release to decide, because macOS 26 reports itself as 16.0 to a binary linked against an older SDK. AppKit comes through theobjc2crates GPUI already builds, with oneunsafecall, allowed with its reason the waymacos.rsdoes.DockIcon-glass.png.make dock-iconscompiles the package into a throwaway bundle and reads back what macOS draws for it. It then checks that the tile lands where the flat icon's does and that the Mac is set to the Default icon style. It needs macOS 26 and Xcode 26. Run it after either SVG changes.Bundle (macOS 26)job builds the bundle onmacos-26and checks the catalog and both plist keys are there. Themacos-15job keeps covering the bundle without it. The aarch64 release build moves tomacos-26so the shipped app carries the catalog. There is no macOS 26 Intel runner, so the x86_64 build keeps the legacy icon alone.The mark's size (last commit, droppable)
At the full canvas, the mark's square panel reaches into the mask's corners and gets clipped, which is what main's bundle shows above. Apple's documentation points to the grid in its Design Resources templates rather than giving a number. So I rendered sizes through macOS beside the icons around disktree in the Dock. The last commit draws the panel at 700 pt of the 1024 pt canvas, 162 pt in from each edge, with rounded corners, so it reads as a squircle inside the squircle. That matches the weight of Slack's glyph, 1Password's ring, and the PwrSnap and PwrGit marks.
The size change is a commit of its own so it can be dropped. Without it, the mark fills the canvas:
Verified
cargo xtask lintandcargo xtask testpass on macOS 26.6.1 with Xcode 26.5. CI passes all seven checks, including the new macOS 26 bundle job.cargo xtask bundlehere givesAssets.carandAppIcon.icnsin Resources,CFBundleIconName = Icon,CFBundleIconFile = AppIcon, and a valid signature.Assets.carandCFBundleIconNameremoved and the bundle re-signed.AppIcon.svgand the icns it is drawn into are unchanged from main, so that is the icon main ships.AppIcon.icnsas before.