fix: prevent crash on macos 26.x beta during startup#473
Conversation
8601bec to
d1dc3e1
Compare
| </div> | ||
| </SettingContainer> | ||
|
|
||
| {state.appleIntelligenceUnavailable ? ( |
There was a problem hiding this comment.
so alert() doesn't work in tauri-land. resorting to show an inline alert https://mui.com/material-ui/react-alert/
will eventually make this into a component once we create a project from #449
|
Thanks for this. I'm going to take a look soon. Uh hopefully I'll get a chance tomorrow and hopefully pull this in as well. |
|
Hey @VirenMohindra this is great. I did play around with it a little, and in the dropdown for the UI what is the expectation? I notice when I click "Apple Intelligence" with the feature off it sets Custom instead, but Apple Intelligence warning comes comes up
|
03e148b to
087d3a9
Compare
the issue was that clicking the currently selected provider (e.g. custom) after the error appeared wouldn't clear it -- the early return happened before the state reset fixed it by moving the clear to before the early return. now clicking any option in the dropdown will dismiss the error |
087d3a9 to
f18d6db
Compare
|
The behavior is still weird. When I click the Apple Intelligence with it disabled it still changes the option to something else. I feel like it should just show the banner? To replicate:
The provider will show something other than "Apple Intelligence" in the dropdown, and the API key and other settings for that model provider. My expectation is as a user I clicked the "Apple Intelligence" in the dropdown, so it should still be selected as "Apple Intelligence" and then display the error or warning only for that dropdown item |
28fbdfc to
c93c196
Compare
defer apple intelligence availability check from app initialization to when the user actually tries to use the feature. accessing SystemLanguageModel.default during early app startup causes SIGABRT on macOS 26.x (tahoe) beta. - remove availability check from default_post_process_providers() - always include apple intelligence provider on macos arm64 - add checkAppleIntelligenceAvailable command for lazy checking - show error message if apple intelligence unavailable when selected - clear error on any dropdown selection for better UX
c93c196 to
e07bbe8
Compare
fixed! now when clicking "Apple Intelligence" with the feature unavailable the dropdown shows "apple intelligence" as selected (reflects what user clicked and the error banner appears below explaining it's not available |
|
I'm merging this for now, but the UI still needs work. Let's follow up with another PR if possible. Let's hide the dropdown for the model for Apple Intelligence as well as remove the UI Infobox for "Apple Intelligence" since it's largely N/A now, or move the error state directly into that. |

Before Submitting This PR
Please confirm you have done the following:
Description
defers the apple intelligence availability check from app initialization to when the user actually tries to use the feature.
on macos 26.x (tahoe) beta, accessing
SystemLanguageModel.defaultduring early app startup (before the cocoa run loop is fully established) causesSIGABRT. this only affects fresh installs or users without saved settings.changes:
default_post_process_providers()in settings.rs - always include apple intelligence provider on macos arm64checkAppleIntelligenceAvailabletauri command for lazy availability checkingRelated Issues / Discussions
Testing
~/Library/Application Support/com.pais.handy/settings_store.jsonto simulate fresh install