Summary
When a workspace folder is removed, the extension may throw a runtime error if that folder was never added to the project cache.
Actual Behavior
onFolderRemoved assumes a cached project exists and can attempt property access on undefined, causing an exception.
Expected Behavior
If the folder is not cached, removal should be safely skipped without throwing, and other extension workflows should continue normally.
Root Cause
ProjectsStorage.getFolder(...) can return undefined, but onFolderRemoved did not previously guard for that case.
Proposed Fix
Add a null/undefined guard in onFolderRemoved
If cache miss: log debug message and return safely.
If cache hit: call appLauncher.dispose() and then ProjectsStorage.delFolder(...)
Acceptance Criteria
Removing an uncached folder does not throw.
Removing a cached folder still disposes resources and clears cache correctly.
Workspace folder add/remove events remain stable across mixed project types.
Summary
When a workspace folder is removed, the extension may throw a runtime error if that folder was never added to the project cache.
Actual Behavior
onFolderRemoved assumes a cached project exists and can attempt property access on undefined, causing an exception.
Expected Behavior
If the folder is not cached, removal should be safely skipped without throwing, and other extension workflows should continue normally.
Root Cause
ProjectsStorage.getFolder(...) can return undefined, but onFolderRemoved did not previously guard for that case.
Proposed Fix
Add a null/undefined guard in onFolderRemoved
If cache miss: log debug message and return safely.
If cache hit: call appLauncher.dispose() and then ProjectsStorage.delFolder(...)
Acceptance Criteria
Removing an uncached folder does not throw.
Removing a cached folder still disposes resources and clears cache correctly.
Workspace folder add/remove events remain stable across mixed project types.