feat: interactive approval flow for community extensions#3015
feat: interactive approval flow for community extensions#3015DyanGalih wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR adds an interactive “catalog approval” flow to unblock installing extensions from discovery-only catalogs, and persists that approval into the project’s .specify/extension-catalogs.yml. It also tightens YAML serialization safety and adds a __main__.py entry-point.
Changes:
- Add
ExtensionCatalog.approve_catalog_install()to persistinstall_allowed: truefor an active catalog while preserving the catalog stack. - Update
extension addUX to prompt for approval before starting any spinner/install work; refresh several related CLI messages. - Switch YAML writes to
yaml.safe_dumpand addsrc/specify_cli/__main__.py.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| tests/test_extensions.py | Adds coverage for approval persistence, symlink safety behavior, and prompt/spinner ordering in extension add. |
| src/specify_cli/extensions.py | Adds catalog approval persistence method and adjusts compatibility version check behavior. |
| src/specify_cli/main.py | Adds module entry-point wrapper calling main(). |
| src/specify_cli/init.py | Updates CLI flow for approvals + safer YAML dumping and spinner placement. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
We have addressed the PR review feedback! 🚀 Updates:
All test suites have been run locally and are passing successfully! Let me know if there's anything else! |
94dfba1 to
83d8013
Compare
|
I have pushed an additional update to address the remaining feedback points from the review:
All tests are passing locally. Thanks for the thorough review! ✨ |
|
Note this is not necessary at all as a user can add the community catalog as an authorized read/write catalog by using the catalog system. Note that this would mean the entire catalog is available for install so BUYER BEWARE. So can we close this? |
Description
This PR introduces an interactive approval flow when users attempt to install an extension from a non-approved catalog (like the
communitycatalog). Previously, users were met with a hard error instructing them to manually edit.specify/extension-catalogs.yml.Changes Made
extension_addnow prompts the user with a warning panel if the extension's catalog is not approved. If approved interactively, it updates the config and proceeds with installation.approve_catalog_installinExtensionCatalogto cleanly serialize and write the updated active catalogs to YAML, preserving the full catalog stack (including defaults).extension_searchandextension_infoCLI output to guide users to runspecify extension addinstead of manual file editing.yaml.dumpwithyaml.safe_dumpin all catalog-related commands for consistency and safety.__main__.pytospecify_cliso the package can be invoked locally usingpython -m specify_cliwithout global installation collisions.