feat(WorkListUINext): New Study List (WorkListUINext)#6005
Conversation
Between 3 and 9
|
I'd really like to see a few customization examples for simple things like adding columns/re-ordering them, replacing the about box, but also thinking about how to use the worklistuinext with a different layout, but the same fetch/retrieve/thumbnail type logic. |
There was a problem hiding this comment.
I have two defects created:
#6029
#6028
I’m not sure if this is expected behavior or by design.
- When all columns are unselected from the column multiselect list, the study list page displays as empty. A default column set or validation should prevent the page from rendering without any visible columns.
- The column widths are not resizable.
- When a row is selected, closing the default workflow mode in the preview panel also disables the default mode in the settings.
Testing environment:
npx envinfo --system --browsers
System:
OS: Windows 11 10.0.26200
CPU: (8) x64 Intel(R) Core(TM) Ultra 5 226V
Memory: 3.90 GB / 15.67 GB
Browsers:
Chrome: 148.0.7778.168
Edge: Spartan (24.13.1), Chromium (24.13.1), ChromiumDev (24.13.1)
npm notice
npm notice New minor version of npm available! 11.8.0 -> 11.14.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.14.1
npm notice To update run: npm install -g npm@11.14.1
npm notice
…he connection and stall later viewer navigation.
…/OHIF-1534-studylist
Add customization to switch between the two.
@wayfarer3130 I believe I have addressed most, if not all, of the customization improvement you have suggested. Note that when we first set out to replace the previous WorkList we agreed to minimize the customization changes. So I think what we have here thus far is more than sufficient. Let me know what you think. |
…try loop, and add Retry action to the connection-error modal.
|
@greptileai I believe even your comments outside diff have been addressed. |
|
You're right — the fix is in place. The |
Context
This PR replaces the legacy
WorkListstudy-list route with a newWorkListUINextroute, built on a freshui-nextstudy-list system (StudyList,DataTable,PreviewContainer,PreviewPatientSummary, etc.). The legacyWorkListremains importable for fallback, but/now resolves toWorkListUINextby default. The change set spans 138 commits and ~5,600 lines added.Key drivers:
sessionStoragevia the newuseStudyListStateSynchook.DataSourceWrappersimplified to client-side pagination — one server query per filter change instead of per page change.thumbnailRequestStrategy(bulkDataRetrievedefault, orfetch) and a series-level QIDO fallback for thumbnail fetching.workListUINext.previewSeriesViewcustomization ('all' | 'thumbnails' | 'list') with documentation.Changes & Results
Basics
Workflows/modes
Preview side panel
1. Routing (
platform/app/src/routes/index.tsx)/route now rendersWorkListUINextviaDataSourceWrapper.WorkListimport is retained and commented as a swap-in alternative.2.
DataSourceWrapper(platform/app/src/routes/DataSourceWrapper.tsx)appConfig.queryLimit ?? 101) instead of refetching on every page/offset change.WorkListUINextviauseStudyListStateSync.hasFetchedOnceflag is plumbed through to the layout so the worklist can suppress the empty state until the first query resolves; it resets on data-source change and ononRefresh.pageNumber/resultsPerPage/offset/locationshape is dropped from internal state, along with theareLocationsTheSameheuristic, replaced by aqueryFilterValuesdeep-equality check (areQueryFiltersEqual) that handles array filters likemodalitiesInStudy.defaultDataSourceNamenow reads fromuseAppConfig()rather thanwindow.configdirectly.3. WorkListUINext route (
platform/app/src/routes/WorkListUINext/)WorkListUINext.tsxanduseWorkListToolbarActions.tsx.datasourcesquery param is preserved across navigation.4. Study list state sync (
platform/app/src/hooks/useStudyListStateSync.ts)sessionStorageis the fallback.5. ui-next StudyList system (
platform/ui-next/src/components/StudyList/)Layout,Table,PreviewContainer,PreviewContent,PreviewPatientSummary,PreviewSeriesList,PreviewToggleButton,SettingsPopover,WorkflowsProvider,WorkflowMenu.useDefaultWorkflow.defaultColumns,formatStudyDate,tokenizeModalities.6. ui-next primitives
DataTablecompound component (ColumnHeader,FilterRow,Pagination,Toolbar,ViewOptions,ActionOverlayCell).InputMultiSelect,Badge, and genericTablecomponents.DateRangeis expanded with placeholder editing and is sized to match other filters.Thumbnailis refined with blob-URL revoke on error and a viewport query param for quality.Iconsare added:OHIFLogoHorizontal,PanelRight,PatientStudyList,SeriesPlaceholder,SettingsStudyList,SortingNew/Ascending/Descending,CloudSettings.7. DICOMWeb data source (
extensions/default/src/DicomWebDataSource/index.ts)thumbnailRequestStrategy(bulkDataRetrievedefault, orfetch).getGetThumbnailSrcnow accepts aThumbnailContextand falls back to a single QIDOinstances?limit=1query when a series-level fetch fails.dicom-web.md.8. Customization
workListUINext.previewSeriesView('all' | 'thumbnails' | 'list') is registered viagetCustomizationModule.tsx.'list'when the data source useswadors/thumbnailDirectrendering orbulkDataRetrieveretrieval.WorkListUINext.md.9. Misc
DataSourceConfigurationComponent.tsx).DataTableare added.10. Removed
OHIFStudyList.spec.jsis removed.tests/Worklist.spec.tsis removed (no longer applicable to the new study list).Testing
1. Smoke test
/loads the newWorkListUINextagainst the default data source.2. State sync
/(no params); sessionStorage state should restore until tab close.3.
DataSourceWrapperrefetch behaviorappConfig.queryLimitto a small value (e.g. 25) and confirm only that many studies come back.4. Preview panel
workListUINext.previewSeriesViewcustomization values ('all','thumbnails','list') hide/lock the toggle as documented.5. Thumbnail strategies
wadorssource (e.g.local_orthanc,local_dcm4chee) and confirm the preview is forced to list view.thumbnail/renderedsource verify bothbulkDataRetrieveandfetchstrategies render thumbnails.limit=1lookup without crashing.6. Workflow buttons & default mode
7. Toolbar/extras
8. Pagination persistence
a292d59f7a).9. Legacy fallback
routes/index.tsxback toWorkListand confirm the legacy view still renders.Checklist
PR
semantic-release format and guidelines.
Code
etc.)
Public Documentation Updates
additions or removals.
Tested Environment
System:
Binaries:
Browsers:
Greptile Summary
This PR replaces the legacy
WorkListstudy-list route with a newWorkListbuilt on theui-nextcomponent system, adding a resizable preview panel, URL+sessionStorage state sync, client-side pagination, per-data-source thumbnail strategies with abort support, and a newworkList.*customization namespace. The legacy route is preserved asLegacyWorkListand can be re-activated withworkList.variant: 'legacy'.finallyblock; thepatientNameURL key mismatch is eliminated by the newstudyListFilterContract.ts; andDEFAULT_DATAis now correctly defined at module scope.DataSourceWrappernow fires exactly one server query per distinct filter change, compares filters withshallowEqualIgnoringArrayOrder, and surfaces a Retry button on failure.thumbnailRequestStrategy: 'fetch'path inDicomWebDataSourcewiresAbortSignalthrough to nativefetch, with a QIDOlimit=1fallback when a series-level thumbnail request fails.Confidence Score: 5/5
Safe to merge — the three blocking issues from prior reviews are all addressed and no new blocking issues were found.
The error-handling, URL key, and DEFAULT_DATA fixes are all correct and well-structured. The new studyListFilterContract.ts ensures both the URL writer and reader stay in sync. The only findings in the current diff are minor: a duplicate-value edge case in shallowEqualIgnoringArrayOrder and a UX discoverability note about thumbnail view being off by default for bulkDataRetrieve data sources.
No files require special attention for merge safety. Integrators enabling the preview panel with an existing thumbnailRendering: thumbnail config should note they also need thumbnailRequestStrategy: fetch to see thumbnail view.
Important Files Changed
Comments Outside Diff (2)
platform/app/src/routes/DataSourceWrapper.tsx, line 141-155 (link)getData()setsisLoading = trueon entry but only callssetIsLoading(false)on the happy-path completion. WhendataSource.query.studies.search()throws, the.catch()handler logs the error or shows a modal but never resetsisLoading. BecauseisDataInvalidis guarded by!isLoading, every subsequent location/filter change will be ignored — no further queries fire until the page is reloaded.The new
!hasFetchedOncecondition inshowStudyListLoadingmakes this worse: after a failed first fetch both the loading spinner and the empty-state are suppressed indefinitely, leaving users with a blank, unresponsive worklist.Prompt To Fix With AI
platform/app/src/routes/DataSourceWrapper.tsx, line 141-156 (link)getData()callssetIsLoading(true)on entry but only callssetIsLoading(false)on the happy path. IfdataSource.query.studies.search()throws, the.catch()error handler shows a modal but never resets the flag. BecauseisDataInvalid = !isLoading && filtersChanged, the wrapper refuses to fire any further query onceisLoadingis stuck attrue. Combined with!hasFetchedOnceremainingfalse, both the loading spinner and the empty state are suppressed indefinitely after a failed first fetch, leaving users with a blank, unresponsive worklist until they reload the page.Prompt To Fix With AI
Prompt To Fix All With AI
Reviews (17): Last reviewed commit: "Deselect rows that are no longer on the ..." | Re-trigger Greptile