fix: Several new worklist issues (#6130)

* 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>
This commit is contained in:
Bill WallaceandClaude Fable 5 authored and GitHub committed 2026-07-10 08:16:16 -04:00
1 parent dbb8b1526e
commit 6b6761088b
11 files changed
+230 -27

No files matched your search

@@ -614,6 +614,24 @@ export default class ExtensionManager extends PubSubService {
});
}
/**
* Registers a commands module produced outside the extension registration
* path — e.g. a mode's `getCommandsModule`, registered at app init so its
* commands are available before any mode route is entered (worklist time).
*
* @param commandsModule - as returned by a `getCommandsModule` function
* @param defaultContext - context used when the module does not declare one
*/
public registerCommandsModule(
commandsModule: CommandsModule,
defaultContext: string = 'VIEWER'
): void {
this._initCommandsModule({
...commandsModule,
defaultContext: commandsModule.defaultContext || defaultContext,
});
}
/**
*
* @private