[26.0] Hide hidden tools in the tool form#22215
Merged
mvdbeek merged 8 commits intogalaxyproject:release_26.0from Apr 21, 2026
Merged
[26.0] Hide hidden tools in the tool form#22215mvdbeek merged 8 commits intogalaxyproject:release_26.0from
mvdbeek merged 8 commits intogalaxyproject:release_26.0from
Conversation
Member
You'd probably have to go through the tool lineage to find the hidden tools ? |
Member
Author
|
Thanks @mvdbeek I tried this in my last commit. |
Both callers only use the `tool` and (in one case) `tools` return values; the SelectField built for `tool_version_select_field` is discarded by every caller. Replace with direct `toolbox.get_tool(...)` calls and drop the now-unused `__build_tool_version_select_field` helper.
Keep `versions` as the full lineage list and surface a parallel `hidden_versions` array so clients can decide themselves whether to hide them. Replaces the silent rewrite of `versions` to `visible_tool_versions`, which dropped information that admins and other clients may still want.
Use the new `hidden_versions` field from the tool build response to drop hidden entries from the version dropdown. The currently selected version is kept in the list even if hidden, so users linked directly to a hidden version can still see what they are on.
Member
|
I've dropped the unused |
mvdbeek
approved these changes
Apr 15, 2026
Member
mvdbeek
left a comment
There was a problem hiding this comment.
Still OK for you @bgruening ?
The API test `test_show_lists_hidden_versions_separately` hits
`GET /tools/{id}` (Tool.to_dict), not `/build`. Mirror the build
response so show also carries the full `versions` list plus the
parallel `hidden_versions` array.
Member
Author
|
ofc, much more elaborated now. Thanks. Sorry that I dropped the ball here. Forget about this bug already. |
tool_cache is keyed by the unversioned tool id, so looking up a
lineage version via tool_cache.get_tool_by_id("tool/0.1") always
returned None and hidden_tool_versions came back empty. Look up
each lineage version through toolbox._tool_versions_by_id, which
is keyed exactly that way (tool_id -> {version: Tool}).
The test_section_multi panel section was curated to hold a single lineage so test_only_latest_version_in_panel could assert a precise count. Adding a second lineage inside the section broke that invariant. The hidden-versions tools remain registered at the toolbox root, which is all the API tests (@skip_without_tool) require.
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.
fixes hopefully: #22214