No results

For AI agents and crawlers: a structured index of this site is available at https://danny.is/llms.txt.

A better icon for Astro Editor

Astro Editor’s old icon was hastily generated over a year ago using Google’s Nano Banana. A couple of days ago I decided it needed a bit of a polish, so I spun up a Claude session with instructions to keep the basic design but tidy it up a bit. I got back the following contact sheet…

contact-sheet.png

You can see that the old icon (00) isn’t a proper squircle, and more importantly for me, the three stars look pretty ugly. I’d said this in my prompt, so the first thing Claude did was write a tiny Python script to consistently generate the star shape and then use that to redraw an improved version of the current icon as an SVG (01). I was pleasantly surprised at how simple the SVG code was. It also suggested the biggest fundamental improvement we could make was a bigger middle star because a) the whole icon feels more balanced and b) it works better at very small sizes (02).

I’d have been happy with just this, but Claude went a bit further in ways I wouldn’t have thought of myself:

  1. It used Apple’s Icon Composer CLI to turn the two new SVGs into Liquid Glass icons (04-06).
  2. It used Blender’s CLI to generate some really nice-looking 3D renders (07-10).

I decided to go with the 02/05 design for actual app icons, and the Blender-generated 10 for use on the website.

How it works

The AE repo now has a top-level icons/ directory containing the improved icon.svg, from which everything else is derived. There’s also a render-display-icon.py Blender script which reads the SVG and spits out two fancy 3D PNGs:

icon-display.png
icon-display.png – 3D render for use on the website
icon-avatar.png
icon-avatar.png – Full-bleed 3D render for use on socials or anywhere else that provides its own crop

If I ever want to tweak the icon again, it’s just a case of editing icon.svg and tweaking the Blender script until I’m happy.

The generate-icons command

Every icon in the project is derived from these files (icons/icon.svg and icons/icon-display.png), and a new bun run generate-icons command programmatically updates everything.

  1. An Icon Composer document is built from icon.svg and compiled into src-tauri/icons/Assets.car with Xcode’s actool. This includes Dark, Clear and Tinted appearances.
  2. Tauri’s icon tooling uses the same SVG to generate the appropriate files in src-tauri/icons/ – PNGs plus icon.icns and icon.ico.
  3. The display version is used to generate favicon.png, favicon.ico and apple-touch-icon.png in the website’s public/ folder.
  4. It also generates website/src/assets/icon.png which is used everywhere in the website.

To my eyes, the end result is a significant improvement.

dock-side-by-side.png
New macOS icon on the left, old one on the right
new-icon-on-website.png
The display version on the website's homepage

A couple of reflections on this…

Writing this note took more of my time than actually doing the work, but has taught me some interesting lessons about working with coding agents which I didn’t expect.

My input was limited to three points, but it feels like they were the right points:

  1. My initial brief, which explicitly said to:
    • Improve the existing icon like a designer, not to fuck with it too much, plus some vague feedback about the stars feeling a bit janky.
    • Start by tidying up the existing SVG icon and then use that as a basis from which to explore.
    • Write out a contact sheet with options for me.
  2. My feedback on the contact sheet, which was basically “Let’s use 02 as the canonical SVG. Which also means 05 when it’s run through Icon Composer which we should use for macOS icons. The Blender equivalent is 10 which we should use for the website and marketing stuff”.
  3. My guidance on how to implement this in the repo in a fairly simple and intuitive (to a human) way.

These were my only points of significant input, but if I’d left them to Claude I’d have got a sloppy or overcomplicated result.

My guidance on (3) included making the Blender script read parts of the SVG, which is an interesting decision. Pre-LLM me would have balked at spreading the icon’s design across two places. After a lifetime of “a change in thing A should not require a change in thing B” I’d have thought:

  1. Ideally the Blender script is general purpose enough to deal with any SVG it’s given…
  2. …but if anything in it depends on the SVG being a certain way, the SVG and Blender script should be totally separate things.

This is really me trying to avoid inflicting huge cognitive overload on the next chap who has to understand and work on these files.

Coding agents don’t have this problem. They’ll happily read all the numbers in icon.svg and all the impenetrable code in render-display-icon.py and make sense of them together. In this context, tightly coupling them has no downside and a small upside in terms of “shared truth”.