Skip to content

#VFB-226 - Query flow refactoring and connect top-right corner button to the queries#200

Merged
ddelpiano merged 6 commits intodevelopmentfrom
feature/VFB-226
Jan 27, 2026
Merged

#VFB-226 - Query flow refactoring and connect top-right corner button to the queries#200
ddelpiano merged 6 commits intodevelopmentfrom
feature/VFB-226

Conversation

@jrmartin
Copy link
Collaborator

@jrmartin jrmartin commented Jan 13, 2026

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:

  • Added validation for the query_type parameter in the run_query function in queries.py, ensuring that it is provided and valid; an informative error is raised if not.
  • Improved error handling for unknown query types in run_query, raising a clear error message instead of returning a result.

Frontend data handling and caching:

  • Updated get_queries in query.js to return only the necessary queries array and name, minimizing the response payload.
  • Enhanced the getQueries action in queries.js to check for cached instance data before making network calls, reducing unnecessary requests and improving performance.
  • Refactored the QueriesReducer to store queries as objects keyed by query name, ensuring efficient updates and lookups.

User interface enhancements:

  • Updated the Header component 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]

@jrmartin jrmartin changed the title #VFB-226 - Enhance query validation and improve query handling in fro… #VFB-226 - Enhance query validation and improve query handling in frontend components Jan 13, 2026
@jrmartin jrmartin marked this pull request as draft January 13, 2026 17:13
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

@jrmartin jrmartin requested a review from ddelpiano January 15, 2026 00:16
@jrmartin jrmartin changed the title #VFB-226 - Enhance query validation and improve query handling in frontend components #VFB-226 - Query flow refactoring and connect top-right corner button to the queries Jan 15, 2026
@jrmartin jrmartin marked this pull request as ready for review January 15, 2026 00:19
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

@ddelpiano
Copy link
Member

@jrmartin the tests are failing https://github.com/MetaCell/virtual-fly-brain/actions/runs/21014810759/job/60417639375?pr=200 , could you please fix these before I start reviewing it please? thanks

walrus51 added 2 commits January 23, 2026 10:22
…ect on failure, preventing test and client errors when invalid or missing query types are requested. This is needed because stricter query_type validation was introduced in this PR, which can now trigger exceptions that must be handled consistently.
…ES_FAILURE to maintain consistent loading state management
@jrmartin
Copy link
Collaborator Author

@ddelpiano Fixed now

Copy link
Member

@ddelpiano ddelpiano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ddelpiano ddelpiano merged commit 27e544f into development Jan 27, 2026
2 checks passed
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