Skip to content

Shortcuts, Siri and Spotlight actions, and a Focus filter - #12

Merged
alexandre-wayss merged 4 commits into
mainfrom
feat/shortcuts-focus
Sep 23, 2026
Merged

alexandre-wayss merged 4 commits into
mainfrom
feat/shortcuts-focus

Conversation

@alexandre-wayss

@alexandre-wayss alexandre-wayss commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Actions (Shortcuts app, Siri, Spotlight)

Action What it does
Play Mix Plays a saved mix (picked from a list or said by name)
Play Sound Plays one sound, replacing what is playing
Resume Sounds / Pause Sounds Resumes or pauses playback
Set Brisa Volume Master volume, 0–100%
Stop Sounds After Sleep timer in minutes (0 turns it off)
Start Focus Session / Pause Focus Session Pomodoro

Suggested phrases work without setup: "Play Rainy study in Brisa", "Pause Brisa", "Resume Brisa", "Start a focus session in Brisa". Mix names are refreshed whenever mixes change.

Focus filter
System Settings → Focus → a Focus → Focus filters → Brisa: choose a mix to play and/or whether to start a focus session. When the Focus turns on, Brisa does it; when the Focus ends, Brisa stops only what the Focus started.

Build
Xcode normally generates Metadata.appintents, which the system reads to discover actions. build.sh now emits compile-time constant values (-emit-const-values-path) and runs appintentsmetadataprocessor itself. Its output matches Xcode's for all 9 actions, the 2 entities and the 4 suggested phrases; the only differences are the order of a few fields.

Settings → General gets a "Shortcuts and Focus" row explaining this, with a button that opens Focus settings.

Signing requirement
macOS only connects Shortcuts and Focus filters to apps signed by a developer team (linkd logs Unable to get teamId and rejects ad-hoc apps with requiresValidatedBundle). So:

  • build.sh signs with BRISA_SIGN_IDENTITY, or the first Developer ID / Apple Development certificate in the keychain; otherwise it falls back to ad-hoc and skips the App Intents metadata, so Brisa doesn't show up in Shortcuts or Focus with actions that can't run.
  • The app reads its own signature and hides the "Shortcuts and Focus" settings row when there is no team.
  • Release DMGs are still ad-hoc (no Developer ID yet), so they don't include this feature. The README says so.

How it was tested

  • ./Scripts/build.sh and xcodebuild succeed, and both produce the metadata with all actions.
  • ./Scripts/test.sh: 28 passed.
  • Unsigned build: no Metadata.appintents, and the availability check returns false for an ad-hoc binary.
  • Installed an ad-hoc build: Focus settings showed "could not load the Focus filter". The system logs gave the team-ID cause above.
  • Not yet checked with a certificate: the Shortcuts actions and the Focus filter still need a test with an Apple Development-signed build.

- Nine App Intents: Play Mix, Play Sound, Resume Sounds, Pause Sounds,
  Set Brisa Volume, Stop Sounds After, Start Focus Session, Pause Focus
  Session, and a Focus filter. Mixes and sounds are entities, so they can
  be picked from a list or said by name.
- Suggested phrases such as "Play <mix> in Brisa" and "Pause Brisa";
  the mix names are refreshed whenever mixes change.
- The Focus filter plays a mix and/or starts a focus session when a Focus
  turns on, and when it ends stops only what it started.
- build.sh emits compile-time constant values and runs Apple's
  appintentsmetadataprocessor, so the swiftc build ships the same
  Metadata.appintents that Xcode produces.
- Settings -> General explains it and opens Focus settings.
Shortcuts and Focus filters reject apps without a team ID (linkd:
requiresValidatedBundle), so an ad-hoc signature is only a fallback.
Without a team ID macOS refuses the connection, so ad-hoc builds skip the
App Intents metadata and Settings hides the Shortcuts and Focus row.
# Conflicts:
#	Brisa/Brisa.xcodeproj/project.pbxproj
#	Brisa/Scripts/build.sh
#	Brisa/Sources/AppModel.swift
@alexandre-wayss
alexandre-wayss merged commit 7519d79 into main Sep 23, 2026
1 check passed
@alexandre-wayss
alexandre-wayss deleted the feat/shortcuts-focus branch September 23, 2026 16:45
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.

1 participant