Skip to content

Conversation

@garbas
Copy link
Contributor

@garbas garbas commented Nov 18, 2025

The purpose of this PR is to rework how we activate a flox environment within vscode inorder to support remote development (wsl2, dev contaioners, ssh)

@github-actions github-actions bot added the team-developer-support Issues to be picked up by @flox/team-developer-support label Nov 18, 2025
@gilmishal gilmishal changed the title feat: Add deactivate environment command feat: Rework flox activation inside vscode extension Nov 19, 2025
@gilmishal gilmishal force-pushed the feat/support-remote-workspaces branch 2 times, most recently from 255d5c9 to 033ce64 Compare November 23, 2025 13:38
@gilmishal gilmishal force-pushed the feat/support-remote-workspaces branch from e5c7fef to 50af0b0 Compare December 5, 2025 15:46
@gilmishal gilmishal marked this pull request as ready for review December 5, 2025 16:17
garbas and others added 15 commits December 15, 2025 15:36
Add ability to deactivate Flox environment without restarting VSCode.
This includes a new deactivate button in the Flox info view and a
corresponding command registration.

Also includes minor formatting fixes (trailing newline cleanup).
Services status data is returned as a single JSON array, not as
newline-separated JSON objects. This fix parses the entire response
as a single JSON array rather than attempting to parse each line
individually.
…ng VSCode

Previously, flox.activate would restart VSCode in a flox context using
env.reopen(). This commit changes the behavior to:

- Run 'flox activate -- sleep infinity' as a background process
- Capture and store the PID for later cleanup
- Implement flox.deactivate command to kill the background process
- Use spawn() instead of exec() to get immediate PID access
- Process automatically dies when VSCode closes (detached: false)

This approach works correctly in remote VSCode sessions since the
extension code runs on the remote server.
@garbas garbas force-pushed the feat/support-remote-workspaces branch from f871dcb to 2cb0a4d Compare December 15, 2025 14:36
@garbas
Copy link
Contributor Author

garbas commented Dec 15, 2025

I've found a few minor issues, but I'll open issues and we can fix them later

@garbas garbas merged commit 923cd96 into main Dec 15, 2025
3 checks passed
@garbas garbas deleted the feat/support-remote-workspaces branch December 15, 2025 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-developer-support Issues to be picked up by @flox/team-developer-support

Projects

None yet

3 participants