PR: Fix extension install path not changeable (#3193)#3198
PR: Fix extension install path not changeable (#3193)#3198
Conversation
Added functions to ensure custom extension paths are registered and to get the default extension directory. Updated the custom section for extension installation to handle new paths and states.
|
Unable to trigger custom agent "Code Reviewer". You have run out of credits 😔 |
Refactor get_thirdparty_ext_root_dirs to use a list for deterministic ordering and to ensure the default path is first when included.
There was a problem hiding this comment.
Pull request overview
Fixes Extension Manager install-path selection/regression from the Feb UI refactor by making the default third‑party extensions path deterministic, re-enabling install path picking for catalog installs, and ensuring newly chosen install directories are persisted so extensions are discoverable after reload.
Changes:
- Make
get_thirdparty_ext_root_dirs()deterministic (default dir first; preserve config order; de-dupe). - Enable “Pick installation path” for not-yet-installed catalog extensions and use a helper for default path selection.
- Register the chosen install directory in user config after installs so reload discovers the extension.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
pyrevitlib/pyrevit/userconfig.py |
Deterministic ordering + order-preserving de-dupe for third-party extension root dirs. |
extensions/pyRevitCore.extension/pyRevit.tab/pyRevit.panel/Extensions.smartbutton/script.py |
UI logic fix for enabling path selection + persist chosen install directory after install. |
extensions/pyRevitCore.extension/pyRevit.tab/pyRevit.panel/Extensions.smartbutton/script.py
Outdated
Show resolved
Hide resolved
extensions/pyRevitCore.extension/pyRevit.tab/pyRevit.panel/Extensions.smartbutton/script.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ensions.smartbutton/script.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ensions.smartbutton/script.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
All of the above is for the legacy loader, right? |
@jmcouffin this is for both loaders. I think you refactored the tool back in February, and this PR fixes on the script & config levels not runtime level. |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26090+1540-wip |
|
📦 New work-in-progress (wip) builds are available for 6.1.0.26090+1556-wip |
|
📦 New public release are available for 6.2.0.26090+1754 |
Added functions to ensure custom extension paths are registered and to get the default extension directory. Updated the custom section for extension installation to handle new paths and states.
PR: Fix extension install path not changeable (#3193)
The Extension Manager's "Pick installation path" button was grayed out when selecting a catalog extension to install, and the auto-selected default path was non-deterministic. Additionally, picking a custom folder that wasn't already in the user's Custom Extension Directories would silently fail after reload because the folder was never registered as a search path.ct.
Checklist
Before submitting your pull request, ensure the following requirements are met:
pipenv run black {source_file_or_directory}Related Issues
Root Cause
The Feb 15 UI refactoring (commit ec2eb76) replaced the old context-menu dropdown install flow with a text field + "Pick" button, but introduced three bugs:
_update_add_custom_section_for_selection() unconditionally setpath_custom_ext_b.IsEnabled = False, locking out path selection for uninstalled extensionsget_thirdparty_ext_root_dirs()collected paths in a Pythonset(), making[0]non-deterministic — users got their server path instead of the local defaultinstall_custom_extension()never registered the chosen install directory in pyRevit's config, so extensions installed to new folders weren't discovered after reload