Add Flatpak install method to desktop CLI validation#3895
Open
Add Flatpak install method to desktop CLI validation#3895
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3895 +/- ##
==========================================
+ Coverage 67.18% 67.20% +0.02%
==========================================
Files 448 448
Lines 45218 45220 +2
==========================================
+ Hits 30380 30392 +12
+ Misses 12469 12458 -11
- Partials 2369 2370 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f983db6 to
79687ad
Compare
JAORMX
approved these changes
Feb 20, 2026
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.
this is related to this PR in the desktop app: stacklok/toolhive-studio#1670 that fixes some things in the flatpak build system.
Why a new install method
Flatpak apps run in an isolated environment. In order to keep things working properly & actually leverage this, the CLI also needs to be ran with
flatpak run. This means we cannot just create a symlink, like we do on Linux normally. Instead, the desktop app will add a wrapper script under thethvname that will run the binary using flatpak.From the user perspective - and as of today, from
thv's perspective, the behavior and logic is exactly the same as with thesymlinkmethod, however the actual technical implementation on the toolhive-studio side is completely different. So to avoid future problems, it is reasonable to distinguish these 2 cases today. This way the code is also more self-documenting, we will not miss the fact that we need to be aware of this issue.How it was tested
First, I tested that the algorithm used in stacklok/toolhive-studio#1670 works with the symlink method. Then, I made the changes you see in this PR and tested it using the following steps: