Skip to content

Fix Open button for bulk dataset - #9

Merged
mzueva merged 1 commit into
mainfrom
mzueva/fix-open-button-for-bulk
Jun 11, 2026
Merged

mzueva merged 1 commit into
mainfrom
mzueva/fix-open-button-for-bulk

Conversation

@mzueva

@mzueva mzueva commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes the "Open" viewer-trigger button for bulk datasets by extending the clonotypeAxisId output to match both pl7.app/vdj/scClonotypeKey (single-cell) and pl7.app/vdj/clonotypeKey (bulk) axis names. A changeset entry documents the patch release.

  • The clonotypeAxisId output now searches for either clonotype-key axis name so the viewer button correctly attaches to the right column in both single-cell and bulk tables.
  • The changeset entry marks the model package as a patch bump.

Confidence Score: 3/5

The Open button fix is correct and targeted, but the same single-cell-only axis name is still used when joining enrichment columns into the bulk table — merging as-is will leave labels, cluster IDs, and CDR-H3 length absent for bulk datasets.

The clonotypeAxisId change correctly unblocks the viewer button for bulk data. However, SC_CLONOTYPE_AXIS / findOnScClonotype still only searches scClonotypeKey, so every enrichment join in scoresTable silently returns nothing for bulk datasets. The fix is half-complete relative to the goal of bulk support.

model/src/index.ts — specifically the SC_CLONOTYPE_AXIS constant and findOnScClonotype usages around lines 101–158.

Important Files Changed

Filename Overview
model/src/index.ts Extends clonotypeAxisId to match bulk axis name — fixes Open button; but SC_CLONOTYPE_AXIS/findOnScClonotype are still single-cell-only, so enrichment columns won't join for bulk datasets.
.changeset/short-toys-think.md Adds a patch changeset entry for the model package — correct scope and description.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[scoresData PColumns] --> B{cols empty?}
    B -- yes --> C[return undefined]
    B -- no --> D[first = cols 0]
    D --> E{axesSpec.find}
    E -- scClonotypeKey --> F[single-cell match]
    E -- clonotypeKey --> G[bulk match NEW]
    E -- neither --> H[return undefined]
    F --> I[getAxisId]
    G --> I
    I --> J[clonotypeAxisId output]
    J --> K[Viewer-trigger Open button attaches to this table column]

    subgraph scoresTable enrichment lookup
        L[SC_CLONOTYPE_AXIS scClonotypeKey only] --> M[findOnScClonotype]
        M --> N[label / cdrh3Length / cluster columns]
        N -- bulk datasets --> O[no match — clonotypeKey not searched]
    end
Loading

Comments Outside Diff (1)

  1. model/src/index.ts, line 101-109 (link)

    P1 SC_CLONOTYPE_AXIS still hardcoded to scClonotypeKey — bulk enrichment won't join

    findOnScClonotype passes SC_CLONOTYPE_AXIS (name "pl7.app/vdj/scClonotypeKey") to findDataWithCompatibleSpec, so for bulk datasets whose enrichment columns are keyed on "pl7.app/vdj/clonotypeKey", none of the enrichment calls (label, cdrh3Length, cluster columns) in scoresTable will find a match. The Open button will now attach correctly (fixed in this PR), but the enrichment columns will always be absent in the bulk table.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: model/src/index.ts
    Line: 101-109
    
    Comment:
    **`SC_CLONOTYPE_AXIS` still hardcoded to `scClonotypeKey` — bulk enrichment won't join**
    
    `findOnScClonotype` passes `SC_CLONOTYPE_AXIS` (name `"pl7.app/vdj/scClonotypeKey"`) to `findDataWithCompatibleSpec`, so for bulk datasets whose enrichment columns are keyed on `"pl7.app/vdj/clonotypeKey"`, none of the enrichment calls (label, `cdrh3Length`, cluster columns) in `scoresTable` will find a match. The Open button will now attach correctly (fixed in this PR), but the enrichment columns will always be absent in the bulk table.
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
model/src/index.ts:101-109
**`SC_CLONOTYPE_AXIS` still hardcoded to `scClonotypeKey` — bulk enrichment won't join**

`findOnScClonotype` passes `SC_CLONOTYPE_AXIS` (name `"pl7.app/vdj/scClonotypeKey"`) to `findDataWithCompatibleSpec`, so for bulk datasets whose enrichment columns are keyed on `"pl7.app/vdj/clonotypeKey"`, none of the enrichment calls (label, `cdrh3Length`, cluster columns) in `scoresTable` will find a match. The Open button will now attach correctly (fixed in this PR), but the enrichment columns will always be absent in the bulk table.

Reviews (1): Last reviewed commit: "Fix Open button for bulk dataset" | Re-trigger Greptile

@mzueva
mzueva requested a review from xnacly June 11, 2026 15:03
Comment thread model/src/index.ts
// and `clonotypeKey` for bulk; match either so the viewer-trigger button
// attaches in both regimes (the scores column is single-keyed on it).
const found = first?.spec.axesSpec.find(
(a) => a.name === "pl7.app/vdj/scClonotypeKey" || a.name === "pl7.app/vdj/clonotypeKey",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn, it was this easy of a fix 😭

@mzueva
mzueva merged commit f85c568 into main Jun 11, 2026
12 checks passed

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request fixes the "Open" button for bulk datasets by updating the axis ID lookup to match both single-cell (scClonotypeKey) and bulk (clonotypeKey) clonotype-key axes. However, the reviewer noted that bulk dataset support remains incomplete because the enrichment columns in scoresTable still rely on findOnScClonotype, which is hardcoded to search only for scClonotypeKey. This will cause enrichment data to be missing for bulk datasets.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread model/src/index.ts
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.

2 participants