Skip to content

#VFB-228 - Fix loading scene from URL (load instances correctly with id on focus) and fix Slice Viewer Behavior.#210

Open
jrmartin wants to merge 13 commits intodevelopmentfrom
feature/VFB-228
Open

#VFB-228 - Fix loading scene from URL (load instances correctly with id on focus) and fix Slice Viewer Behavior.#210
jrmartin wants to merge 13 commits intodevelopmentfrom
feature/VFB-228

Conversation

@jrmartin
Copy link
Collaborator

@jrmartin jrmartin commented Feb 5, 2026

Test:
Url to Test on Dev

Fix:

  1. Cropped slice viewer after loading page
  2. id= used as query param in url to load application is not being set as focused instance.
  3. 3D Canvas zooms out to equivalent view of clicking Home Screen button from controls, after all instances are loaded from URL.
  4. Fix issue processing adding and loading on term info instances from slice viewer, using Shift and Ctrl respective.

Copilot Summary:
This pull request implements significant improvements to the bulk loading of instances from URLs and enhances the user experience during initial loading in the Virtual Fly Brain application. The changes ensure that the application correctly manages state and UI feedback when instances are loaded from URL parameters, prevents premature URL updates during loading, and improves the handling and ordering of instances for rendering and selection.

Key changes include:

Bulk Loading from URL & State Management:

  • Introduced a new isLoadingFromUrl state in the InstancesReducer to track when instances are being loaded from URL parameters, and added actions and reducers to set and clear this state. This prevents the application from updating the URL while the initial load is in progress, ensuring a smoother user experience. [1] [2] [3] [4] [5] [6] [7]
  • Updated the urlUpdaterMiddleware to use the new isLoadingFromUrl flag, blocking URL updates during the initial load and clearing the flag after a short delay once loading is complete. [1] [2] [3]

Instance Loading & UI Feedback:

  • Added debouncing and progress tracking for instance processing in StackViewerComponent, including a loading indicator and prevention of parallel rendering issues. This improves responsiveness and gives users clear feedback during loading. [1] [2] [3] [4] [5]
  • Ensured that instances are sorted so that templates are always processed first, which is critical for correct selection behavior and visual consistency.

3D Canvas Auto-Zoom Enhancement:

  • Implemented auto-zooming in ThreeDCanvas when all instances from the URL have finished loading, focusing and selecting the relevant instance and zooming to all visible instances, or resetting the camera if none are visible.

Miscellaneous Improvements:

  • Improved buffer and text update logic to prevent UI artifacts when stacks are empty or during loading.
  • Updated URL updater logic to prioritize the id parameter for focus and selection, ensuring correct behavior when multiple IDs are present in the URL.

These changes collectively make the application more robust when handling deep links and improve the initial user experience by managing loading states and UI feedback more effectively.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request enhances the Virtual Fly Brain application's handling of bulk instance loading from URL parameters and improves the user experience during initial loading. The changes introduce state management to prevent premature URL updates during loading, add UI feedback mechanisms, ensure proper instance ordering for correct selection behavior, and implement auto-zoom functionality when loading completes.

Changes:

  • Added isLoadingFromUrl state flag to track URL-based loading and prevent URL updates during initial load
  • Implemented debouncing and progress tracking for instance rendering with loading indicators
  • Added auto-zoom functionality that triggers when all URL-based instances finish loading
  • Fixed instance sorting to ensure templates are processed first for correct click selection behavior

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
urlUpdaterMiddleware.js Adds URL loading state management, prioritizes id parameter for focus, blocks URL updates during initial load, and clears loading state with delay after bulk load completion
getInstancesTypes.js Defines new action type CLEAR_URL_LOADING_STATE for clearing the URL loading flag
instances.js Extends setBulkLoadingCount to accept isFromUrl parameter and adds clearUrlLoadingState action creator
InstancesReducer.js Adds isLoadingFromUrl state field, handles new action types, and sets bulkLoadComplete flag in ADD_INSTANCE events
ThreeDCanvas.jsx Implements auto-zoom logic that reads pending focus from URL, applies focus/select, and zooms to visible instances when bulk loading completes
StackViewerComponent.jsx Adds instance update debouncing, loading indicator text, instance sorting to prioritize templates, improves buffer text condition check, and adds timeout cleanup

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

walrus51 added 3 commits February 4, 2026 20:15
…erComponent; remove unused isBulkLoading state in urlUpdaterMiddleware
…mponent; update camera reset logic in ThreeDCanvas; enhance URL handling in urlUpdaterMiddleware
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…ponent; improve camera reset logic in ThreeDCanvas; update URL handling in urlUpdaterMiddleware
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…ic in ThreeDCanvas; update URL loading state management in urlUpdaterMiddleware; improve status text handling in StackViewerComponent
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

walrus51 added 3 commits February 5, 2026 13:29
…nent; remove redundant URL loading state management in urlUpdaterMiddleware
@jrmartin jrmartin requested review from ddelpiano February 5, 2026 23:29
@jrmartin jrmartin marked this pull request as ready for review February 5, 2026 23:29
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: b822be8aaa

ℹ️ 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".

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.

1 participant