Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 4, 2025

Summary

Fixed

  • isPerforming for observable queries now starts as true and transitions to false when data arrives, enabling loading states on slow connections

Changed initial state in useObservableQuery from QueryResultWithState.empty() to QueryResultWithState.initial(). The initial() method already existed with isPerforming: true.

// Now you can show loading UI while waiting for WebSocket data
const [result] = useObservableQuery(MyQuery);

if (result.isPerforming) {
  return <Spinner />;
}
return <DataView data={result.data} />;

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • example.com
    • Triggering command: /usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/Arc/Arc/node_modules/vitest/vitest.mjs run (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Fix isPerforming for observable query in React to set it to true as default value and false when it starts receiving data.</issue_title>
<issue_description>On slow connections you could have a period from initiating the query till the first messages comes back over WebSockets. For this time it would be good to be able to show a spinner / skeleton while waiting.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 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.

Copilot AI changed the title [WIP] Fix isPerforming for observable query in React Fix isPerforming for observable query in React to set it to true as default value Dec 4, 2025
Copilot AI requested a review from einari December 4, 2025 08:36
@github-actions
Copy link

github-actions bot commented Dec 4, 2025

@einari einari changed the base branch from main to 18.2.0 December 4, 2025 14:20
@einari einari marked this pull request as ready for review December 4, 2025 14:20
@einari einari merged commit 8f028c5 into 18.2.0 Dec 4, 2025
21 of 23 checks passed
@einari einari deleted the copilot/fix-isperforming-default-value branch December 4, 2025 14:21
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.

Fix isPerforming for observable query in React to set it to true as default value and false when it starts receiving data.

2 participants