Skip to content

Fix provider setup flows#5072

Merged
marcelveldt merged 2 commits into
devfrom
marcelveldt-fix-setup-flows
Jul 26, 2026
Merged

Fix provider setup flows#5072
marcelveldt merged 2 commits into
devfrom
marcelveldt-fix-setup-flows

Conversation

@marcelveldt

Copy link
Copy Markdown
Member

What does this implement/fix?

Several plugins skipped required choices during setup, leaving target players unset and multiple instances ambiguously named.

  • Add guided setup for MCP Server, AirPlay Receiver, Spotify Connect, AriaCast Receiver, and VBAN Receiver
  • Include player and device naming in Yandex Music Connect setup
  • Preserve existing settings and fix multi-instance names and AirPlay receiver detection

Related issue (if applicable):

  • N/A

Types of changes

  • Bugfix (non-breaking change which fixes an issue) — bugfix
  • 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

  • The code change is tested and works locally.
  • pre-commit run --all-files passes.
  • pytest passes, and tests have been added/updated under tests/ where applicable.
  • 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.
  • I have read and complied with the project's AI Policy for any AI-assisted contributions.
  • I have raised a PR against the documentation repository targeting the main or beta branch as appropriate.

Copilot AI review requested due to automatic review settings July 26, 2026 23:38
…flows

# Conflicts:
#	tests/models/test_provider.py
@codspeed-hq

codspeed-hq Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 11 untouched benchmarks
⏩ 7 skipped benchmarks1


Comparing marcelveldt-fix-setup-flows (edface1) with dev (262cfc1)2

Open in CodSpeed

Footnotes

  1. 7 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on dev (e5a4d25) during the generation of this report, so 262cfc1 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR improves provider setup reliability by moving “identity/target” choices (e.g., target player and advertised device name) into interactive setup flows for several receiver/connect-style providers, while keeping runtime tuning options in normal config entries and ensuring legacy configs migrate cleanly.

Changes:

  • Added guided setup flows for AirPlay Receiver, Spotify Connect, AriaCast Receiver, VBAN Receiver, and FastMCP Server (Connect Wizard flow).
  • Updated providers to read setup-flow-owned fields from setup_data (via get_setup_value) and adjusted migrations to move legacy values into setup_data.
  • Extended test coverage for the new flows, legacy-prefill behavior, AirPlay receiver self-detection, and multi-instance default naming.

Reviewed changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/providers/yandex_ynison/test_setup_flow.py Updates setup-flow tests to submit and assert player/device identity fields.
tests/providers/yandex_ynison/test_config_entries.py Adjusts expectations: identity fields are setup-flow-only, not runtime config entries.
tests/providers/receiver_setup_flows/test_receiver_setup_flows.py New parametrized tests for receiver setup flows and VBAN endpoint/format collection.
tests/providers/receiver_setup_flows/init.py Adds package init/docstring for new receiver flow tests.
tests/providers/fastmcp_server/test_setup_flow.py Adds test ensuring MCP Connect Wizard flow finishes after callback route is hit.
tests/providers/fastmcp_server/test_connect_wizard.py Adds tests for ingress-aware setup callback fragment and direct base_url URL generation; asserts wizard HTML signals completion.
tests/providers/airplay/test_provider.py Extends AirPlay self-receiver filtering tests to use setup-flow-stored receiver name.
tests/models/test_provider.py Adds regression test for numeric multi-instance default naming fallback.
tests/controllers/config/test_setup_flows.py Asserts SetupSession.callback_path matches the expected callback route.
tests/controllers/config/test_migrations.py Adds migration tests for moving new setup-flow fields into setup_data and AirPlay-specific cases.
music_assistant/translations/en.json Adds/updates translation keys for the new setup flows and updated Yandex Ynison wording.
music_assistant/providers/yandex_ynison/strings.json Updates setup-flow description to mention player + device naming.
music_assistant/providers/yandex_ynison/setup_flow.py Adds player selector + publish name to the Ynison setup step and persists them via finish.
music_assistant/providers/yandex_ynison/provider.py Reads player/device identity from setup data; removes those fields from runtime config entries.
music_assistant/providers/vban_receiver/strings.json Adds setup-flow title/description keys.
music_assistant/providers/vban_receiver/setup_flow.py New VBAN setup flow collecting sender/stream/format and local bind endpoint.
music_assistant/providers/vban_receiver/provider.py Switches VBAN “setup” fields to setup_data reads and trims runtime config entries accordingly.
music_assistant/providers/spotify_connect/strings.json Adds setup-flow title/description keys.
music_assistant/providers/spotify_connect/setup_flow.py New setup flow collecting target player and advertised device name.
music_assistant/providers/spotify_connect/init.py Moves identity fields to setup data, adds instance postfix based on publish name, and narrows runtime config entries.
music_assistant/providers/fastmcp_server/strings.json Adds setup-flow translation keys for Connect Wizard step.
music_assistant/providers/fastmcp_server/setup_flow.py New setup flow that opens wizard and completes setup via callback signaling.
music_assistant/providers/fastmcp_server/connect/page.py Adds setup-callback parsing and automatic completion signaling after config/token generation.
music_assistant/providers/fastmcp_server/connect/actions.py Adds setup_callback_path fragment support (ingress-aware) and validation.
music_assistant/providers/fastmcp_server/_init_helpers.py Dispatch now forwards setup callback path and can use server base_url as an additional URL source.
music_assistant/providers/ariacast_receiver/strings.json Adds setup-flow title/description keys.
music_assistant/providers/ariacast_receiver/setup_flow.py New setup flow collecting target player.
music_assistant/providers/ariacast_receiver/init.py Reads target player from setup data and trims runtime config entries accordingly.
music_assistant/providers/airplay/provider.py Uses stored setup-flow receiver name when filtering own receiver adverts.
music_assistant/providers/airplay_receiver/strings.json Adds setup-flow title/description keys.
music_assistant/providers/airplay_receiver/setup_flow.py New setup flow collecting target player and advertised receiver name.
music_assistant/providers/airplay_receiver/init.py Moves identity fields to setup data, adds instance postfix based on receiver name, and narrows runtime config entries.
music_assistant/models/setup_flow.py Exposes callback_path and refactors callback_url to derive from it.
music_assistant/models/provider.py Fixes default_name to use computed postfix (numeric fallback) rather than the property directly.
music_assistant/helpers/config_entries.py Adds shared create_player_selector helper for consistent player dropdown creation/prefill.
music_assistant/controllers/config/migrations.py Migrates newly setup-owned keys into setup_data, persists default AirPlay receiver name once, and avoids ghost cleanup for setup-flow instances.

Copilot AI review requested due to automatic review settings July 26, 2026 23:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 34 out of 34 changed files in this pull request and generated no new comments.

@marcelveldt
marcelveldt merged commit 06a59c6 into dev Jul 26, 2026
18 checks passed
@marcelveldt
marcelveldt deleted the marcelveldt-fix-setup-flows branch July 26, 2026 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants