Repository navigation
Add setup flow primitives - #324
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds foundational model-layer primitives to support interactive provider/player setup flows (forms, OAuth/external steps, progress, finish/abort), plus supporting config schema extensions and tests, while keeping existing consumers working.
Changes:
- Introduces
SetupFlowStep(with translation-aware serialization) andFlowStepTypefor typed setup-flow steps. - Adds
ConfigEntryType.IMAGEas a UI-only/presentational entry type. - Adds persisted-but-API-hidden
setup_datatoProviderConfigandPlayerConfig, plus a newSETUP_FLOW_UPDATEDevent type.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/test_setup_flow.py | Adds coverage for SetupFlowStep shapes and translation resolution behavior. |
| tests/test_config_entries.py | Adds coverage for IMAGE entries and setup_data persistence vs API exposure. |
| music_assistant_models/setup_flow.py | Implements SetupFlowStep model and translation-aware to_dict() output. |
| music_assistant_models/enums.py | Adds FlowStepType, ConfigEntryType.IMAGE, and EventType.SETUP_FLOW_UPDATED. |
| music_assistant_models/config_entries.py | Wires up IMAGE as UI-only and adds setup_data handling to provider/player configs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
github-actions Bot
pushed a commit
to music-assistant/server
that referenced
this pull request
Jul 23, 2026
Update music-assistant-models to version [1.1.169](https://github.com/music-assistant/models/releases/tag/1.1.169) - Add setup flow primitives (by @marcelveldt in [#324](music-assistant/models#324)) ## 🚀 Features and enhancements - Add ConvolutionFilter and High/Low DSP filter types (by @OzGav in [#319](music-assistant/models#319)) ## 🙇 Contributors @marcelveldt, @OzGav and @claude Co-authored-by: marcelveldt <[email protected]>
6 of 17 tasks
marcelveldt
added a commit
to music-assistant/server
that referenced
this pull request
Jul 24, 2026
# What does this implement/fix? Groundwork for the new interactive setup flows: a server-driven flow engine that replaces the action-based config-entry workarounds for provider/player setup (credentials, OAuth, pairing) — with a clear begin and end, multiple steps, progress and proper cancellation. Purely additive: nothing changes yet for existing providers or clients. - New `SetupSession`: a provider authors its setup as one plain coroutine (`run_setup(session)` in `providers/<domain>/setup_flow.py`) using awaitable `form()` / `external()` / `progress_until()` steps, optional step deadlines and clean abort/cleanup semantics - New api commands: `config/providers/setup`, `config/providers/reconfigure` (also covers re-authentication) and `config/players/setup`, plus `config/flows/submit|get|abort`; step changes are pushed via the new `SETUP_FLOW_UPDATED` event - Providers that need no setup input are created immediately, so the add-provider path is uniform for all providers - Values collected by flows land in the new `setup_data` config section: encrypted at rest and never exposed over the API - Options saves no longer drop stored values that have no config entry (ports the player-config preservation guard to provider configs) **Related:** music-assistant/models#324 (shipped in models 1.1.169) ## Types of changes - [ ] Bugfix (non-breaking change which fixes an issue) — `bugfix` - [x] New feature (non-breaking change which adds functionality) — `new-feature` - [ ] Enhancement to an existing feature — `enhancement` - [ ] New music/player/metadata/plugin provider — `new-provider` - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) — `breaking-change` - [ ] Refactor (no behaviour change) — `refactor` - [ ] Documentation only — `documentation` - [ ] Maintenance / chore — `maintenance` - [ ] CI / workflow change — `ci` - [ ] Dependencies bump — `dependencies` ## Checklist - [x] The code change is tested and works locally. - [x] `pre-commit run --all-files` passes. - [x] `pytest` passes, and tests have been added/updated under `tests/` where applicable. - [x] For changes to shared models, the companion PR in `music-assistant/models` is linked. - [ ] For changes affecting the UI, the companion PR in `music-assistant/frontend` is linked. - [x] I have read and complied with the project's [AI Policy](https://github.com/music-assistant/.github/blob/main/AI_POLICY.md) for any AI-assisted contributions. - [ ] I have raised a PR against the documentation repository targeting the main or beta branch as appropriate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Groundwork for the new interactive setup flows: splitting provider/player setup (credentials, OAuth, pairing) from the regular config options. Purely additive, so the current server release keeps working against this package.
SetupFlowStepmodel +FlowStepTypeenum: the typed steps (form / external / progress / finish / abort) a running setup flow serves to clients, with server-side translation resolutionConfigEntryType.IMAGE: presentational image (data-URI) inside forms, e.g. pairing QR codes or illustrationsSETUP_FLOW_UPDATEDevent to push flow step updates to clientssetup_dataon ProviderConfig/PlayerConfig: storage for values collected by setup flows — persisted, but never exposed over the API