Skip to content

fix: Several new worklist issues - #6130

Merged
wayfarer3130 merged 3 commits into
masterfrom
fix/new-worklist-issues
Jul 10, 2026
Merged

fix: Several new worklist issues#6130
wayfarer3130 merged 3 commits into
masterfrom
fix/new-worklist-issues

Conversation

@wayfarer3130

@wayfarer3130 wayfarer3130 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Context

The previous worklist preferred prefix-matching inputs for the modalities over other matches. That is almost always what a user wants so that if they type "PT" and hit enter, they DONT get "CTPT" as the value selected.
As well, added double-click behaviour so that the row doesn't disappear on a double click, and instead launches the default instance. I believe that had been agreed on but didn't get implemented. Made that customizeable, although I'd prefer to allow a cusotmization that specifies a command instead of a function.

Changes & Results

Testing

Checklist

PR

  • [] My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

  • [] My code has been well-documented (function documentation, inline comments,
    etc.)

Public Documentation Updates

  • [] The documentation page has been updated as necessary for any public API
    additions or removals.

Tested Environment

  • [] OS:
  • [] Node version:
  • [] Browser:

Summary by CodeRabbit

  • New Features
    • Added workList.onStudyDoubleClick customization to control what happens when double-clicking a study row in the default Work List.
    • Double-click can now launch the configured command/workflow, with smart fallback to an applicable default/first workflow when needed.
    • Improved study-row selection and double-click flow so the row is selected before actions run.
    • Added a built-in workflow launcher command (launchDefaultMode) for double-click behavior.
  • Documentation
    • Updated customization samples and descriptions with the new workList.onStudyDoubleClick option and default configuration.

@wayfarer3130
wayfarer3130 requested a review from jbocce July 9, 2026 14:03

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@wayfarer3130
wayfarer3130 temporarily deployed to fork-pr-approval July 9, 2026 14:03 — with GitHub Actions Inactive
@netlify

netlify Bot commented Jul 9, 2026

Copy link
Copy Markdown

Deploy Preview for ohif-dev ready!

Name Link
🔨 Latest commit a7999dc
🔍 Latest deploy log https://app.netlify.com/projects/ohif-dev/deploys/6a5015eccee46e00087eaca5
😎 Deploy Preview https://deploy-preview-6130--ohif-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@cypress

cypress Bot commented Jul 9, 2026

Copy link
Copy Markdown

Viewers    Run #6509

Run Properties:  status check passed Passed #6509  •  git commit a7999dc86d: feat: Run worklist study double-click as a command, registrable by modes
Project Viewers
Branch Review fix/new-worklist-issues
Run status status check passed Passed #6509
Run duration 01m 43s
Commit git commit a7999dc86d: feat: Run worklist study double-click as a command, registrable by modes
Committer Bill Wallace
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 28
View all changes introduced in this branch ↗︎

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: dcdae738-59e1-4536-b42b-1f166f8136c6

📥 Commits

Reviewing files that changed from the base of the PR and between 758b106 and a7999dc.

📒 Files selected for processing (9)
  • extensions/default/src/commandsModule.ts
  • extensions/default/src/customizations/workListCustomization.ts
  • platform/app/src/appInit.js
  • platform/app/src/routes/WorkList/WorkList.tsx
  • platform/app/src/routes/index.tsx
  • platform/core/src/extensions/ExtensionManager.ts
  • platform/docs/docs/platform/services/customization-service/sampleCustomizations.tsx
  • platform/ui-next/src/components/StudyList/components/Table.tsx
  • platform/ui-next/src/components/StudyList/index.ts
🚧 Files skipped from review as they are similar to previous changes (4)
  • platform/ui-next/src/components/StudyList/index.ts
  • platform/ui-next/src/components/StudyList/components/Table.tsx
  • platform/app/src/routes/WorkList/WorkList.tsx
  • platform/docs/docs/platform/services/customization-service/sampleCustomizations.tsx

📝 Walkthrough

Walkthrough

Adds a customizable study-row double-click path for the default WorkList, including command registration, route wiring, StudyList behavior updates, and documentation. Also changes InputMultiSelect filtering so prefix matches are ordered before substring matches.

Changes

Custom study double-click behavior

Layer / File(s) Summary
Customization contract and command support
extensions/default/src/customizations/workListCustomization.ts, extensions/default/src/commandsModule.ts, platform/app/src/appInit.js, platform/core/src/extensions/ExtensionManager.ts, platform/docs/docs/platform/services/customization-service/sampleCustomizations.tsx
Defines workList.onStudyDoubleClick, adds launchDefaultMode, registers mode commands earlier during app init, exposes commands-module registration on ExtensionManager, and documents the customization in samples.
WorkList route wiring
platform/app/src/routes/index.tsx, platform/app/src/routes/WorkList/WorkList.tsx
Passes commandsManager into WorkList, reads the customization, builds the double-click callback, and forwards it to StudyList.Table.
StudyList table behavior
platform/ui-next/src/components/StudyList/components/Table.tsx, platform/ui-next/src/components/StudyList/components/Layout.tsx, platform/ui-next/src/components/StudyList/index.ts
Adds the double-click callback type and prop, forwards it through the table/layout stack, updates selection and double-click handling, and exports the related public types.

Estimated code review effort: 4 (Complex) | ~45 minutes

InputMultiSelect Ranking Fix

Layer / File(s) Summary
Prefix vs substring match ranking
platform/ui-next/src/components/InputMultiSelect/InputMultiSelect.tsx
Filters options so prefix matches appear before substring-only matches.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant TableContent
  participant WorkList
  participant CommandsManager
  participant LaunchDefaultMode

  User->>TableContent: double-click study row
  TableContent->>WorkList: onStudyDoubleClick(study, {defaultWorkflow, workflows})
  WorkList->>CommandsManager: run(workList.onStudyDoubleClick, options)
  CommandsManager->>LaunchDefaultMode: launchDefaultMode(study, workflows, defaultWorkflow, workflowId?)
  LaunchDefaultMode->>LaunchDefaultMode: select workflow and launchWithStudy(study)
Loading

Suggested reviewers: sedghi

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description has Context filled, but Changes & Results, Testing, and checklist details are mostly empty or unchecked. Add a concise changes/results summary, testing steps, and complete the checklist, including the public docs and tested environment items.
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is generic and doesn't clearly describe the main worklist changes. Use a specific semantic-release title such as "fix(WorkList): prefer prefix matches and customize double-click behavior".
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/new-worklist-issues

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jbocce

jbocce commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

You mentioned that you prefer a command instead of a function, why did you choose not to implement a custom command for double click?

@jbocce

jbocce commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

From claude:

  • Type duplication. The context shape { defaultWorkflow?: Workflow; workflows: Workflow[] } and the full handler signature are written out in three places
    (Table.tsx TableProps, the onStudyDoubleClick cast in WorkList.tsx). TableContent already reuses TableProps['onStudyDoubleClick'] — good. Consider
    exporting a single OnStudyDoubleClick type from the StudyList barrel and importing it in WorkList.tsx so the customization cast can't drift from the prop.

@jbocce jbocce left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for perhaps dropping some of these in the implementation although I am not sure they were explicitly mentioned in the requirements.

See my comments.

@wayfarer3130

Copy link
Copy Markdown
Contributor Author

You mentioned that you prefer a command instead of a function, why did you choose not to implement a custom command for double click?

Because the modes don't know how to register command handlers, so the timing is wrong for anything to be available.

wayfarer3130 and others added 2 commits July 9, 2026 17:09
…barrel

Addresses PR review feedback: the double-click handler signature was
written out in both TableProps and the WorkList customization cast,
so the two could drift apart.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Modes can now export getCommandsModule on their definition; appInit
  registers it (via the new ExtensionManager.registerCommandsModule)
  before the mode is instantiated, in a new 'WORKLIST' commands context,
  so the commands are available on the worklist before any mode route
  is entered.
- The workList.onStudyDoubleClick customization is now a command run
  input (name/options) instead of a bare function, defaulting to the
  new launchDefaultMode command, which launches the default workflow
  falling back to the first applicable one. commandOptions.workflowId
  overrides it to a specific mode.
- Duplicate mode ids are now skipped before running their modeFactory
  rather than after.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@wayfarer3130
wayfarer3130 temporarily deployed to fork-pr-approval July 9, 2026 21:43 — with GitHub Actions Inactive
@wayfarer3130

Copy link
Copy Markdown
Contributor Author

@jbocce - I updated the PR to address your concerns and also added the command registration in modes so that it becomes possible to configure a customization as a command name instead of a function. That makes it cleaner overall.

Comment thread platform/app/src/routes/WorkList/WorkList.tsx

@jbocce jbocce left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor comment to consider, but approved!

@wayfarer3130
wayfarer3130 merged commit 6b67610 into master Jul 10, 2026
12 checks passed
@wayfarer3130
wayfarer3130 deleted the fix/new-worklist-issues branch July 10, 2026 12:16
dchansen06 pushed a commit to iCRcompany/OHIFViewer that referenced this pull request Jul 27, 2026
* fix: Several new worklist issues

* refactor: Export a single OnStudyDoubleClick type from the StudyList barrel

Addresses PR review feedback: the double-click handler signature was
written out in both TableProps and the WorkList customization cast,
so the two could drift apart.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat: Run worklist study double-click as a command, registrable by modes

- Modes can now export getCommandsModule on their definition; appInit
  registers it (via the new ExtensionManager.registerCommandsModule)
  before the mode is instantiated, in a new 'WORKLIST' commands context,
  so the commands are available on the worklist before any mode route
  is entered.
- The workList.onStudyDoubleClick customization is now a command run
  input (name/options) instead of a bare function, defaulting to the
  new launchDefaultMode command, which launches the default workflow
  falling back to the first applicable one. commandOptions.workflowId
  overrides it to a specific mode.
- Duplicate mode ids are now skipped before running their modeFactory
  rather than after.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.

2 participants