Skip to content

🪲 BUG-#8: Kill child process on extension deactivate - #17

Merged
FernandoCelmer merged 3 commits into
masterfrom
feature/8
Aug 15, 2026
Merged

🪲 BUG-#8: Kill child process on extension deactivate#17
FernandoCelmer merged 3 commits into
masterfrom
feature/8

Conversation

@FernandoCelmer

@FernandoCelmer FernandoCelmer commented Aug 15, 2026

Copy link
Copy Markdown
Member

Description

  • src/extension.ts: Added module-level activeProvider reference, assigned in activate(), and wired into deactivate() to call ChatViewProvider.dispose().
  • src/vscode/sidebar/chatSidebarProvider.ts: Added dispose() method that forwards to ChatController.dispose() (already idempotent).

Motivation and Context

deactivate() was a no-op. The pycodeloop serve child process was only killed via webviewView.onDidDispose(), which does not fire (or fires too late) when the webview is hidden at the moment the extension host tears down (window close, reload, extension disable), leaving the process orphaned.

Closes #8

Types of changes

  • Bug fix (change that fixes an issue)
  • New feature (change which adds functionality)
  • Documentation

Checklist

  • I have performed a self-review of my own code
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the CHANGELOG
  • I have updated the documentation accordingly

@FernandoCelmer FernandoCelmer left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Code Review

Code issues found: 1

# Severity Comment
1 [Suggestion] Use context.subscriptions instead of module-level variable

Comment thread src/extension.ts
@FernandoCelmer FernandoCelmer added the bug Something isn't working label Aug 15, 2026
@FernandoCelmer
FernandoCelmer merged commit 17c010e into master Aug 15, 2026
2 checks passed
@FernandoCelmer
FernandoCelmer deleted the feature/8 branch August 15, 2026 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Child process leaks when extension deactivates while webview is hidden

1 participant