fix(firmware): render chirpy mascot via painterResource in update dialog#5925
Merged
Conversation
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>
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.
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:
ChirpyCardfed the bundledimg_chirpyvector drawable to Coil'sAsyncImage. Coil is a network/disk image loader and has no decoder for a Compose MultiplatformDrawableResource(an Android Vector.xmlthat compiles to anImageVector), so it silently rendered nothing on every platform.Changes
🐛 Bug Fixes
FirmwareUpdateScreen.ChirpyCard: render the bundled mascot withImage(painterResource(Res.drawable.img_chirpy))instead ofCoil AsyncImage. This matches how the docs feature (ChirpyFab,ChirpyAssistantSheet) already renders the exact same asset, andpainterResourcehandles the compiled vector drawable on all platforms (Android/Desktop/iOS) with noImageLoaderinvolved.🧹 Chores
ScreenshotFirmwareDisclaimerLight/Dark CST baselines (and thefirmware_disclaimer.pngdocs 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
DeviceHardwareImageloads real.svgdevice images fromflasher.meshtastic.org(SvgDecoder.Factoryis registered on Android and Desktop). The four Coil imports are still in use by that composable.DrawableResourcewas routed through Coil.Testing Performed
:feature:firmware:spotlessCheck,:feature:firmware:detekt,:feature:firmware:assemblepass.:screenshot-tests:validateDebugScreenshotTest: failed onScreenshotFirmwareDisclaimer_{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.