Notification icon is buggy #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
hey @claude can you fix this real quick?
Pushed to
claude/fix-notification-icon(open a PR).What was wrong
app.jsonpointed theexpo-notificationsplugin at the app icon:assets/icon.pngis a fully opaque, full-color 1024×1024 image (I decoded it: 100% of pixels have alpha 255). Since Android 5.0, the notification small icon is rendered from the alpha mask only — the color channels are discarded and the silhouette is tinted with the accent color. An opaque source has a fully-filled mask, so the notification shows a solid white square instead of the cat.The accent color was a second problem:
#fffffftints the icon white, which is invisible against the light notification shade on most devices.The fix
New
assets/notification-icon.png— 96×96 (xxxhdpi 24dp), pure white on a transparent background, with the prayer cap's brim and the eyes cut out so the mark survives the alpha-mask treatment. Preview, composited on dark, at 4× and at real 24px size:I checked legibility by downsampling to an actual 24px render — the cap band and eyes still read.
Accent color
#ffffff→#67B56F(palette.primary500fromsrc/constants/colors.ts), so the silhouette is tinted with the app's green.Notes
expo prebuild/expo run:android), not over OTA updates — the small icon is baked into the Android manifest as a drawable resource.src/core/services/notificationService.ts:41still setslightColor: '#FF231F7C', the purple from the Expo template. Worth pointing at your primary green too if you want the LED to match.npm run checks—node_modulesisn't installed in this CI checkout.prettier --check app.jsonpasses, and the change touches no TypeScript.@claude your fix is correct but the image you created is.. shit. you gotta find the bg color and then remove it from the original icon and make the notification-icon from the thing left. if that makes sense..
Pushed to
claude/fix-notification-icon-v2(open a PR).What I did differently this time
Your feedback was right — I'd previously hand-drawn a geometric stand-in instead of using the actual mark. This time I derived the notification icon directly from
assets/icon.png:#DDBD8E, a flat tan fill covering ~61% of the pixels (635,651 of 1024×1024), with hard vector edges and no anti-aliasing halo.convert -fuzz 0% -transparent "#DDBD8E") — no fuzz tolerance needed, and importantly no fuzz allowed: I tried 8% first and it also ate the diamond pattern on the cap and the ear-inner shading, since those use tan/gold tones close to the background. At 0% fuzz, all of that linework survives intact and the edges stay clean.app.json'sexpo-notificationsplugin at this file withcolor: "#67B56F"(stillpalette.primary500, same as before).Why this fixes the original bug too
Android still only looks at the alpha channel for the status-bar icon and discards color — that part of the original diagnosis was correct. The difference is whose alpha mask it's using now: instead of a shape I invented, it's the real artwork's silhouette. I simulated Android's rendering (extract alpha → fill white → downscale to a real 24px) and it reads clearly as a cat head with pointed ears, not a blob or a square.
Notes
assets/notification-icon.pngis still full-color (cat fur orange, cap white, outlines black) rather than pre-flattened to white — I left it that way since it's literally "the thing left" after removing the background, and Android discards the color anyway so it doesn't affect the rendered result.npm run checks— nonode_modulesin this CI checkout — but I validatedapp.jsonparses as JSON and matches the existing 2-space style.src/core/services/notificationService.ts:41still has the leftoverlightColor: '#FF231F7C'(Expo template purple) — unrelated to this bug, flagging again in case you want it swapped to green too.@claude can't you make the icon be in this color DDBD8E instead of that green thing?
Pushed to
claude/fix-notification-icon-v3(open a PR), built on top ofclaude/fix-notification-icon-v2(which had the real chroma-keyed cat icon, not the geometric stand-in).What changed
Just the accent color, per your ask:
That's the same tan (
#DDBD8E) that got chroma-keyed out ofassets/icon.pngas the background fill in the v2 branch — so the notification silhouette will now be tinted with the icon's own original background tone instead of the app's primary green.Heads up
One thing worth flagging: tan on Android's notification shade may have contrast issues similar to the original white-on-white bug — it can read faintly on light backgrounds, though most stock/AOSP shades are dark enough that it should still be visible. Worth a quick look on a real device or emulator after a native rebuild before merging.
Since
claude/fix-notification-icon-v3branches offv2(notmain), merging it will bring in both the icon-derivation fix and this color change together — the earlierfix-notification-icon(v1, hand-drawn icon) andfix-notification-icon-v2branches are now superseded and can be deleted once this one merges.Still unable to run
npm run checks(nonode_modulesin this CI checkout); verifiedapp.jsonis valid JSON and matches the existing style.