fix(defaultRouteInit): defer prior fetches and guard study browser thumbnails#5971
Open
nutzlastfan wants to merge 4 commits into
Open
Conversation
✅ Deploy Preview for ohif-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
This ports a downstream loading fix that improves the first hanging-protocol application while still pulling prior studies in the background.
The downstream issue had two parts:
Changes
DicomMetadataStoreinstead of assuming a fresh entry every timeResult
Notes
defaultRouteInithas been evolving quickly on upstream and I expect architecture-level feedback on the prefetch timing.Greptile Summary
This PR restructures
defaultRouteInitto separate active-study metadata retrieval from patient-history/prior-study fetching, deferring prior retrieves until after the first HP application, and adds defensive null guards togetImageIdForThumbnailfor display sets that have no image IDs (SR/SEG/RT). The Study Browser guard is clean. ThedefaultRouteInitrefactor is directionally correct but has two P2 concerns around prior-study filter leakage and missing cleanup on navigation.Confidence Score: 4/5
Safe to merge with awareness of two P2 concerns; active-study loading and initial HP application are not regressed.
No P0/P1 findings. Two P2 issues: active-study
seriesInstanceUIDfilter leaking into prior-study retrieval (silent suppression of prior series when a series filter is set), and a fire-and-forgetstartPriorFetchesthat lacks a cancellation path on route change.platform/app/src/routes/Mode/defaultRouteInit.ts — specifically
startPriorFetchesand thefiltersforwarded to prior retrieves.Important Files Changed
fetchAndStorePatientStudies,upsertStudyMetadata,collectSeriesPromises, andstartPriorFetchesto defer prior-study fetching after initial HP application; fire-and-forget prior fetches lack cancellation and the active-studyfiltersare forwarded to prior-study retrieval without strippingseriesInstanceUID.imageIds,timePoints, andmiddleTimePointImageIdsingetImageIdForThumbnail; both call sites already handle anundefinedreturn value, so the guards are safe and correct.Prompt To Fix All With AI
Reviews (4): Last reviewed commit: "fix(app): limit URL display-set loading ..." | Re-trigger Greptile