Repository navigation
fix: survive icons that arrive without a display name - #2
Merged
Merged
Conversation
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.
Fixes #1.
The crash in #1 maps (via a sourcemap of the v0.1.2 bundle, same hash as the one in the screenshot) to
app-glyph.tsx:24:app.displayName.slice(0, 2). On iOS 27 at least one home screen icon arrives without adisplayName; every iOS 26 layout I have carries one on every icon, so this is new.displayNameonAppIconis optional now, so the compiler finds every place that read it.nameOf(app)falls back to the bundle or display identifier. Nothing is written back that the device did not send, so a write round-trips the icon untouched.error.messagetoo. WebKit leaves it out oferror.stack, which is why the screenshot showed where it broke but not why.Test: a diff with a nameless app used to throw in
localeCompareand now lists it by identifier.bun run lintpasses (29 tests).Not verified on an iOS 27 device — I don't have one. Asked the reporter in #1 for the shape of the nameless icon.