Skip to content

feat(wsi): add native annotation authoring - #11

Closed
raylim wants to merge 12 commits into
codex/wsi-release-hardeningfrom
codex/wsi-native-annotations
Closed

raylim wants to merge 12 commits into
codex/wsi-release-hardeningfrom
codex/wsi-native-annotations

Conversation

@raylim

@raylim raylim commented Sep 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • add native WSI annotation authoring as a child of the native viewer foundation
  • keep annotation state tied to slide selection and OpenSeadragon lifecycle
  • scope annotation access-token caching by auth scope and study
  • provide layer/color controls, review panels, stale-proposal protection, and navigator reuse of the loaded tile source

Stack

Parent: cBioPortal#5708

This PR intentionally excludes the research-agent UI and backend agent work; those remain in the child PR.

Validation

  • pnpm run buildMain (Rspack completed; OpenSeadragon bundle assertion passed)
  • focused Jest suites covering annotation controller, auth, WSI foundation/viewer, and OSD utilities (26 tests)
  • changed-file formatting and git diff --check

@raylim
raylim force-pushed the codex/wsi-native-annotations branch from 73a05dd to acf45c7 Compare September 23, 2026 17:09
@raylim raylim added the enhancement New feature or request label Sep 23, 2026
@raylim
raylim force-pushed the codex/wsi-release-hardening branch from 5f0169d to 88e65ea Compare September 24, 2026 05:02
raylim added a commit that referenced this pull request Sep 30, 2026
Port #11 onto the cbioportal-wsi-viewer package.

- Annotation controller, toolbar, layers and annotation panels in the
  package. Annotation authoring is on when the host installs
  `WsiViewerConfig.annotations.apiUrl` with `configureWsiViewerRuntime`;
  the service URL is a host service shared by every viewer, so it lives in
  the runtime and the viewer entry reads it from there. The app fills it in
  `buildWsiViewerConfig` from `msk.wsi.annotation_api.url`
  (`msk_wsi_annotation_api_url`), which the bootstrapper installs once.
- wsiAuth fetches the study-scoped `api/wsi/access-token?purpose=annotations`
  token through the runtime's buildApiUrl/fetchImpl, caches it per auth scope,
  purpose and study (dropping expired entries on insert), and forgets it with
  the study's slide access. Slide access itself stays the image-ID request of
  the base.
- Annotorious is a dependency of the package and loads as its own
  `wsi-annotorious` async chunk on the first annotated slide; OpenSeadragon
  keeps a single copy in the shared `wsi-openseadragon` chunk, which the
  bundle assertion now checks together with Annotorious staying out of the
  initial bundles.
- The navigator mirrors the open main image instead of opening a second tile
  source.
- Retire the legacy Digital Slide Archive "Tissue Image" tab, and stabilize
  the deferred MSKTabs render test.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@raylim

raylim commented Sep 30, 2026

Copy link
Copy Markdown
Owner Author

Resource-data successor: #19 (codex/wsi-rd-annotations, in the viewer package of cBioPortal#5732). This PR stays on the native foundation track.

raylim added a commit that referenced this pull request Sep 30, 2026
Port #11 onto the cbioportal-wsi-viewer package.

- Annotation controller, toolbar, layers and annotation panels in the
  package. Annotation authoring is on when the host installs
  `WsiViewerConfig.annotations.apiUrl` with `configureWsiViewerRuntime`;
  the service URL is a host service shared by every viewer, so it lives in
  the runtime and the viewer entry reads it from there. The app fills it in
  `buildWsiViewerConfig` from `msk.wsi.annotation_api.url`
  (`msk_wsi_annotation_api_url`), which the bootstrapper installs once.
- wsiAuth fetches the study-scoped `api/wsi/access-token?purpose=annotations`
  token through the runtime's buildApiUrl/fetchImpl, caches it per auth scope,
  purpose and study (dropping expired entries on insert), and forgets it with
  the study's slide access. Slide access itself stays the image-ID request of
  the base.
- Annotorious is a dependency of the package and loads as its own
  `wsi-annotorious` async chunk on the first annotated slide; OpenSeadragon
  keeps a single copy in the shared `wsi-openseadragon` chunk, which the
  bundle assertion now checks together with Annotorious staying out of the
  initial bundles.
- The navigator mirrors the open main image instead of opening a second tile
  source.
- Retire the legacy Digital Slide Archive "Tissue Image" tab, and stabilize
  the deferred MSKTabs render test.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
raylim added a commit that referenced this pull request Sep 30, 2026
Port #11 onto the cbioportal-wsi-viewer package.

- Annotation controller, toolbar, layers and annotation panels in the
  package. Annotation authoring is on when the host installs
  `WsiViewerConfig.annotations.apiUrl` with `configureWsiViewerRuntime`;
  the service URL is a host service shared by every viewer, so it lives in
  the runtime and the viewer entry reads it from there. The app fills it in
  `buildWsiViewerConfig` from `msk.wsi.annotation_api.url`
  (`msk_wsi_annotation_api_url`), which the bootstrapper installs once.
- wsiAuth fetches the study-scoped `api/wsi/access-token?purpose=annotations`
  token through the runtime's buildApiUrl/fetchImpl, caches it per auth scope,
  purpose and study (dropping expired entries on insert), and forgets it with
  the study's slide access. Slide access itself stays the image-ID request of
  the base.
- Annotorious is a dependency of the package and loads as its own
  `wsi-annotorious` async chunk on the first annotated slide; OpenSeadragon
  keeps a single copy in the shared `wsi-openseadragon` chunk, which the
  bundle assertion now checks together with Annotorious staying out of the
  initial bundles.
- The navigator mirrors the open main image instead of opening a second tile
  source.
- Retire the legacy Digital Slide Archive "Tissue Image" tab, and stabilize
  the deferred MSKTabs render test.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
raylim added a commit that referenced this pull request Oct 9, 2026
… client

The endpoint lists only slides the tile server can serve (backend #11
drops the flag in the same change), so viewableOnly was always true and
viewableSlideCount / totalViewableSlides always equalled the slide counts.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@raylim

raylim commented Oct 9, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #19 (annotation authoring in the viewer package).

@raylim raylim closed this Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant