Skip to content

feat(config/linux): add Beta Flatpak Spotify Path for Spicetify detection#3850

Open
Bossiskeyboard wants to merge 5 commits into
spicetify:mainfrom
Bossiskeyboard:main
Open

feat(config/linux): add Beta Flatpak Spotify Path for Spicetify detection#3850
Bossiskeyboard wants to merge 5 commits into
spicetify:mainfrom
Bossiskeyboard:main

Conversation

@Bossiskeyboard
Copy link
Copy Markdown
Contributor

@Bossiskeyboard Bossiskeyboard commented May 23, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Improved Spotify detection on Linux by adding support for Flatpak beta installation locations (both system and user installs), reducing failed app-detection cases and improving launch and integration reliability for users running the Flatpak beta of Spotify.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 23, 2026

📝 Walkthrough

Walkthrough

Adds two Flatpak beta directory entries (system and user locations) to the Linux app's Spotify installation candidate list for discovery.

Changes

Linux Flatpak Beta Path Support

Layer / File(s) Summary
Add Flatpak beta installation paths
src/utils/config.go
The potentialList in linuxApp is extended with Flatpak beta directory candidates (/var/lib/flatpak/.../beta/.../spotify and $HOME/.local/share/flatpak/.../beta/.../spotify) for Spotify installation discovery.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • rxri

Poem

🐰 A hop, two paths, both in sight,
Beta Flatpak found tonight,
Tiny change, the scanner sings,
Discovery on hopeful wings,
Pipes and purrs and moonlit bytes.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately describes the main change: adding Flatpak beta Spotify paths to the Linux config for Spicetify detection.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/utils/config.go (1)

313-313: ⚡ Quick win

Add trailing slash for consistency.

All other paths in potentialList end with a trailing slash. While filepath.Join handles this correctly, maintaining the pattern improves consistency.

📝 Proposed fix
-		"/var/lib/flatpak/app/com.spotify.Client/x86_64/beta/active/files/extra/share/spotify",
+		"/var/lib/flatpak/app/com.spotify.Client/x86_64/beta/active/files/extra/share/spotify/",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/utils/config.go` at line 313, The string in the potentialList slice (the
Spotify path entry) lacks a trailing slash while all other entries include one;
update the literal
"/var/lib/flatpak/app/com.spotify.Client/x86_64/beta/active/files/extra/share/spotify"
in the potentialList declaration in src/utils/config.go to include a trailing
"/" for consistency with the rest of the list and to match how other paths are
formatted.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/utils/config.go`:
- Line 313: The Flatpak paths slice in config.go currently includes a user-level
stable path but is missing the corresponding user-level beta path; update the
list of Spotify install paths (the slice/variable that holds Flatpak paths in
src/utils/config.go) to add the user-level beta Flatpak entry
$HOME/.local/share/flatpak/app/com.spotify.Client/x86_64/beta/active/files/extra/share/spotify
so user-installed Flatpak beta installs are auto-detected (ensure you add it
alongside the existing user-level stable and system-level beta/stable entries).

---

Nitpick comments:
In `@src/utils/config.go`:
- Line 313: The string in the potentialList slice (the Spotify path entry) lacks
a trailing slash while all other entries include one; update the literal
"/var/lib/flatpak/app/com.spotify.Client/x86_64/beta/active/files/extra/share/spotify"
in the potentialList declaration in src/utils/config.go to include a trailing
"/" for consistency with the rest of the list and to match how other paths are
formatted.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7072fafd-3d6f-4c0c-b752-0c58d642be24

📥 Commits

Reviewing files that changed from the base of the PR and between a1447c8 and 8d46e22.

📒 Files selected for processing (1)
  • src/utils/config.go

Comment thread src/utils/config.go Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
src/utils/config.go (1)

313-313: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Missing user-level Flatpak beta path.

Line 312 includes a user-level stable Flatpak path, but no corresponding user-level beta path is added. Users who install Spotify Flatpak beta at the user level won't be auto-detected.

➕ Suggested addition
 		"/var/lib/flatpak/app/com.spotify.Client/x86_64/beta/active/files/extra/share/spotify/",
+		"$HOME/.local/share/flatpak/app/com.spotify.Client/x86_64/beta/active/files/extra/share/spotify/",
 		"$HOME/.local/share/spotify-launcher/install/usr/share/spotify/",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/utils/config.go` at line 313, The Flatpak paths slice in
src/utils/config.go includes a user-level stable entry but is missing the
equivalent user-level beta path, so add the user-level Flatpak beta install path
(the user-home equivalent of the system beta path already present) to the same
slice of Flatpak install paths; mirror the pattern used for the existing
user-level stable entry so the beta installation under the user account is
auto-detected.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@src/utils/config.go`:
- Line 313: The Flatpak paths slice in src/utils/config.go includes a user-level
stable entry but is missing the equivalent user-level beta path, so add the
user-level Flatpak beta install path (the user-home equivalent of the system
beta path already present) to the same slice of Flatpak install paths; mirror
the pattern used for the existing user-level stable entry so the beta
installation under the user account is auto-detected.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7a96b502-7504-4de6-b79d-ebd81672de71

📥 Commits

Reviewing files that changed from the base of the PR and between 8d46e22 and 1cec157.

📒 Files selected for processing (1)
  • src/utils/config.go

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
src/utils/config.go (1)

311-311: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Missing user-level beta Flatpak path.

The system-level beta path is added, but the corresponding user-level beta path ($HOME/.local/share/flatpak/app/com.spotify.Client/x86_64/beta/active/files/extra/share/spotify/) is missing. Users who install Spotify Flatpak beta at the user level won't be auto-detected.

For consistency with the stable channel (which includes both system-level at line 312 and user-level at line 313), the beta channel should also support both installation scopes.

➕ Suggested addition
 		"/var/lib/flatpak/app/com.spotify.Client/x86_64/beta/active/files/extra/share/spotify/",
 		"/var/lib/flatpak/app/com.spotify.Client/x86_64/stable/active/files/extra/share/spotify/",
 		"$HOME/.local/share/flatpak/app/com.spotify.Client/x86_64/stable/active/files/extra/share/spotify/",
+		"$HOME/.local/share/flatpak/app/com.spotify.Client/x86_64/beta/active/files/extra/share/spotify/",
 		"$HOME/.local/share/spotify-launcher/install/usr/share/spotify/",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/utils/config.go` at line 311, The beta Flatpak system path entry
"/var/lib/flatpak/app/com.spotify.Client/x86_64/beta/active/files/extra/share/spotify/"
is present but the corresponding user-level beta path is missing; update the
list of Spotify/Flatpak paths (the slice in config.go that contains the beta
entry) to also include the user-level beta path
"$HOME/.local/share/flatpak/app/com.spotify.Client/x86_64/beta/active/files/extra/share/spotify/"
(mirror how the stable channel includes both system and user paths) so
user-scoped Flatpak beta installs are auto-detected.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In `@src/utils/config.go`:
- Line 311: The beta Flatpak system path entry
"/var/lib/flatpak/app/com.spotify.Client/x86_64/beta/active/files/extra/share/spotify/"
is present but the corresponding user-level beta path is missing; update the
list of Spotify/Flatpak paths (the slice in config.go that contains the beta
entry) to also include the user-level beta path
"$HOME/.local/share/flatpak/app/com.spotify.Client/x86_64/beta/active/files/extra/share/spotify/"
(mirror how the stable channel includes both system and user paths) so
user-scoped Flatpak beta installs are auto-detected.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9b08395f-586a-4923-bf57-8eca0f868270

📥 Commits

Reviewing files that changed from the base of the PR and between 1cec157 and 281299c.

📒 Files selected for processing (1)
  • src/utils/config.go

@Bossiskeyboard Bossiskeyboard changed the title Spotify flatpak beta path for spicetify feat(config/linux): Add Beta Flatpak Spotify Path for Spicetify detection May 23, 2026
@Bossiskeyboard Bossiskeyboard changed the title feat(config/linux): Add Beta Flatpak Spotify Path for Spicetify detection feat(config/linux): add Beta Flatpak Spotify Path for Spicetify detection May 23, 2026
@Bossiskeyboard
Copy link
Copy Markdown
Contributor Author

that should be it and i hope this helps someone out.

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