Skip to content

#VFB-241- feat: implement misalignment handling in TerminfoSlider com…#224

Merged
ddelpiano merged 2 commits intodevelopmentfrom
feature/VFB-241
Apr 27, 2026
Merged

#VFB-241- feat: implement misalignment handling in TerminfoSlider com…#224
ddelpiano merged 2 commits intodevelopmentfrom
feature/VFB-241

Conversation

@jrmartin
Copy link
Copy Markdown
Collaborator

@jrmartin jrmartin commented Apr 24, 2026

This pull request address VFB-241; Load VFB_00058382 does not show up with the default template but the term info data are received. The modal that pops up for template misalignment was moved from Layout -> TermInfoSlider recently, and some changes to flow were needed to show the modal with template misalignments

Template Alignment and Misalignment Handling:

  • Updated the global reducer and related actions to correctly track both the aligned template and misaligned IDs, ensuring that the UI can accurately display when an image is aligned to a different template. The setAlignTemplates action now receives and stores both an id and a templateID, and the reducer logic has been updated to use these values appropriately. [1] [2] [3] [4]
  • Added a new useEffect in TerminfoSlider.jsx to automatically display a confirmation modal when a misaligned template is detected, improving user awareness and workflow for handling misaligned images.

Redux Action and State Management Improvements:

  • Modified the clearUrlLoadingState action to directly dispatch its action using the Redux store, simplifying its usage throughout the codebase and ensuring consistent state updates. All invocations of this action have been updated accordingly. [1] [2] [3]
  • Enhanced the InstancesReducer to reset both isLoadingFromUrl and isLoading flags when clearing URL loading state, ensuring that loading indicators are properly cleared.

Component State and Selector Updates:

  • In TerminfoSlider.jsx, added selectors for misalignedTemplate, alignedTemplates, and misalignedIDs from the Redux store, enabling the component to respond dynamically to changes in alignment state.

These changes collectively improve the robustness and user experience of template alignment handling in the application.

Copy link
Copy Markdown
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 PR aims to improve handling of “misaligned” images/templates by surfacing a confirmation modal in TerminfoSlider, updating global misalignment state shape, and adjusting URL-loading state behavior.

Changes:

  • Adds Redux-driven misalignment modal behavior to TerminfoSlider.
  • Changes setAlignTemplates payload shape to include both an instance id and a template id, and updates the reducer accordingly.
  • Alters URL-loading state clearing and loading indicator behavior across middleware/reducers/components.

Reviewed changes

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

Show a summary per file
File Description
applications/virtual-fly-brain/frontend/src/shared/subHeader/index.jsx Mirrors Redux loading state into local state for the loading indicator
applications/virtual-fly-brain/frontend/src/reducers/middleware/urlUpdaterMiddleware.js Updates URL-load flow and dispatches misalignment state when alignment fails
applications/virtual-fly-brain/frontend/src/reducers/actions/instances.js Changes clearUrlLoadingState from a plain action creator to a store-dispatching helper
applications/virtual-fly-brain/frontend/src/reducers/actions/globals.js Changes setAlignTemplates signature/payload shape
applications/virtual-fly-brain/frontend/src/reducers/InstancesReducer.js Ensures isLoading is cleared when URL-loading state is cleared
applications/virtual-fly-brain/frontend/src/reducers/GlobalReducer.js Adjusts misalignment state handling to use the updated payload shape
applications/virtual-fly-brain/frontend/src/components/TermInfo/TerminfoSlider.jsx Opens a modal when misalignment is detected and attempts to open the aligned template in a new tab

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

Comment thread applications/virtual-fly-brain/frontend/src/reducers/GlobalReducer.js Outdated
Comment thread applications/virtual-fly-brain/frontend/src/shared/subHeader/index.jsx Outdated
Copy link
Copy Markdown
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 no new comments.


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

@jrmartin jrmartin requested a review from ddelpiano April 24, 2026 01:16
@jrmartin jrmartin marked this pull request as ready for review April 24, 2026 01:16
Copy link
Copy Markdown

@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: 4429ad185f

ℹ️ 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
ddelpiano previously approved these changes Apr 27, 2026
Copy link
Copy Markdown
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

@jrmartin jrmartin dismissed ddelpiano’s stale review April 27, 2026 13:47

The merge-base changed after approval.

@ddelpiano ddelpiano merged commit 60907cb into development Apr 27, 2026
6 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.

3 participants