Fix automatic workflow run updates with improved polling mechanism#541
Open
spboyer wants to merge 16 commits intogithub:mainfrom
Open
Fix automatic workflow run updates with improved polling mechanism#541spboyer wants to merge 16 commits intogithub:mainfrom
spboyer wants to merge 16 commits intogithub:mainfrom
Conversation
…s; refine run polling log output
Author
|
Related #285 |
There was a problem hiding this comment.
Pull request overview
This PR implements an automatic polling mechanism to update workflow runs in real-time without requiring manual refresh, addressing issue #229. The solution adds intelligent polling that respects window focus and view visibility to minimize unnecessary API calls.
Key changes include:
- Automatic polling for active workflow runs (in_progress, queued, waiting, requested) with a 4-second interval for up to 15 minutes
- Window focus and view visibility tracking to pause polling when the extension is not in use
- Enhanced workflow trigger command that waits for new runs to appear and automatically starts polling them
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/treeViews/workflows.ts | Exports WorkflowsTreeNode type to enable access from other modules |
| src/treeViews/workflowRunTreeDataProvider.ts | Adds automatic polling initiation for active workflow runs when tree nodes are created |
| src/treeViews/treeViews.ts | Tracks workflow tree view visibility state and notifies the store |
| src/store/workflowRun.ts | Unconditionally clears job cache on run updates to ensure polling fetches latest job status |
| src/store/store.ts | Implements polling mechanism with focus/visibility checks and cleanup logic for completed runs |
| src/extension.ts | Registers window state change handler to track focus state |
| src/commands/triggerWorkflowRun.ts | Enhanced to detect newly triggered runs and automatically start polling them |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes issue #229 where newly triggered workflow runs required manual refresh to see updates in the UI. The extension now automatically polls for workflow run updates and reflects changes in real-time.
Changes
Enhanced Polling Mechanism
Key Improvements
Related Issues
Fixes #229
Testing
The fix ensures that: