#VFB-241- feat: implement misalignment handling in TerminfoSlider com…#224
#VFB-241- feat: implement misalignment handling in TerminfoSlider com…#224ddelpiano merged 2 commits intodevelopmentfrom
Conversation
There was a problem hiding this comment.
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
setAlignTemplatespayload 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.
…gement in TerminfoSlider component
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
💡 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".
The merge-base changed after approval.
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:
setAlignTemplatesaction now receives and stores both anidand atemplateID, and the reducer logic has been updated to use these values appropriately. [1] [2] [3] [4]useEffectinTerminfoSlider.jsxto 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:
clearUrlLoadingStateaction 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]InstancesReducerto reset bothisLoadingFromUrlandisLoadingflags when clearing URL loading state, ensuring that loading indicators are properly cleared.Component State and Selector Updates:
TerminfoSlider.jsx, added selectors formisalignedTemplate,alignedTemplates, andmisalignedIDsfrom 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.