This repository was archived by the owner on Oct 23, 2025. It is now read-only.
Commit 574801a
Refresh environment managers automatically when expanding tree node (#783)
When expanding environment manager nodes in the Environment Managers
view, newly created environments (such as those created by `pipenv
install pytest` or `conda create -n myenv`) were not appearing until the
user manually refreshed the view.
This change adds automatic refresh functionality for all environment
managers when their tree node is expanded. The implementation:
- Calls the existing `manager.refresh(undefined)` method before
retrieving environments for any manager type
- Affects all environment managers (Pipenv, Conda, Venv, Poetry, etc.)
providing consistent behavior
- Uses the established refresh mechanism that properly updates
collections and fires change events
**Before:**
1. Run `pipenv install pytest` or create a new environment with any
manager
2. Open Environment Managers view
3. Expand environment manager node
4. New environment is not visible until manual refresh
**After:**
1. Run `pipenv install pytest` or create a new environment with any
manager
2. Open Environment Managers view
3. Expand environment manager node
4. New environment appears immediately
The fix is minimal and targeted, modifying only 1 line of code in the
`getChildren` method in `EnvManagerView`. Unit tests have been updated
to validate the core logic for any manager type.
Fixes #782.
<!-- START COPILOT CODING AGENT TIPS -->
---
💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: eleanorjboyd <[email protected]>1 parent f8806c0 commit 574801a
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
98 | 102 | | |
99 | 103 | | |
100 | 104 | | |
| |||
0 commit comments