Skip to content

Conversation

@VirenMohindra
Copy link
Contributor

@VirenMohindra VirenMohindra commented Dec 19, 2025

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.default during early app startup (before the cocoa run loop is fully established) causes SIGABRT. this only affects fresh installs or users without saved settings.

changes:

  • remove availability check from default_post_process_providers() in settings.rs - always include apple intelligence provider on macos arm64
  • add checkAppleIntelligenceAvailable tauri command for lazy availability checking
  • update frontend to check availability when user selects apple intelligence provider
  • show error message if apple intelligence is not available on the device
  • move apple intelligence provider before "custom" in the provider list
  • add "unavailable" translation key for all 9 supported languages

Related Issues / Discussions

Menu Bar Post Processing Apple Intelligence unavailable
menu post-processing demo

Testing

  • deleted ~/Library/Application Support/com.pais.handy/settings_store.json to simulate fresh install
  • built and launched app on macos - no crash
  • verified apple intelligence provider appears in post-processing settings (before custom)
  • tested unavailable error message displays correctly when apple intelligence is not available
  • cargo check passes
  • lint and format checks pass

@VirenMohindra VirenMohindra force-pushed the vm/fix-macos-26-startup-crash branch 7 times, most recently from 8601bec to d1dc3e1 Compare December 19, 2025 16:39
</div>
</SettingContainer>

{state.appleIntelligenceUnavailable ? (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@cjpais
Copy link
Owner

cjpais commented Dec 20, 2025

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.

@cjpais
Copy link
Owner

cjpais commented Dec 22, 2025

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

Screenshot 2025-12-22 at 10 05 18 AM

@VirenMohindra VirenMohindra force-pushed the vm/fix-macos-26-startup-crash branch 2 times, most recently from 03e148b to 087d3a9 Compare December 27, 2025 13:41
@VirenMohindra
Copy link
Contributor Author

I notice when I click "Apple Intelligence" with the feature off it sets Custom instead, but Apple Intelligence warning comes comes up

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

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
@VirenMohindra VirenMohindra force-pushed the vm/fix-macos-26-startup-crash branch from 087d3a9 to f18d6db Compare December 27, 2025 13:50
@cjpais
Copy link
Owner

cjpais commented Dec 29, 2025

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:

  • Set model provider to anything other than Apple Intelligence
  • Disable Apple Intelligence
  • Click "Apple Intelligence" in the dropdown of Handy

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants