Skip to content

Easier setup code copy option in setup flow for Tidal/Spotify/Audible music provider - #6268

Draft
afeldman1 wants to merge 6 commits into
music-assistant:devfrom
afeldman1:tidal-copy-code
Draft

afeldman1 wants to merge 6 commits into
music-assistant:devfrom
afeldman1:tidal-copy-code

Conversation

@afeldman1

@afeldman1 afeldman1 commented Sep 11, 2026

Copy link
Copy Markdown

What does this implement/fix?

Add easy to use copy button for Tidal, Spotify, and Audible setup

Related issue

music-assistant/models#395
music-assistant/frontend#2710

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 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.

🟡 Changes recommended

Current dependency pins lack the new model and UI support, and the API schema version and server test coverage need updating.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds clipboard support for Tidal device-login codes through the shared setup-flow contract.

Changes:

  • Adds optional copy_text propagation to external setup steps.
  • Supplies the Tidal device code as copyable text.
  • Requires companion model/frontend releases and dependency updates.
File summaries
File Description
music_assistant/providers/tidal/setup_flow.py Exposes the Tidal user code for copying.
music_assistant/models/setup_flow.py Propagates copyable text into setup-flow steps.
Review details

Suppressed comments (2)

music_assistant/models/setup_flow.py:564

  • [CRITICAL] This unconditionally passes a keyword that the pinned music-assistant-models==1.1.208 does not define (models#395 is still open), so constructing any setup-flow step raises TypeError even when copy_text is None; merge/release the model change and bump the server pin before this code lands.
            copy_text=copy_text,

music_assistant/providers/tidal/setup_flow.py:52

  • [PROBLEM] The existing Tidal setup-flow test checks the URL and translation_params but never verifies this new field, so a wiring regression would pass; add assert step.copy_text == "ABCDE" near tests/controllers/config/test_setup_flows.py:1908.
                copy_text=str(device["userCode"]),
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

step_id: str = "auth",
expires_in: float | None = None,
translation_params: list[str] | None = None,
copy_text: str | None = None,
url=_verification_url(device),
step_id="device_login",
expires_in=float(device["expiresIn"]),
copy_text=str(device["userCode"]),
@OzGav

OzGav commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

The PR title needs to clearly state what the PR fixes or enables in a user facing style

@afeldman1 afeldman1 changed the title Tidal copy code Tidal music provider setup. Easier setup code copy option. Sep 11, 2026
@afeldman1 afeldman1 changed the title Tidal music provider setup. Easier setup code copy option. Easier setup code copy option in setup flow for Tidal music provider Sep 11, 2026
@musicassistant-bot

Copy link
Copy Markdown
Contributor

@afeldman1 The title or description of this pull request needs a fix:

  • Checklist item not ticked: pytest passes, and tests have been added/updated under tests/ where applicable.

Release notes are generated from the title, and the template carries what reviewers need, so please edit them before this is reviewed.

RyanAtTanagra pushed a commit to RyanAtTanagra/music-assistant that referenced this pull request Sep 11, 2026
…ant#6216)

# What does this implement/fix?

Release notes could list changes that never shipped in that release.
When a commit had no
merge line, the generator looked for `#<number>` anywhere in the commit
message, so a pull
request merely *mentioned* in a cherry-pick note or a `fixes #...`
trailer was treated as
shipped.

That is how music-assistant#5557 ended up in the generated 2.10.2 stable notes (removed
by hand before
release): the backport of music-assistant#6171 carries a note saying the conflicting
test file belongs to
music-assistant#5557, "an enhancement that is not on stable". Only music-assistant#5557 slipped
through because it merged
to `dev` after the previous stable tag, which is the one case the
merge-date cutoff cannot
catch.

- Read the pull request number from the commit title only, and share
that one helper
between the include and exclude paths (the exclude path already did
this)
- Log a warning when a commit title names no pull request, so a future
change in how
  commits land is visible in the workflow log
- Cover the case in `tests/test_generate_release_notes.py`

Replaying the real 2.10.1..2.10.2 range yields the same 41 pull requests
and drops all four
stray body references (music-assistant#5557, music-assistant#4108, music-assistant#6268, music-assistant#6290).

**Related issue (if applicable):**

- related issue <link to issue>

## Types of changes

<!--
Tick exactly one box. CI (.github/workflows/pr-labels.yaml) derives
the label from the ticked box and applies it automatically; the
release-notes generator uses that same label to slot this change
into the next release notes.
-->

- [ ] 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`
- [x] 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.
- [ ] 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](https://github.com/music-assistant/music-assistant.io/blob/main/CONTRIBUTING.md)
targeting the main or beta branch as appropriate.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 11, 2026 21:29

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.

🟡 Changes recommended

The pinned model lacks copy_text, causing setup flows to fail, and contract/version integration remains incomplete.

Get a fresh assessment by requesting another Copilot review.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Balanced

reason=reason,
translation_owner=self._translation_owner,
translation_params=translation_params,
copy_text=copy_text,
url=_verification_url(device),
step_id="device_login",
expires_in=float(device["expiresIn"]),
copy_text=str(device["userCode"]),
Copilot AI review requested due to automatic review settings September 11, 2026 22:41

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.

🟡 Changes recommended

Existing unresolved reviews identify missing model/frontend dependency updates, an API schema bump, and test coverage.

Get a fresh assessment by requesting another Copilot review.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

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.

🟡 Changes recommended

The unresolved model/frontend dependency pins, schema-version bump, and test coverage issues must be addressed.

Get a fresh assessment by requesting another Copilot review.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Copilot AI review requested due to automatic review settings September 12, 2026 01:25
@afeldman1 afeldman1 changed the title Easier setup code copy option in setup flow for Tidal music provider Easier setup code copy option in setup flow for Tidal/Spotify music provider Sep 12, 2026

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.

🟡 Changes recommended

The frontend only renders copyable text for external steps, making the Spotify form enhancement unreachable.

Get a fresh assessment by requesting another Copilot review.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Balanced

step_id="developer",
last_step=True,
translation_params=[HOSTED_CALLBACK_URL],
copy_text=HOSTED_CALLBACK_URL,
Copilot AI review requested due to automatic review settings September 12, 2026 01:33
@afeldman1 afeldman1 changed the title Easier setup code copy option in setup flow for Tidal/Spotify music provider Easier setup code copy option in setup flow for Tidal/Spotify/Audible music provider Sep 12, 2026

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.

🟡 Changes recommended

The pinned models package cannot accept the new field, and the companion frontend does not render it for FORM steps.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (2)

music_assistant/models/setup_flow.py:567

  • [CRITICAL] pyproject.toml is still exact-pinned to music-assistant-models==1.1.209, whose SetupFlowStep has no copy_text argument; because _build_step now always passes this keyword, every setup flow will fail with TypeError before publishing its first step. Bump the models pin to 1.1.210 (the release containing models#395) in this PR.
            copy_text=copy_text,

music_assistant/models/setup_flow.py:206

  • [PROBLEM] This adds a serialized SetupFlowStep field without bumping API_SCHEMA_VERSION (currently 70). Bump the schema version and gate frontend#2710 on it so API clients can feature-detect support for the new shared-model field.
            copy_text=copy_text,
  • Files reviewed: 4/4 changed files
  • Comments generated: 2
  • Review effort level: Balanced

last_step: bool | None = None,
expires_in: float | None = None,
translation_params: list[str] | None = None,
copy_text: str | None = None,
url=url,
expires_in=expires_in,
translation_params=translation_params,
copy_text=copy_text,
@MarvinSchenkel

Copy link
Copy Markdown
Contributor

Marking this PR as draft so we can keep track of which PRs needs our attention. Please mark as 'Ready for review' when you want us to have another look 🙏 .

@MarvinSchenkel
MarvinSchenkel marked this pull request as draft September 17, 2026 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants