Skip to content

Commit e604c8d

Browse files
juliusmarmingecodex
andcommitted
Fix macOS icon safe-area exports
Use Icon Composer's native pre-Tahoe preset for the tracked macOS assets, keep the headless exporter from replacing them with full-bleed renders, and document the Codex-assisted workflow. Co-authored-by: codex <[email protected]>
1 parent 8e81ac0 commit e604c8d

5 files changed

Lines changed: 65 additions & 4 deletions

File tree

‎assets/README.md‎

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,43 @@ The three Icon Composer projects are the source of truth for full application ic
88

99
Each project uses `text.svg` for the T3 mark and `background.svg` when the background is a vector layer. Additional layers use semantic names that describe their role and placement.
1010

11-
Run `vp run icons:export` from the repository root to regenerate the tracked PNG and ICO assets for mobile, desktop, and web. Run `vp run icons:check` to verify that the generated assets match their sources without changing files.
11+
Run `vp run icons:export` from the repository root to regenerate the tracked iOS, Linux, Windows, and web assets. Run `vp run icons:check` to verify that those generated assets match their sources without changing files.
1212

1313
Exporting requires Icon Composer 2 or newer on macOS. The script selects the newest compatible exporter from Xcode or a standalone Icon Composer installation and pins design generation 26. Set `ICON_COMPOSER_TOOL` to the full path of `Icon Composer.app/Contents/Executables/ictool` to override automatic discovery.
1414

15+
## macOS exports
16+
17+
Icon Composer's command-line exporter does not expose the `macOS pre-Tahoe` preset. A plain command-line `macOS` export is full bleed and is not suitable for the desktop app, so the export script intentionally leaves the tracked macOS PNGs unchanged and prints a reminder after every run.
18+
19+
After changing an Icon Composer project, open it in Icon Composer and export the macOS PNG with exactly these settings:
20+
21+
- Platform: `macOS pre-Tahoe`
22+
- Appearance: `Default`
23+
- Size: `1024pt`
24+
- Scale: `1×`
25+
26+
Save the three exports to:
27+
28+
- `dev/app-icon.icon` -> `dev/blueprint-macos-1024.png`
29+
- `nightly/app-icon.icon` -> `nightly/nightly-macos-1024.png`
30+
- `prod/app-icon.icon` -> `prod/black-macos-1024.png`
31+
32+
The result must be a 1024×1024 PNG with the classic macOS safe area: the opaque icon body is 824×824, inset 100 pixels on every side, with only the native Icon Composer shadow extending into the surrounding transparent canvas.
33+
34+
To have Codex perform the native exports, paste this prompt into a task opened at the repository root:
35+
36+
```text
37+
Use [@Computer](plugin://computer-use@openai-bundled) and the Icon Composer app to export the three macOS app icons in this repository.
38+
39+
For each project below, use Platform: macOS pre-Tahoe, Appearance: Default, Size: 1024pt, and Scale: 1×, then save the PNG to the exact destination:
40+
41+
- assets/dev/app-icon.icon -> assets/dev/blueprint-macos-1024.png
42+
- assets/nightly/app-icon.icon -> assets/nightly/nightly-macos-1024.png
43+
- assets/prod/app-icon.icon -> assets/prod/black-macos-1024.png
44+
45+
Do not resize, composite, or otherwise post-process the exported PNGs.
46+
47+
Verify every result is 1024×1024 and has the classic macOS safe area: an 824×824 opaque body inset 100px on every side, with only Icon Composer's native shadow extending beyond it.
48+
```
49+
1550
Do not edit the generated PNG or ICO files directly.
-600 KB
Loading
1.02 MB
Loading

‎assets/prod/black-macos-1024.png‎

472 KB
Loading

‎scripts/export-brand-icons.ts‎

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const decodeIconComposerVersion = Schema.decodeUnknownEffect(
4141
Schema.fromJsonString(IconComposerVersion),
4242
);
4343

44-
type IconPlatform = "iOS" | "macOS";
44+
type IconPlatform = "iOS";
4545

4646
interface VariantOutputs {
4747
readonly ios: string;
@@ -247,6 +247,14 @@ const ICON_VARIANTS = [
247247
},
248248
] as const satisfies ReadonlyArray<IconVariant>;
249249

250+
const MACOS_EXPORT_CODEX_PROMPT = [
251+
"Use [@Computer](plugin://computer-use@openai-bundled) and the Icon Composer app to export the three macOS app icons in this repository.",
252+
"For each project below, use Platform: macOS pre-Tahoe, Appearance: Default, Size: 1024pt, and Scale: 1×, then save the PNG to the exact destination:",
253+
...ICON_VARIANTS.map((variant) => `- ${variant.source} -> ${variant.outputs.macos}`),
254+
"Do not resize, composite, or otherwise post-process the exported PNGs.",
255+
"Verify every result is 1024×1024 and has the classic macOS safe area: an 824×824 opaque body inset 100px on every side, with only Icon Composer's native shadow extending beyond it.",
256+
];
257+
250258
const RepositoryRoot = Effect.service(Path.Path).pipe(
251259
Effect.flatMap((path) => path.fromFileUrl(new URL("..", import.meta.url))),
252260
Effect.mapError(
@@ -578,7 +586,6 @@ const renderVariant = Effect.fn("iconExport.renderVariant")(function* (
578586
});
579587

580588
const ios = yield* render("iOS", 1024);
581-
const macos = yield* render("macOS", 1024);
582589
const icoRenditions = yield* Effect.forEach(
583590
WINDOWS_ICON_SIZES,
584591
(size) => render("iOS", size).pipe(Effect.map((contents) => ({ size, contents }))),
@@ -591,7 +598,6 @@ const renderVariant = Effect.fn("iconExport.renderVariant")(function* (
591598

592599
return new Map<string, Buffer>([
593600
[variant.outputs.ios, ios],
594-
[variant.outputs.macos, macos],
595601
[variant.outputs.universal, ios],
596602
[variant.outputs.appleTouch, yield* render("iOS", 180)],
597603
[variant.outputs.favicon16, yield* render("iOS", 16)],
@@ -601,6 +607,24 @@ const renderVariant = Effect.fn("iconExport.renderVariant")(function* (
601607
]);
602608
});
603609

610+
const logManualMacOsExportInstructions = Effect.fn("iconExport.logManualMacOsExportInstructions")(
611+
function* () {
612+
yield* Console.warn(
613+
[
614+
"macOS icons require Icon Composer's GUI-only pre-Tahoe preset and were not changed.",
615+
"Export each source with Platform: macOS pre-Tahoe, Appearance: Default, Size: 1024pt, Scale: 1×:",
616+
...ICON_VARIANTS.map((variant) => `- ${variant.source} -> ${variant.outputs.macos}`),
617+
"See assets/README.md for the complete workflow.",
618+
"",
619+
"Copy/paste this prompt into Codex to perform the native exports:",
620+
"---",
621+
...MACOS_EXPORT_CODEX_PROMPT,
622+
"---",
623+
].join("\n"),
624+
);
625+
},
626+
);
627+
604628
const writeAtomically = Effect.fn("iconExport.writeAtomically")(function* (
605629
repositoryRoot: string,
606630
relativePath: string,
@@ -740,6 +764,7 @@ export const exportBrandIcons = Effect.fn("exportBrandIcons")(function* (checkOn
740764
});
741765
}
742766
yield* Console.log(`All ${generated.size} generated icon assets are current.`);
767+
yield* logManualMacOsExportInstructions();
743768
return;
744769
}
745770

@@ -749,6 +774,7 @@ export const exportBrandIcons = Effect.fn("exportBrandIcons")(function* (checkOn
749774
{ concurrency: 1, discard: true },
750775
);
751776
yield* Console.log(`Updated ${generated.size} generated icon assets.`);
777+
yield* logManualMacOsExportInstructions();
752778
});
753779

754780
export const exportBrandIconsCommand = Command.make(

0 commit comments

Comments
 (0)