Summary
When running the Stop React Native LogCat Monitor command with multiple active monitors, canceling the device Quick Pick causes the command flow to hang instead of exiting gracefully.
Steps to Reproduce
Start LogCat monitor for at least two Android devices/emulators.
Open Command Palette and run React Native: Stop React Native LogCat Monitor.
In the Quick Pick list, press Esc (or click outside) to cancel selection.
Actual Behavior
The command does not complete and appears to hang.
Expected Behavior
The command should exit cleanly on cancel, without stopping any monitor and without leaving a pending operation.
Impact
Poor command UX when users cancel selection.
Potential confusion because command appears stuck.
Risk of lingering unresolved async operation in extension flow.
Root Cause
In the cancel branch, the command awaited a Promise that never resolves, which blocked completion.
Proposed Fix
Treat cancel as a normal user action.
Return early when selection is undefined.
Add null-safe handling in command execution path before monitor deletion.
Acceptance Criteria
Canceling Quick Pick exits immediately.
No monitor is removed on cancel.
No unresolved/pending command state after cancel.
Existing behavior for valid selection remains unchanged.
Regression Scope
Stop LogCat monitor command with single monitor.
Stop LogCat monitor command with multiple monitors and valid selection.
Cancel path from Quick Pick.
Summary
When running the Stop React Native LogCat Monitor command with multiple active monitors, canceling the device Quick Pick causes the command flow to hang instead of exiting gracefully.
Steps to Reproduce
Start LogCat monitor for at least two Android devices/emulators.
Open Command Palette and run React Native: Stop React Native LogCat Monitor.
In the Quick Pick list, press Esc (or click outside) to cancel selection.
Actual Behavior
The command does not complete and appears to hang.
Expected Behavior
The command should exit cleanly on cancel, without stopping any monitor and without leaving a pending operation.
Impact
Poor command UX when users cancel selection.
Potential confusion because command appears stuck.
Risk of lingering unresolved async operation in extension flow.
Root Cause
In the cancel branch, the command awaited a Promise that never resolves, which blocked completion.
Proposed Fix
Treat cancel as a normal user action.
Return early when selection is undefined.
Add null-safe handling in command execution path before monitor deletion.
Acceptance Criteria
Canceling Quick Pick exits immediately.
No monitor is removed on cancel.
No unresolved/pending command state after cancel.
Existing behavior for valid selection remains unchanged.
Regression Scope
Stop LogCat monitor command with single monitor.
Stop LogCat monitor command with multiple monitors and valid selection.
Cancel path from Quick Pick.