Update to use beta 5.0 of CS3D#5904
Open
wayfarer3130 wants to merge 32 commits into
Open
Conversation
✅ Deploy Preview for ohif-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Viewers
|
||||||||||||||||||||||||||||
| Project |
Viewers
|
| Branch Review |
feat/use-beta-5.0-cs3d
|
| Run status |
|
| Run duration | 02m 16s |
| Commit |
|
| Committer | Bill Wallace |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
37
|
| View all changes introduced in this branch ↗︎ | |
… total tests to 10. Replace the JSON reporter with the HTML reporter.
Contributor
Author
|
The PR: cornerstonejs/cornerstone3D#2735 demonstrates that this branch work successfully with origin/beta as well as this version (well, origin/beta as it will be as soon as the next merge from origin/main passes) |
wayfarer3130
commented
May 15, 2026
|
|
||
| initWADOImageLoader(userAuthenticationService, appConfig, extensionManager); | ||
|
|
||
| // Add OHIF metadata providers after dicomImageLoader.init(). |
Contributor
Author
There was a problem hiding this comment.
This works fine against origin/main as well as against beta, but it is reuqired for beta.
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
Changes & Results
Testing
Checklist
PR
semantic-release format and guidelines.
Code
etc.)
Public Documentation Updates
additions or removals.
Tested Environment
Greptile Summary
This PR upgrades the codebase to CS3D beta 5.0, adjusting metadata provider registration order (providers must be added after
initWADOImageLoaderbecause the new linked-metadata branch clears them during loader init), fixing Jest module resolution for@cornerstonejs/calculate-suv, and tightening watch/symlink config for local CS3D development.init.tsx): providers are now registered afterinitWADOImageLoader; howevergenericMetadataProvider.getis still passed without.bind()unlike the two adjacent providers.isEqualutility (platform/core/src/utils/isEqual.js): re-exportsutilities.isEqualfrom@cornerstonejs/core, but@cornerstonejs/coreis not declared inplatform/core/package.jsonand the property is accessed at module evaluation time, so a missing or changed package silently exportsundefined.rsbuild.config.ts,webpack.pwa.js): watch options are flipped to track@cornerstonejssymlinks;lazyCompilation: falseis added unconditionally to rsbuild, affecting all developers.Confidence Score: 3/5
Not ready to merge — the new
isEqual.jsutility introduces an undeclared@cornerstonejs/coredependency insideplatform/corethat will cause build/test failures, and the missing.bind()ongenericMetadataProvider.getininit.tsxcan silently break metadata retrieval at runtime.Two independent defects are present on critical paths: the undeclared
@cornerstonejs/coreimport inplatform/core/src/utils/isEqual.jswill produce a module-not-found error in any build or test that touches that module, and the missing.bind()ininit.tsxcan cause silent metadata-retrieval failures at runtime.platform/core/src/utils/isEqual.js(undeclared dependency, property access at eval time) andextensions/cornerstone/src/init.tsx(missing.bind()ongenericMetadataProvider.get).Important Files Changed
utilities.isEqualfrom@cornerstonejs/core; imports cornerstone in platform/core (architectural coupling) and evaluates the property at module load time, so the export silently becomesundefinedif the property is absent.initWADOImageLoader;genericMetadataProvider.getis added without.bind(), unlike the two adjacent providers — an existing flagged issue still present in this diff.lazyCompilation: falseglobally and flips watchOptions to follow @cornerstonejs symlinks; disabling lazy compilation affects all developers' dev-server startup time.-ron theplaywright-reportdirectory instead of a single JSON file, matching the reporter change in playwright.config.ts.isEqualutility; inherits the dependency and property-access-at-eval concerns from isEqual.js.Comments Outside Diff (2)
tests/mpr2.spec.ts, line 3 (link)Missing
visitStudyRenderedimport causes ReferenceErrorThe import still pulls in
visitStudy(which is no longer called), butvisitStudyRendered— which is called inbeforeEach— is never imported. This will throwReferenceError: visitStudyRendered is not definedat runtime and fail every test in this file.tests/DicomTagBrowser.spec.ts, line 26 (link)Stale
waitForVolumeLoadcalls will failwaitForVolumeLoadwas renamed towaitForViewportsRenderedinMainToolbarPageObject.ts, but this file still calls the old name at lines 26, 43, 97, and 122. The PR only updated line 61 (one of five call sites). All four remaining calls will throwTypeError: mainToolbarPageObject.waitForVolumeLoad is not a functionand fail every affected test.tests/mpr2.spec.ts, line 1 (link)visitStudyRenderedcalled but never importedThe import on line 1 still pulls in
visitStudy(which is no longer called), butvisitStudyRendered— called inbeforeEach— is absent from the import. Every test in this file will fail withReferenceError: visitStudyRendered is not definedat runtime.tests/DicomTagBrowser.spec.ts, line 26 (link)Stale
waitForVolumeLoadcalls remain at four siteswaitForVolumeLoadwas renamed towaitForViewportsRenderedinMainToolbarPageObject.ts, but lines 26, 43, 97, and 122 of this file still call the old name. Only line 61 was updated in this PR. All four remaining call sites will throwTypeError: mainToolbarPageObject.waitForVolumeLoad is not a functionand fail every affected test.Affected lines: 26, 43, 97, 122 — e.g. line 26:
tests/DicomTagBrowser.spec.ts, line 26 (link)Stale
waitForVolumeLoadcalls at four remaining siteswaitForVolumeLoadwas renamed towaitForViewportsRenderedinMainToolbarPageObject.ts, but this file still calls the old name at lines 26, 43, 97, and 122. Only line 61 was updated in this PR. All four remaining call sites will throwTypeError: mainToolbarPageObject.waitForVolumeLoad is not a functionand fail every affected test.tests/mpr2.spec.ts, line 14 (link)Stale
waitForVolumeLoadcallwaitForVolumeLoadwas renamed towaitForViewportsRenderedinMainToolbarPageObject.tsby this PR, but line 14 of this file still calls the old name. Every test in this file will throwTypeError: mainToolbarPageObject.waitForVolumeLoad is not a function.tests/DicomTagBrowser.spec.ts, line 26 (link)Stale
waitForVolumeLoadcalls remain unfixedwaitForVolumeLoadwas renamed towaitForViewportsRenderedinMainToolbarPageObject.tsby this PR. Line 61 was updated, but lines 26, 43, 97, and 122 still call the old name and will throwTypeError: mainToolbarPageObject.waitForVolumeLoad is not a function, failing every affected test.extensions/default/src/init.ts, line 2 (link)@cornerstonejs/metadatanot declared as a dependency@cornerstonejs/metadatais imported here forcalculateSUVScalingFactors, but this package appears in neitherpackage.jsonnorbun.lock. The same undeclared import is used inplatform/core/src/classes/MetadataProvider.tsandplatform/core/src/utils/imageIdToURI.js. Any build or test that touches these modules will fail with a module-not-found error until the package is added as a dependency and the lockfile is updated.platform/core/src/utils/imageIdToURI.js, line 3 (link)imageIdToURImay silently exportundefinedutilities.imageIdToURIis accessed as a property of the imported object at module evaluation time. If@cornerstonejs/metadatais not yet installed (it is absent from everypackage.jsonandbun.lockin this repo) or if a future version of that package moves the function offutilities, the default export resolves toundefined. Every caller that then invokesimageIdToURI(id)will throwTypeError: imageIdToURI is not a function— a silent, hard-to-diagnose failure compared to the previous self-contained implementation.The missing-dependency problem (
@cornerstonejs/metadatanot declared inplatform/core/package.jsonorextensions/default/package.json) must be resolved first; without it the module cannot be loaded at all.platform/core/src/utils/imageIdToURI.js, line 1-3 (link)@cornerstonejs/metadataundeclared dependency@cornerstonejs/metadatais imported here (and inMetadataProvider.tsandextensions/default/src/init.ts), but it does not appear in anypackage.jsonin this repo, nor inbun.lock. Any build or test that touches these modules will fail with a module-not-found error. Additionally,utilities.imageIdToURIis accessed as a property at module evaluation time, so if the package is absent or moves the function offutilities, every call-site receivesTypeError: imageIdToURI is not a functionrather than a clear import error.extensions/default/src/init.ts, line 2 (link)calculateSUVScalingFactorsmoved to undeclared packagecalculateSUVScalingFactorsis now imported from@cornerstonejs/metadata, which is not listed inextensions/default/package.jsonor any otherpackage.jsonin the repo. While@cornerstonejs/calculate-suv(the previous source) remains a declared dependency, the runtime import will fail until@cornerstonejs/metadatais properly added to the dependency tree and lockfile.platform/core/src/utils/imageIdToURI.js, line 1-3 (link)@cornerstonejs/metadataundeclared in all affected packages@cornerstonejs/metadatais imported in three files (platform/core/src/utils/imageIdToURI.js,platform/core/src/classes/MetadataProvider.ts, andextensions/default/src/init.ts) but does not appear in anypackage.jsonin the repo (checkedplatform/core,extensions/default, and the root). Any build or test that resolves these modules will fail with a module-not-found error. Additionally, becauseimageIdToURI.jsexportsutilities.imageIdToURIas a property access at evaluation time, a missing or changed package causes every caller to receiveTypeError: imageIdToURI is not a functionrather than a clear import error.platform/core/src/logger.ts, line 1 (link)@cornerstonejs/utilsundeclared inplatform/core@cornerstonejs/utilsis imported here but does not appear inplatform/core/package.json, the rootpackage.json, or either lock file (bun.lock/yarn.lock). Any build or test that resolves this module will fail with a module-not-found error. Please add@cornerstonejs/utilstoplatform/core/package.json(and run the installer to update the lock file) before merging.extensions/cornerstone/src/init.tsx, line 194 (link)genericMetadataProvider.getpassed without.bind()The two other providers on lines 195–200 both use
.bind()to preserve the correctthiscontext whenmetaDatacalls the function.genericMetadataProvider.getis passed as a bare method reference, so if it accessesthisinternally it will receiveundefined(strict mode) or the global object, causing silent data-retrieval failures at runtime.platform/core/src/utils/toNumber.js, line 1-4 (link)utilities.toNumberis accessed as a property of the imported namespace at module evaluation time. If@cornerstonejs/metadatais absent (it is not declared in anypackage.jsonin this repo) or if a future version movestoNumberoffutilities, the default export silently becomesundefined. Every call-site then throwsTypeError: toNumber is not a functioninstead of a clear import error — the same fragile pattern already flagged forimageIdToURI.js. The undeclared dependency must be added topackage.jsonbefore this is safe to use, and a named import would give a build-time error rather than a silentundefined.extensions/cornerstone/src/init.tsx, line 194 (link)The two adjacent providers both use
.bind()to preserve the correctthiscontext whenmetaDatainvokes the callback.genericMetadataProvider.getis passed as a bare method reference, so if the method readsthisinternally it will receiveundefinedin strict mode or the global object, causing silent metadata-retrieval failures at runtime.platform/core/src/utils/isEqual.js, line 2 (link)@cornerstonejs/utilsnot declared inplatform/core@cornerstonejs/utilsis imported here but is absent fromplatform/core/package.json(neither independenciesnorpeerDependencies). This is the same undeclared-dependency pattern already flagged forplatform/core/src/logger.ts. Any build or test that resolves this module will fail with a module-not-found error until@cornerstonejs/utilsis added toplatform/core/package.jsonand the lockfile is updated.platform/core/src/utils/isEqual.js, line 5-7 (link)@cornerstonejs/coreintroduced as a dependency ofplatform/core@cornerstonejs/coreis not listed inplatform/core/package.json, so this import will fail at build or test time with a module-not-found error. Beyond the missing declaration, placing a Cornerstone dependency insideplatform/corecouples the framework-agnostic core to a specific rendering library — the JSDoc comment in this very file acknowledges this pattern should be avoided ("Prefer importingutilitiesfrom@cornerstonejs/corein extension code"). Additionally,utilities.isEqualis accessed as a property at module evaluation time: if the property is absent on the exported object the default export silently becomesundefined, and every caller throwsTypeError: isEqual is not a functionrather than a clear import error.Prompt To Fix All With AI
Reviews (21): Last reviewed commit: "Fixing build issues" | Re-trigger Greptile