-
Notifications
You must be signed in to change notification settings - Fork 1
#VFB-226 - Query flow refactoring and connect top-right corner button to the queries #200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b9f9a60f4b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b9f9a60f4b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…prove response formatting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a0ac86cbd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } catch (error) { | ||
| store.dispatch(getQueriesFailure(error.message, short_form)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clear loading state on query fetch errors
In the new getQueries flow, the catch path only dispatches GET_QUERIES_FAILURE. The reducer’s failure handler doesn’t reset isLoading, so any thrown error (e.g., network outage or invalid JSON) leaves state.queries.isLoading stuck true, and the query UI spinner never clears. Consider dispatching a completion action here or updating the failure reducer to set isLoading: false so error paths unwind correctly.
Useful? React with 👍 / 👎.
This pull request introduces several improvements to how queries are managed and displayed in the Virtual Fly Brain application. The main focus is on better validation and error handling in the backend, optimizing query data fetching and caching in the frontend, and enhancing the user interface to make query access more intuitive and responsive.
Backend improvements:
query_typeparameter in therun_queryfunction inqueries.py, ensuring that it is provided and valid; an informative error is raised if not.run_query, raising a clear error message instead of returning a result.Frontend data handling and caching:
get_queriesinquery.jsto return only the necessaryqueriesarray andname, minimizing the response payload.getQueriesaction inqueries.jsto check for cached instance data before making network calls, reducing unnecessary requests and improving performance.QueriesReducerto store queries as objects keyed by query name, ensuring efficient updates and lookups.User interface enhancements:
Headercomponent to display a "Queries" button only when relevant queries are available for the focused instance, and to handle loading queries on demand when the button is clicked. [1] [2] [3]