Skip to content

Add immediate snapshot fetch when polling starts#6

Closed
Copilot wants to merge 2 commits intofang-devfrom
copilot/sub-pr-2-again
Closed

Add immediate snapshot fetch when polling starts#6
Copilot wants to merge 2 commits intofang-devfrom
copilot/sub-pr-2-again

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 19, 2026

Addresses feedback on #2: the UI showed no snapshots until the first 3-second polling interval elapsed when the agent started working.

Changes

  • Immediate fetch on polling start: Call fetchSnapshots() when agentState === 'working' to populate snapshots without delay
  • Retain final fetch on stop: Keep existing behavior to capture last screenshot when agent finishes
if (agentState === 'working') {
  startPolling(taskId);
  // Fetch immediately when polling starts to show snapshots without delay
  fetchSnapshots();
} else {
  stopPolling();
  // Do a final fetch when the agent finishes to capture the last screenshot
  fetchSnapshots();
}

Polling continues every 3 seconds while agent is working.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: a7m-1st <108264625+a7m-1st@users.noreply.github.com>
Copilot AI changed the title [WIP] Merge changes based on review feedback for PR #2 Add immediate snapshot fetch when polling starts Feb 19, 2026
Copilot AI requested a review from a7m-1st February 19, 2026 12:00
@a7m-1st a7m-1st closed this Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants