Skip to content

Fix widget App Intents packaging#783

Merged
ngutman merged 3 commits intomainfrom
fix/widget-appintents-metadata-clean
Apr 22, 2026
Merged

Fix widget App Intents packaging#783
ngutman merged 3 commits intomainfrom
fix/widget-appintents-metadata-clean

Conversation

@ngutman
Copy link
Copy Markdown
Collaborator

@ngutman ngutman commented Apr 22, 2026

Summary

  • generate and bundle Metadata.appintents for CodexBarWidget during packaging so the widget extension ships the App Intents metadata WidgetKit expects
  • keep widget configuration intent parameters non-optional and use @Parameter(default:) for Codex / Credits defaults instead of optional fallback helpers
  • update focused widget tests to assert the configuration intent defaults directly

Why

This supersedes #782 while preserving the original fix from @vincentyangch.

The packaging issue is real: the packaged widget extension was shipping without Resources/Metadata.appintents, and this branch keeps that fix. The follow-up cleanup keeps the App Intent model aligned with Apple's documented widget configuration style by using non-optional parameters with defaults rather than optional parameters plus runtime fallback helpers.

Details

  • retains commit ab904049 from @vincentyangch for widget metadata generation and packaging
  • adds follow-up commit 7d9d440b to replace optional widget configuration parameters with @Parameter(default:)
  • removes now-unnecessary resolvedWidgetProvider / resolvedCompactMetric helpers
  • updates tests to cover default intent construction

Validation

  • swift test -q --filter CodexBarWidgetProviderTests
  • pnpm check
  • ./Scripts/compile_and_run.sh
  • verified packaged widget bundle contains:
    • Metadata.appintents/version.json
    • Metadata.appintents/extract.actionsdata

Credit

Original packaging fix by @vincentyangch in #782; this PR carries that change forward with a small follow-up cleanup.

@ngutman ngutman merged commit 88dee3c into main Apr 22, 2026
4 checks passed
@ngutman ngutman deleted the fix/widget-appintents-metadata-clean branch April 22, 2026 06:34
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