Repository navigation
Conversation
raylim
force-pushed
the
codex/wsi-rd-annotations
branch
from
September 30, 2026 19:05
f0a6fe8 to
531063c
Compare
This was referenced Sep 30, 2026
raylim
force-pushed
the
codex/wsi-rd-annotations
branch
2 times, most recently
from
September 30, 2026 20:22
e10c5fa to
fcecd6f
Compare
raylim
added a commit
that referenced
this pull request
Oct 8, 2026
Rebuilt on codex/wsi-viewer-package (slide timing out, clinical section, patient tab URL scoping) with the updated children: study #17, molecular #18, agent #20 (with annotations #19) and study slides #23. #21 is closed: its patient-tab URL scoping is now in the base and its slide timeline moved to #28, so the timeline files, timing fields and mock routes it brought in are left out. The previous head is kept as a parent so the update is a fast-forward; this commit keeps the rebuilt tree. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
raylim
added a commit
that referenced
this pull request
Oct 9, 2026
…d-agent Brings in #19 merged with the simplified cBioPortal#5732 and re-expresses the research assistant on it: - selection outcomes are settled from the base's resetMount (cancelled) and failMount (failed, with the short per-outcome details the agent reported before); the trimmed init-load trace is not reintroduced - selectSlide keeps the base contract (resolves once mounted); selectSlideAndWait resolves with the outcome for the agent's select_slide and set_filters actions. The base, molecular and controller specs no longer need the child's "cancel the pending mount" helpers - firstSlideForCurrentFilters is shared by the user's filter reselect and the agent's set_filters; agent filter checks use preferredSlideKeys and matchesMatchFilter - the agent token getter relies on the now-required studyId and authScope - the live-stack wsi-foundation-route.spec.ts stays deleted (its mocked fallback duplicated wsi-foundation-mocked.spec.ts); the agent's mocked spec drops the WSI_CHILD_CONTRACT guard and the mocks drop msk_wsi_authentication_enabled - the foundation specs use the base's shared fixtures Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
raylim
added a commit
that referenced
this pull request
Oct 13, 2026
… simplifications - The viewer entry derives its props from WSIViewer's, leaving out the runtime-provided annotation service and agent flag. - The agent's filter action no longer reports to the removed onStainFilterChange/onMatchFilterChange host callbacks. - The controller keeps the agent's selection waiters beside the new cancel-handle schedules. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
raylim
added a commit
that referenced
this pull request
Oct 13, 2026
raylim
added a commit
that referenced
this pull request
Oct 13, 2026
Merges the updated children: #17 b56bec1, #18 ff6ea53, #20 64712b9 (with #19 0b5a959) and #23 35c00aa (with #27 46d3dcb), all on cBioPortal#5732 e90d380. The tree is the children merged onto each other (second parent); the previous integration head stays the first parent so the push fast-forwards. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Adds the cbioportal-wsi-viewer package (OpenSeadragon slide viewer with the slide list, details sidebar, panel chrome, scale bar and shareable view state) and the patient view Pathology Slides tab that serves whole-slide images from resource data. Slide resources and, when the viewer is configured, the legacy H&E resources are left out of Files & Links and the resource tabs (ResourcePolicy.isHiddenFromResourceViews, applied through ResourceTableStore's hideResource option). Squashed onto master after resource table v2 (cBioPortal#5629); the previous history is on branch backup/codex-wsi-viewer-package-20261015.
The tab count and the patient ResourcesTab table came from cBioPortal#5629's server-driven code, which lists every resource; slides have their own Pathology Slides tab. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… page links, study resource tabs - Cancel a queued slide click when the hierarchy reloads, so a patient switch can't open the previous patient's slide. - Request slide access with `credentials: 'include'`, like the hierarchy request, so an API on another origin gets its login cookie. - Build the sidebar's patient/sample links through a new optional `buildPageUrl` runtime hook; the portal passes buildCBioPortalPageUrl so links keep the deployment context path (e.g. /beta). - Study view: give the page's resource store the hiding policy and use its visibleTabs for the tabs, hasNewResourceTabs and the Files & Links redirect, so a hidden H&E resource is never the redirect target. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Squash of #19 onto the rebased cBioPortal#5732 after resource table v2 merged upstream. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
raylim
force-pushed
the
codex/wsi-rd-annotations
branch
from
October 15, 2026 21:06
94a271f to
15baa33
Compare
raylim
added a commit
that referenced
this pull request
Oct 15, 2026
…rge target) Rebuilt from the rebased cBioPortal#5732 (44b68b8) by merging #17 (30456c9), #18 (643d044), #20 (d81dab9, includes #19) and #23 (008ce69). Squash of #22 onto the rebased cBioPortal#5732 after resource table v2 merged upstream. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Follows the backend rename of msk.wsi.tile_server.url to wsi.tile_server.url: the setting isn't MSK-specific. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…e_server_url rename) # Conflicts: # src/config/IAppConfig.ts # src/config/serverConfigDefaults.ts
raylim
added a commit
that referenced
this pull request
Oct 15, 2026
The opaque slide key is now the first 12 hex characters of the old 32-hex key. Update the slide-key doc comments, the mocked backend's access validation, and the test fixtures to 12-hex keys. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…i_url The backend property is now wsi.annotation_api.url (raylim/cbioportal#9), like the tile server's wsi.tile_server.url. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The filter reset showed whenever the page passed a sample or an initial stain, even when clicking it did nothing: after a link scope had been released (the preferred sample only picks the first slide), for a link scope that hides no slide, or once the initial stain was cleared. It now shows only while a stain or match filter is set, or while a link scope the viewer may release hides some of the patient's viewable slides. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The sample chip's clear button had the same no-op case as the filter reset: for a link sample scope that hides no viewable slide (all of the patient's viewable slides are in that sample), clearing it changed nothing. The list is narrowed to, and the chip names, a link's sample only while the scope hides slides; a host-owned sample is unchanged. Tests also cover unmatched slides hidden by a sample scope, a link that matches no slide, a match-level link and slides the viewer cannot open. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…tal#5732: sample chip only when it hides slides)
Access control moves to the ingress: an nginx auth subrequest checks the
portal session cookie against GET /api/studies/{studyId}, and the tile
server no longer takes a JWT. The viewer therefore stops requesting
GET /api/resources/{studyId}/{resourceId}/access and sends no
Authorization header.
- Tiles: {tileServerUrl}/tiles/zxy/{z}/{x}/{y}?studyId=&key=&enc=
- Thumbnails: {tileServerUrl}/thumbnails?studyId=&key=&enc=&tw=&th=&width=&height=
(key = serving.key, enc = serving.sealed_source, tw/th = the stored
thumbnail size; all URL-encoded; same-origin, so the session cookie
goes along)
- The slide registry (wsiAuth.ts) now keeps each published slide's
serving key, sealed source, thumbnail size and tile metadata;
getWsiSlideSource replaces the async access request. The Slide model
carries sealed_source/thumbnail_width/thumbnail_height from the row;
none of them is rendered.
- Removed token caching, refresh/expiry timers, OpenSeadragon ajax
headers and the metadata prefetch that only warmed access requests.
Tiles are still loaded with XHR so a refused tile's status is visible.
- A 401/403 from a tile or the thumbnail preview fails the slide at once
with a "reload the page or sign in again" message in the existing
error state.
- The hidden prop keeps pausing panel shortcuts and OpenSeadragon
auto-resize; only the token refresh part is gone.
- Jest specs, the mocked Playwright WSI suite and the README portal
contract follow the new contract (studyId/key/enc, tw/th, no
Authorization header, no /access request, no image id).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…tal#5732: tile requests by key and sealed source, no token) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The tile server sizes thumbnails itself and ignores tw/th, so thumbnail URLs carry only studyId, key, enc, width and height. The viewer no longer reads the stored thumbnail size from a slide's row; nothing laid out by it. The Playwright mock now models the ingress (401/403 on session refusal) separately from the tile server, which answers 404 for a key/enc mismatch and never 401/403. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A preview error, 401/403 included, now just drops the preview. Tiles decide whether the slide fails: a tile answered 401/403 still shows the session-expired error at once. Before, a refused preview failed the mount while tiles kept loading, so the error flashed and then cleared. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
fetchWsiPatientHierarchy registered a hierarchy's slides whenever the shared cache promise resolved, even after the caller aborted or after clearWsiSlideSources (e.g. for a change of user), bringing back slides the clear had removed. The registry now has a generation that every clearWsiSlideSources bumps; a call captures it before its request and skips registration if it changed or if the caller aborted. Registering a hierarchy does not bump it, so concurrent loads of other patients are unaffected. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…erver Tile and thumbnail URLs are now built the same way: the tile-server base is normalized to exactly one trailing slash and the path and query are appended, so `/wsi` and `/wsi/` give the same URLs and a relative base stays relative. The ingress authorizes tile and thumbnail requests with the portal session cookie, so the tile server must be same-origin with the portal. The README says so, and the viewer logs a console.error once per cross-origin tile server it is configured with. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…tal#5732: thumbnails without tw/th, ingress-only 401/403, registry generation) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…rged as 8052359) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Keep enrichment rows whose group mean is 0 getFilteredData read each group's value as `meanExpression || alteredPercentage`. A mean of exactly 0 is falsy, so expression and generic assay rows fell back to an undefined altered percentage, every comparison failed, and the row was dropped from the enrichment table and its download while still showing in the volcano plot. Fall back to the altered percentage only when the group has no mean. Fixes cBioPortal/cbioportal#12417 * Update mRNA enrichment e2e expectations for zero-mean rows Rows with a group mean of 0 are now listed, which changes two remote e2e results: - group-comparison-mrna-enrichments-several: the table now has 19287 rows instead of 17742, with OR6B2 (p = 5.0e-13, means 0/0/0/0.74) on top. The reference is the actual image from CircleCI. - excluding-unprofiled comparison mrna: genes with an Unaltered mean of 0 now rank first, so the expected top hit is AQP7 instead of KRT17P5. * Update excluding-unprofiled mRNA e2e reference for zero-mean rows The expected top gene is now AQP7 (Unaltered mean 0, p = 9.3e-12), so the reference shows its box plot and a table led by genes whose Unaltered-group mean is 0. The reference is the actual image from CircleCI, identical on the first run and the retry.
Cover the Generic Assay entity selectors in Study View Add Chart, Oncoprint Add Tracks and the Plots tab on the remote lane, using ccle_broad_2019, whose treatment profiles have more entities than the 100 options the selector lists at once. The tests search for, select and restore from the URL a treatment outside the first 100, and check that methylation probes of the queried gene are listed first. In the local treatment spec, wait for option and chip counts with toHaveCount, and add tests that a selection is kept after clearing a search and after switching to a profile that has the same treatment. Co-authored-by: dippindots <dippindots@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…rtal#5790) * Format StructureVisualizer3D.ts with Prettier No code changes. The file was not Prettier-formatted on master, and the CI prettier check runs on every changed file. * Color AlphaFold models by pLDDT band to match the legend The pLDDT coloring passed the four AlphaFold colors to 3Dmol as a linear gradient over 0-100. 3Dmol spreads gradient colors in equal steps of 25, so the drawn colors didn't match the legend's bands (<50, 50-70, 70-90, >90): pLDDT 45 was drawn light blue instead of orange, and 72-88 dark blue instead of light blue, so low-confidence regions looked confident. Color each atom with a colorfunc that returns the band color from ALPHAFOLD_PLDDT_LEGEND, so the structure and the legend share one definition of the bands. Fixes cBioPortal/cbioportal#12439
…ions Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
raylim
added a commit
that referenced
this pull request
Nov 12, 2026
…end master) into codex/wsi-rd-agent Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The annotation service now sits behind a proxy that authorizes each request with the portal session cookie for the study named in the query, so the viewer no longer fetches or sends study tokens. - wsiServiceRequest.ts: every request sends credentials: 'include' and exactly one studyId in the query; writes (POST/PUT/PATCH/DELETE) add X-Requested-With: XMLHttpRequest, and a body is sent as application/json. - wsiAnnotationController: list, create, update and delete all carry studyId (update and delete sent none before). A 401 asks the user to sign in and a 403 makes annotations read-only; neither is retried, and the toolbar and panel hide the editing controls. - wsiAuth.ts: the purpose-token cache and its tests are removed. - README: documents the annotation service contract. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
raylim
added a commit
that referenced
this pull request
Nov 12, 2026
…service) into codex/wsi-rd-agent Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The annotation service now scopes GET /annotations to the studyId the proxy authorized and ignores a study_id query parameter, so the list call no longer sends one. POST bodies keep study_id, which the service still requires. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
raylim
added a commit
that referenced
this pull request
Nov 12, 2026
) This merge takes its tree entirely from deploy/wsi-rd-children-20261112 (dd19c06), the second parent: - codex/wsi-study-slide-facets-ui (#29, 7e493f7; stacked on #23 and #27) - codex/wsi-rd-study (#17, 0c999a1) - codex/wsi-rd-molecular (#18, ce690cf) - codex/wsi-summary-timeline (#28, 406f52b) The annotation (#19) and research assistant (#20) branches merged earlier are not part of the result. The first parent keeps the branch's earlier history, so the push is a fast-forward. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fork follow-up stacked on
codex/wsi-viewer-package(cBioPortal#5732). It adds slide annotation authoring to the viewer, saved to a separate annotation service.Behavior
slide_idcarries the slide's opaque slide key.Service calls and auth
The annotation service sits behind a proxy that authenticates each request by calling the portal with the browser's session cookie, then forwards the user and study to the service. The browser holds no token.
GET {url}/annotations?slide_id=…&study_id=…&studyId=…POST {url}/annotations?studyId=…slide_idandstudy_idPUT {url}/annotations/{id}?studyId=…versionDELETE {url}/annotations/{id}?studyId=…Every request (
wsiServiceRequest.ts):credentials: 'include'and noAuthorizationheader;studyIdexactly once in the query string. The proxy authorizes that study;X-Requested-With: XMLHttpRequest, andContent-Type: application/jsonwhen it has a body.Errors:
Anyone who can read the study may write annotations; there is no separate write permission.
Config
wsi_annotation_api_url(default'') fillsWsiViewerConfig.annotations.apiUrl, e.g./wsion the portal host.Backend dependencies
GET /api/studies/{studyId}/access(Add a study access check endpoint for proxy authentication cBioPortal/cbioportal#12505), which returns the user and study for an authorized session, 401 when signed out and 403 without access.Bundling
@annotorious/openseadragonloads lazily in its own async chunk on first use.wsi-openseadragon) shared by the viewer and Annotorious.scripts/assert_wsi_osd_bundle.jsfails on a duplicated OpenSeadragon or on Annotorious in an initial bundle.Tests
wsiServiceRequest.spec.ts: credentials, the CSRF header on writes only, JSON content type,studyId, 401/403 mapping.wsiAnnotationController.spec.ts: list, create, update and delete each sendstudyIdonce, the cookie and noAuthorization; the CSRF header only on writes; a 401 turns editing off; a 403 on a write makes the slide read-only with no retry.🤖 Generated with Claude Code