Skip to content

feat(worklist): render DeepRV results - #446

Merged
JacquesDelfrate merged 3 commits into
mainfrom
feat/issue-445-deeprv-renderer
Sep 23, 2026
Merged

JacquesDelfrate merged 3 commits into
mainfrom
feat/issue-445-deeprv-renderer

Conversation

@JacquesDelfrate

@JacquesDelfrate JacquesDelfrate commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • add a strict DeepRV@1.0.0 result contract for the deployed numeric class payload
  • render RV systolic-function status and reduced-RV probability in a dedicated accessible Worklist view
  • preserve the generic fallback for unsupported versions, malformed payloads, and empty/no-video results
  • add English, French, and test translations without rendering model-authored diagnosis or recommendation HTML
  • document the contract and cover contract, renderer, registry, and drawer integration behavior

Validation

  • Focused Jest suite: 5 suites passed, 76 tests passed
  • Focused TypeScript check: passed
  • Prettier and translation JSON validation: passed
  • ESLint: 0 errors; existing default-case warning remains in ModelResultRenderer.tsx
  • git diff --check: passed

Closes #445

Summary by Sourcery

Add supported DeepRV 1.0.0 result rendering to the Worklist while preserving safe generic fallbacks for invalid or unsupported results.

New Features:

  • Render validated DeepRV 1.0.0 results in an accessible Worklist view showing RV systolic-function status and reduced-RV probability.
  • Add English, French, and test translations for the DeepRV result presentation.

Bug Fixes:

  • Fall back to the generic renderer for unsupported DeepRV versions, malformed payloads, and empty or unsupported results.
  • Prevent model-authored diagnosis and recommendation content from being rendered as trusted markup.

Enhancements:

  • Introduce and document the strict DeepRV result contract for numeric class and probability payloads.
  • Register the DeepRV renderer alongside existing model result renderers and export its contract and component.

Documentation:

  • Document the DeepRV Worklist result contract, supported version, payload shape, validation rules, and fallback behavior.

Tests:

  • Add coverage for DeepRV contract validation, renderer presentation and accessibility, registry selection, and drawer integration.

@sourcery-ai sourcery-ai 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.

Sorry @JacquesDelfrate, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 5 days by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Reviewer's Guide

Introduces a contract-gated DeepRV@1.0.0 Worklist renderer that displays localized, accessible RV function status and probability while preserving generic fallback behavior and preventing model-authored HTML from being rendered.

Sequence diagram for DeepRV Worklist result display

sequenceDiagram
    participant Drawer as WorklistDrawer
    participant Renderer as ModelResultRenderer
    participant Registry as RendererRegistry
    participant Contract as DeepRVContract
    participant View as DeepRVResult

    Drawer->>Renderer: render ModelExecutionResult
    Renderer->>Registry: resolveModelResultRenderer(result)
    Registry->>Contract: parseDeepRVResultPayload(result.result)
    Contract-->>Registry: validated DeepRVResultPayload
    Registry-->>Renderer: kind deeprv and payload
    Renderer->>View: render payload
    View-->>Drawer: localized RV status and probability
Loading

Flow diagram for contract-gated DeepRV result rendering

flowchart TD
    A["Completed study-service result"] --> B{"Model is DeepRV@1.0.0?"}
    B -- No --> G["Generic result renderer"]
    B -- Yes --> C["parseDeepRVResultPayload"]
    C --> D{"Payload valid?"}
    D -- No --> G
    D -- Yes --> E["DeepRVResult"]
    E --> F["Localized accessible status and probability"]
    E --> H["Ignore model-authored diagnosis and recommendation HTML"]
Loading

File-Level Changes

Change Details Files
Added strict DeepRV@1.0.0 payload validation and exact model/version renderer registration.
  • Validate required fields, numeric class values, probability bounds, and recommendation metadata.
  • Strip unknown fields while preserving the approved contract shape.
  • Fall back to the generic renderer for unsupported identities, versions, or malformed payloads.
platform/app/src/components/inference/studyProcessing/modelResults/deepRVContract.ts
platform/app/src/components/inference/studyProcessing/modelResults/deepRVContract.test.ts
platform/app/src/components/inference/studyProcessing/modelResults/deepRVFixtures.ts
platform/app/src/components/inference/studyProcessing/modelResults/modelResultRendererRegistry.ts
platform/app/src/components/inference/studyProcessing/modelResults/modelResultRendererRegistry.test.ts
platform/app/src/components/inference/studyProcessing/index.ts
platform/app/src/components/inference/studyProcessing/modelResults/DeepRVContract.md
Implemented an accessible dedicated Worklist presentation for DeepRV results.
  • Render localized RV systolic-function status from numeric classes and format reduced-RV probability by locale.
  • Use description-list semantics, labelled section structure, and an assistive clinical-context note.
  • Avoid rendering model-authored diagnosis and recommendation content as markup.
platform/app/src/components/inference/studyProcessing/modelResults/DeepRVResult.tsx
platform/app/src/components/inference/studyProcessing/modelResults/DeepRVResult.test.tsx
platform/i18n/src/locales/en-US/StudyList.json
platform/i18n/src/locales/fr/StudyList.json
platform/i18n/src/locales/test-LNG/StudyList.json
Wired the DeepRV renderer through the generic result renderer and drawer integration.
  • Dispatch the resolved deeprv renderer to the dedicated component.
  • Verify valid results appear in the drawer and generic output is not rendered.
platform/app/src/components/inference/studyProcessing/modelResults/ModelResultRenderer.tsx
platform/app/src/components/inference/studyProcessing/modelResults/ModelResultRenderer.test.tsx
platform/app/src/components/inference/studyProcessing/ModelExecutionResultDrawer.test.tsx

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@cursor
cursor Bot requested review from danvincent11 and kabaluyot September 23, 2026 12:49
…-renderer

# Conflicts:
#	platform/app/src/components/inference/studyProcessing/ModelExecutionResultDrawer.test.tsx
#	platform/app/src/components/inference/studyProcessing/index.ts
#	platform/app/src/components/inference/studyProcessing/modelResults/ModelResultRenderer.test.tsx
#	platform/app/src/components/inference/studyProcessing/modelResults/ModelResultRenderer.tsx
#	platform/app/src/components/inference/studyProcessing/modelResults/modelResultRendererRegistry.test.ts
#	platform/app/src/components/inference/studyProcessing/modelResults/modelResultRendererRegistry.ts
#	platform/i18n/src/locales/en-US/StudyList.json
#	platform/i18n/src/locales/fr/StudyList.json
#	platform/i18n/src/locales/test-LNG/StudyList.json
@cursor

cursor Bot commented Sep 23, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@JacquesDelfrate
JacquesDelfrate merged commit 94039a0 into main Sep 23, 2026
8 checks passed
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.

feat(worklist): add dedicated DeepRV result renderer

1 participant