Skip to content

fix(firmware): render chirpy mascot via painterResource in update dialog#5925

Merged
jamesarich merged 1 commit into
mainfrom
claude/adoring-lewin-96fe32
Jun 23, 2026
Merged

fix(firmware): render chirpy mascot via painterResource in update dialog#5925
jamesarich merged 1 commit into
mainfrom
claude/adoring-lewin-96fe32

Conversation

@jamesarich

@jamesarich jamesarich commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Why

The "don't forget your ladder" dialog shown before a BLE firmware update displayed no chirpy mascot — the spot next to the 🪜 emoji was just blank. Root cause: ChirpyCard fed the bundled img_chirpy vector drawable to Coil's AsyncImage. Coil is a network/disk image loader and has no decoder for a Compose Multiplatform DrawableResource (an Android Vector .xml that compiles to an ImageVector), so it silently rendered nothing on every platform.

Changes

🐛 Bug Fixes

  • FirmwareUpdateScreen.ChirpyCard: render the bundled mascot with Image(painterResource(Res.drawable.img_chirpy)) instead of Coil AsyncImage. This matches how the docs feature (ChirpyFab, ChirpyAssistantSheet) already renders the exact same asset, and painterResource handles the compiled vector drawable on all platforms (Android/Desktop/iOS) with no ImageLoader involved.

🧹 Chores

  • Re-recorded the ScreenshotFirmwareDisclaimer Light/Dark CST baselines (and the firmware_disclaimer.png docs copy). The old baselines captured the blank chirpy from the broken Coil path; now that chirpy renders, the reference images are updated to match.

Notes for reviewers

  • Coil is not removed — it stays correct for the network path right below, where DeviceHardwareImage loads real .svg device images from flasher.meshtastic.org (SvgDecoder.Factory is registered on Android and Desktop). The four Coil imports are still in use by that composable.
  • Swept the repo: this was the only place a bundled Compose DrawableResource was routed through Coil.

Testing Performed

  • :feature:firmware:spotlessCheck, :feature:firmware:detekt, :feature:firmware:assemble pass.
  • :screenshot-tests:validateDebugScreenshotTest: failed on ScreenshotFirmwareDisclaimer_{Light,Dark} before the baseline re-record (chirpy now draws where the baseline was blank), passes after (246 tests, 0 failures). Verified the regenerated baseline visually shows chirpy beside the ladder.

The "don't forget your ladder" BLE firmware-update dialog showed no
chirpy mascot. ChirpyCard fed the bundled img_chirpy vector drawable
to Coil's AsyncImage, but Coil is a network/disk loader with no decoder
for a Compose Multiplatform DrawableResource, so it silently rendered
nothing on every platform.

Switch to Image(painterResource(...)), matching how the docs feature
already renders the same asset. painterResource handles the compiled
vector drawable on all platforms (Android/Desktop/iOS) with no
ImageLoader. Coil stays where it belongs — loading the network device
.svg images in DeviceHardwareImage (SvgDecoder is registered).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added the bugfix PR tag label Jun 23, 2026
@jamesarich jamesarich merged commit b3ec677 into main Jun 23, 2026
13 checks passed
@jamesarich jamesarich deleted the claude/adoring-lewin-96fe32 branch June 23, 2026 23:13
jamesarich added a commit that referenced this pull request Jun 23, 2026
#5925) (#5926)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant