Skip to content

Commit 5c3fce8

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix/orientationcontroller2
2 parents 1c9c758 + 3c694f8 commit 5c3fce8

106 files changed

Lines changed: 4798 additions & 3660 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252
# CVE-2026-26996 - minimatch via other packages are strictly for building and CI/CD purposes; no user supplied expressions are passed to minimatch
5353
"GHSA-7r86-cg39-jmmj" # CVE-2026-27903 - minimatch same as above
5454
"GHSA-23c5-xmqv-rm74" # CVE-2026-27904 - minimatch same as above
55+
"GHSA-c2c7-rcm5-vvqj" # CVE-2026-33671 - picomatch is generally used for development and CI/CD purposes
5556
)
5657
5758
# Build ignore flags

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.sh text eol=lf

.github/workflows/ohif-downstream.yml

Lines changed: 46 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
name: OHIF Downstream Validation
22

3+
# Pull requests: add a line to the PR body, same style as OHIF uses for CS3D_REF:
4+
# OHIF_REF: <branch-or-tag>
5+
# If omitted, Viewers ref defaults to master. workflow_dispatch can set ohif_ref instead.
36
on:
47
pull_request:
58
workflow_dispatch:
9+
inputs:
10+
ohif_ref:
11+
description: >-
12+
OHIF Viewers branch or tag (e.g. master, beta). On pull_request you can instead add
13+
a line "OHIF_REF: <ref>" to the PR body.
14+
required: false
15+
default: 'master'
16+
17+
permissions:
18+
contents: read
19+
pull-requests: read
620

721
concurrency:
822
group: ${{ github.workflow }}-${{ github.ref }}
@@ -11,16 +25,29 @@ concurrency:
1125
jobs:
1226
ohif-downstream:
1327
name: OHIF downstream tests against this PR
14-
runs-on: ubuntu-latest
15-
timeout-minutes: 180
28+
runs-on: self-hosted
29+
timeout-minutes: 120
1630
env:
17-
BUN_VERSION: 1.2.23
18-
NODE_VERSION: 20
19-
OHIF_REF: master
31+
BUN_VERSION: 1.3.11
32+
NODE_VERSION: 24
2033
OHIF_DIR: ohif
34+
# Update to force a rebuild of the OHIF integration
35+
BUILD_INDEX: 0
2136
steps:
2237
- name: Checkout Cornerstone
2338
uses: actions/checkout@v4
39+
with:
40+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
41+
42+
- name: Resolve OHIF ref (PR body OHIF_REF line or workflow_dispatch input)
43+
run: bash scripts/ci/ohif-ref-resolve.sh
44+
env:
45+
GH_TOKEN: ${{ github.token }}
46+
EVENT_NAME: ${{ github.event_name }}
47+
REPO: ${{ github.repository }}
48+
PR_NUMBER: ${{ github.event.pull_request.number }}
49+
OHIF_REF_INPUT: ${{ github.event.inputs.ohif_ref }}
50+
DEFAULT_REF: master
2451

2552
- name: Log build context (OHIF/CS3D branch and version for build diagnosis)
2653
run: |
@@ -58,9 +85,21 @@ jobs:
5885
fetch-depth: 1
5986
submodules: recursive
6087

88+
- name: Log build context (OHIF/CS3D branch and version for build diagnosis)
89+
run: |
90+
CS3D_BRANCH=$(git rev-parse --abbrev-ref HEAD)
91+
CS3D_SHA=$(git rev-parse HEAD)
92+
OHIF_BRANCH=$(git -C "${OHIF_DIR}" rev-parse --abbrev-ref HEAD)
93+
OHIF_SHA=$(git -C "${OHIF_DIR}" rev-parse HEAD)
94+
echo "::notice::Build type: ohif-downstream | OHIF: OHIF/Viewers@${OHIF_BRANCH} (${OHIF_SHA}) | CS3D: ${{ github.repository }}@${CS3D_BRANCH} (${CS3D_SHA})"
95+
echo "[build-context] ═══════════════════════════════════════════════════════════════"
96+
echo "[build-context] Build type: ohif-downstream (CS3D repo validating against OHIF)"
97+
echo "[build-context] OHIF checkout: ${OHIF_BRANCH} (${OHIF_SHA}) | CS3D checkout: ${CS3D_BRANCH} (${CS3D_SHA})"
98+
echo "[build-context] ═══════════════════════════════════════════════════════════════"
99+
61100
- name: Install OHIF dependencies
62101
working-directory: ${{ env.OHIF_DIR }}
63-
run: bun install
102+
run: bun install --frozen-lockfile
64103

65104
- name: Link local Cornerstone packages into OHIF node_modules
66105
run: node scripts/link-ohif-cornerstone-node-modules.mjs ${{ env.OHIF_DIR }}
@@ -71,7 +110,7 @@ jobs:
71110

72111
- name: Install Playwright browsers
73112
working-directory: ${{ env.OHIF_DIR }}
74-
run: npx playwright install --with-deps chromium
113+
run: npx playwright install
75114

76115
- name: Run OHIF e2e tests
77116
working-directory: ${{ env.OHIF_DIR }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,4 @@ CLAUDE.md
6868
# External repositories
6969
vtk-js/
7070
.ohif-downstream/
71+
auth.json

CHANGELOG.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,72 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [4.21.7](https://github.com/cornerstonejs/cornerstone3D/compare/v4.21.6...v4.21.7) (2026-04-16)
7+
8+
**Note:** Version bump only for package root
9+
10+
## [4.21.6](https://github.com/cornerstonejs/cornerstone3D/compare/v4.21.5...v4.21.6) (2026-04-16)
11+
12+
### Bug Fixes
13+
14+
- **viewport:** restore default visual properties on reset in VolumeViewport3D and VolumeViewport ([#2693](https://github.com/cornerstonejs/cornerstone3D/issues/2693)) ([d1a7097](https://github.com/cornerstonejs/cornerstone3D/commit/d1a709707c58c7780d7838ac95a8ef8783e45cfd))
15+
16+
## [4.21.5](https://github.com/cornerstonejs/cornerstone3D/compare/v4.21.4...v4.21.5) (2026-04-14)
17+
18+
### Bug Fixes
19+
20+
- sam model exception ([#2637](https://github.com/cornerstonejs/cornerstone3D/issues/2637)) ([0fccf54](https://github.com/cornerstonejs/cornerstone3D/commit/0fccf54df585199e64a1e7c5fa9f5bf4d0a48e93))
21+
22+
## [4.21.4](https://github.com/cornerstonejs/cornerstone3D/compare/v4.21.3...v4.21.4) (2026-04-14)
23+
24+
**Note:** Version bump only for package root
25+
26+
## [4.21.3](https://github.com/cornerstonejs/cornerstone3D/compare/v4.21.2...v4.21.3) (2026-04-13)
27+
28+
**Note:** Version bump only for package root
29+
30+
## [4.21.2](https://github.com/cornerstonejs/cornerstone3D/compare/v4.21.1...v4.21.2) (2026-04-10)
31+
32+
### Bug Fixes
33+
34+
- add auth json to gitignore ([#2694](https://github.com/cornerstonejs/cornerstone3D/issues/2694)) ([7a5cc93](https://github.com/cornerstonejs/cornerstone3D/commit/7a5cc93765b7ebfdfd02790d4eb9e7c29cd7b38b))
35+
36+
## [4.21.1](https://github.com/cornerstonejs/cornerstone3D/compare/v4.21.0...v4.21.1) (2026-04-10)
37+
38+
### Bug Fixes
39+
40+
- Minimal changes to get linking to work for ohif-downstream ([#2689](https://github.com/cornerstonejs/cornerstone3D/issues/2689)) ([b2d771b](https://github.com/cornerstonejs/cornerstone3D/commit/b2d771b13010a9018acbdf5427fbc635d0ddd8a7))
41+
42+
# [4.21.0](https://github.com/cornerstonejs/cornerstone3D/compare/v4.20.4...v4.21.0) (2026-04-06)
43+
44+
### Features
45+
46+
- Crosshairs minimal mode and add jump on click with modifier key ([#2673](https://github.com/cornerstonejs/cornerstone3D/issues/2673)) ([df672f1](https://github.com/cornerstonejs/cornerstone3D/commit/df672f11cba9284035bc32dd80f697db6df3518f))
47+
48+
## [4.20.4](https://github.com/cornerstonejs/cornerstone3D/compare/v4.20.3...v4.20.4) (2026-04-02)
49+
50+
### Bug Fixes
51+
52+
- **security:** update dependencies to fix security vulnerabilities ([#2687](https://github.com/cornerstonejs/cornerstone3D/issues/2687)) ([77c553b](https://github.com/cornerstonejs/cornerstone3D/commit/77c553b0851be285b02c218bc2ae9ae21a44b5ee))
53+
54+
## [4.20.3](https://github.com/cornerstonejs/cornerstone3D/compare/v4.20.2...v4.20.3) (2026-04-02)
55+
56+
### Bug Fixes
57+
58+
- **annotation:** Enhance getTextBoxCoordsCanvas to use all annotation points for default textbox position and improve corner determination logic ([#2686](https://github.com/cornerstonejs/cornerstone3D/issues/2686)) ([11bfc2b](https://github.com/cornerstonejs/cornerstone3D/commit/11bfc2bb90571bd672c8627f812cc0118658be97))
59+
60+
## [4.20.2](https://github.com/cornerstonejs/cornerstone3D/compare/v4.20.1...v4.20.2) (2026-04-02)
61+
62+
### Bug Fixes
63+
64+
- **tools:** no active segmentation error toast when hovering over viewport without segmentation ([#2683](https://github.com/cornerstonejs/cornerstone3D/issues/2683)) ([a7e4ea1](https://github.com/cornerstonejs/cornerstone3D/commit/a7e4ea13c58f6ac6dd26677c0d9ece697b5d57e9))
65+
66+
## [4.20.1](https://github.com/cornerstonejs/cornerstone3D/compare/v4.20.0...v4.20.1) (2026-03-31)
67+
68+
### Bug Fixes
69+
70+
- **htmlSetup:** Uncomment form creation and append to content in setup function ([#2681](https://github.com/cornerstonejs/cornerstone3D/issues/2681)) ([90acd90](https://github.com/cornerstonejs/cornerstone3D/commit/90acd90cdc36844ef20a8f65509bc8c467219101))
71+
672
# [4.20.0](https://github.com/cornerstonejs/cornerstone3D/compare/v4.19.4...v4.20.0) (2026-03-16)
773

874
### Features

README.md

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -43,35 +43,44 @@ The downstream validation is defined in
4343
It runs on every CS3D pull request and `workflow_dispatch`:
4444

4545
1. Checks out the CS3D PR branch and builds it (`bun run build:esm`).
46-
2. Checks out the OHIF Viewer at the ref specified by the `OHIF_REF` env
47-
variable (defaults to `master`).
46+
2. Checks out the OHIF Viewer at a ref resolved for that run: by default
47+
`master`; on pull requests you can override with a line in the PR description
48+
(see below); on `workflow_dispatch` you can set the `ohif_ref` input.
4849
3. Installs OHIF dependencies, then symlinks the locally built CS3D packages
4950
into OHIF's `node_modules` via
5051
`scripts/link-ohif-cornerstone-node-modules.mjs`.
5152
4. Runs OHIF unit tests and Playwright e2e tests against the linked build.
5253

53-
### Testing against an OHIF branch other than master
54-
55-
By default the workflow checks out `master` of the OHIF Viewer. To test against
56-
a different OHIF branch (e.g. when a feature requires coordinated changes in
57-
both repos):
58-
59-
1. Open `.github/workflows/ohif-downstream.yml`.
60-
2. Change the `OHIF_REF` environment variable (line 19) from `master` to the
61-
target branch:
62-
```yaml
63-
env:
64-
OHIF_REF: feat/my-ohif-feature # was: master
65-
```
66-
3. Commit and push. The downstream job will now clone and test against that
67-
OHIF branch instead.
68-
4. **Remember to set `OHIF_REF` back to `master` before merging your CS3D PR.**
69-
70-
> **Tip:** This pairs with the OHIF side of the integration. While `OHIF_REF`
71-
> lets a CS3D PR test against an OHIF branch, the OHIF repo has a symmetric
72-
> mechanism — the `ohif-integration` label and `CS3D_REF` in the PR body —
73-
> that lets an OHIF PR test against a CS3D branch. Together these allow both
74-
> sides to run the full test suite against unpublished code. See the
54+
### Choosing the OHIF Viewer ref (`OHIF_REF` / `ohif_ref`)
55+
56+
By default the workflow checks out `master` of [OHIF/Viewers](https://github.com/OHIF/Viewers).
57+
You can point downstream validation at another branch or tag **without editing
58+
the workflow file**:
59+
60+
**On a CS3D pull request** — add a line to the PR description (same style as
61+
OHIF uses for `CS3D_REF:` on the OHIF side):
62+
63+
```text
64+
OHIF_REF: your-branch-or-tag
65+
```
66+
67+
The first line matching that pattern wins; the value is the first token after
68+
the colon (no spaces in the ref). If you omit this line, the job uses `master`.
69+
70+
**When running the workflow manually** — use the **ohif_ref** input on
71+
`workflow_dispatch` (defaults to `master`).
72+
73+
**Coordinated CS3D + OHIF changes** — when a feature needs changes in both
74+
repositories, create an OHIF branch whose **name matches your CS3D branch**
75+
(e.g. both `feat/shared-thing`). Then put `OHIF_REF: feat/shared-thing` in the
76+
CS3D PR body (or set **ohif_ref** to that name for a manual run). Matching
77+
names make it obvious which Viewer branch pairs with which Cornerstone branch
78+
and avoid juggling unrelated branch names across the two repos.
79+
80+
> **Tip:** This pairs with the OHIF side of the integration. The OHIF repo uses
81+
> the `ohif-integration` label and `CS3D_REF:` in the PR body to test an OHIF
82+
> PR against a CS3D branch. Together, `OHIF_REF:` here and `CS3D_REF:` there
83+
> let both sides run the full test suite against unpublished code. See the
7584
> [OHIF Viewer README — Cornerstone3D Integration Testing](https://github.com/OHIF/Viewers#cornerstone3d-integration-testing)
7685
> for details on the OHIF side.
7786

0 commit comments

Comments
 (0)