Skip to content

App Intents metadata: inputOptions rejected, outputFlags bits swapped, parameterSummary dropped #369

Done

Description

@Brandon168

PRs here are limited to collaborators, so filing this as an issue. A fix with tests is on a fork branch, two commits on current main (685c517), ready to cherry-pick: Brandon168/sweetpad@sweetpad-dev:sweetpad:main...Brandon168:sweetpad:fix/appintents-input-options

The App Intents registration extractor rejects or misencodes a few common declarations, compared with Xcode 27.2 (27B52) output:

  1. inputOptions is rejected. Any @Parameter that passes inputOptions: (a documented String parameter option) stops
    extraction with unsupported App Intents parameter option 'inputOptions'. Xcode writes one typeSpecificMetadata entry
    per argument the source passes and omits arguments left at their defaults:
    • LNValueTypeMetadataKeyStringKeyboardType: asciiCapable 0, numbersAndPunctuation 1, URL 2, numberPad 3, default 4
    • LNValueTypeMetadataKeyStringCapitalizationType: none 0, words 1, sentences 2, allCharacters 3
    • LNValueTypeMetadataKeyString{Multiline,Autocorrect,SmartQuotes,SmartDashes}: 0 or 1
  2. outputFlags bits. ProvidesDialog and ShowsSnippetView were swapped and OpensIntent was ignored. Xcode writes
    OpensIntent = 1, ShowsSnippetView = 2, ProvidesDialog = 4 (ReturnsValue sets no bit). The existing Files probe returns both
    dialog and snippet, so its 6 hid the swap; some IntentResult & ReturnsValue<String> & ProvidesDialog came out as 2
    instead of 4.
  3. parameterSummary is dropped. Xcode writes a plain Summary as actionConfiguration.actionSummary: the text with
    ${parameter} placeholders, the parameters it interpolates (parameterIdentifiers) and the parameters its trailing builder
    lists (otherParameterIdentifiers). Conditional summaries (When/Switch) and localization tables now stop extraction
    with an error instead of being dropped silently.

Changes:

  • metadata/parameters.rs: inputOptions support (constant initializer only; non-constant or unknown cases are errors).
  • metadata.rs: corrected output flags; actionConfiguration from parameterSummary.
  • Fixtures: InputOptionsProbe.swift (every option and case) and OutputProbe.swift (each output protocol alone and combined,
    summaries with and without a builder), their Xcode 27.2 const-value captures, and the probes' actions from Xcode's
    extract.actionsdata (*.actions.json). regen.py regenerates both (--only InputOptionsProbe|OutputProbe).
  • Tests: probe_actions_match_xcode compares every probe action with Xcode's; two tests cover the error paths. The test
    normalizer now also ignores the order of typeSpecificMetadata pairs, which Xcode writes in hash order.

cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings (sweetpad-cli) and cargo test -p sweetpad-cli --lib
pass (1007 tests; inject::watcher::tests::fires_on_save_not_on_initial_files fails the same way without this change in the
environment I ran it in).

Note: the captures were taken from an existing app target, so the probe types carry that target's module name; running
regen.py --only InputOptionsProbe / --only OutputProbe on a Mac rewrites them under the probe modules.

🤖 Generated with Claude Code

Activity

  1. hyzyla commented on Nov 27, 2026

    @hyzyla
    Collaborator

    Thanks! looking into it

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions