You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix race condition in issues tree view where getIssues errors prevent tree refresh
The issues tree view could get permanently stuck empty because:
1. `setIssues()` used the `new Promise(async executor)` anti-pattern and only
fired `_onDidChangeIssueData` on success. If `getIssues()` threw (e.g. due
to a transient network error), the promise rejected silently, the event
never fired, and the tree never learned to refresh.
2. `setIssueData()` didn't fire `_onDidChangeIssueData` after processing all
queries, so if all queries failed, the tree stayed permanently empty until
a git commit triggered a new `setIssueData` call.
Fix:
- Refactor `setIssues()` to use async/await properly, catch errors gracefully
(resolving with undefined instead of rejecting), and fire the change event
in a `finally` block so it always fires.
- Fire `_onDidChangeIssueData` at the end of `setIssueData()` to guarantee
the tree always gets a refresh signal after data loading completes.
Agent-Logs-Url: https://github.com/microsoft/vscode-pull-request-github/sessions/42a1cce0-564c-42dd-afc9-909f2730d385
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
0 commit comments