Skip to content

Commit 6d1cdc6

Browse files
committed
Merge remote-tracking branch 'origin/webgl-poc' into webgl-poc
2 parents afb07a8 + f5d4821 commit 6d1cdc6

76 files changed

Lines changed: 1063 additions & 668 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.

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
## Changes since v4.1.14 (2026-03-08)
2+
3+
### bug
4+
5+
- Fix MM tag ambiguity codes not being recognized
6+
([#5529](https://github.com/GMOD/jbrowse-components/pull/5529)) @cmdcolin
7+
- Fix when using refname aliases for chromosome names in displayedRegions list
8+
([#5522](https://github.com/GMOD/jbrowse-components/pull/5522)) @cmdcolin
9+
- Fix arc tracks with custom jexl crashing
10+
([#5513](https://github.com/GMOD/jbrowse-components/pull/5513)) @cmdcolin
11+
- Fix alignments tracks not being able to vertically scroll since v4.1.4
12+
([#5512](https://github.com/GMOD/jbrowse-components/pull/5512)) @cmdcolin
13+
- Fix HTTP 416 errors by replacing http-range-fetcher with simpler fetcher
14+
([#5505](https://github.com/GMOD/jbrowse-components/pull/5505)) @cmdcolin
15+
16+
### enhancement
17+
18+
- Update dependencies
19+
([#5527](https://github.com/GMOD/jbrowse-components/pull/5527)) @cmdcolin
20+
- Add debounce to hierarchical search text field
21+
([#5517](https://github.com/GMOD/jbrowse-components/pull/5517)) @cmdcolin
22+
- Use Element setHTML if available
23+
([#5507](https://github.com/GMOD/jbrowse-components/pull/5507)) @cmdcolin
24+
125
## Changes since v4.1.13 (2026-02-20)
226

327
### bug

SECURITY.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Security Policy
2+
3+
## Reporting a Vulnerability
4+
5+
Please email [jbrowse2@berkeley.edu](mailto:jbrowse2@berkeley.edu) with a
6+
description of the vulnerability and steps to reproduce it.

agent-docs/OTHER_IDEAS.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
- Track Google Analytics events from users on a fine grained basis. better
2+
- Ensure `types.refinement` from @jbrowse/mobx-state-tree (see
3+
~/src/mobx-state-tree) v5.6.0 provides fallbacks when state tree fails to load
4+
- Map all old "renderer" concepts to new display model settings
5+
- Ensure all demo sessions load without error
6+
- Diagonalization: yeast works, grape vs peach unclear
7+
- Opening reference sequence track with `umd_plugin.js` gives
8+
`TypeError: Cannot assign to read only property 'metadata'` — need to handle
9+
frozen objects from extension points logging of species chosen on desktop for
10+
example
11+
- Hot module reload breaks canvas features
12+
- Dockview move to right side not working — non-webgl bug
13+
14+
### P4.6 UI/UX Ideas (Unscoped)
15+
16+
- Should not shrink size on linked read resize height
17+
- Add ability where resize height does actual resize
18+
- Resize on double-click resize handle
19+
- Drag entire view to resize
20+
- Click isoform to expand all
21+
- Global scrollZoom setting rather than per view
22+
- Rolling average line plot
23+
- Zarr VCF support
24+
- Add legend for alignments
25+
- Distinguish initialized concepts in linear genome view
26+
27+
### P2.3 Synteny / Comparative Views
28+
29+
| Bug | Notes |
30+
| ----------------------------------------------------- | ------------------------------------------------------------------- |
31+
| Hs1 vs mm39 synteny — excessively slow, causes freeze | Improved (viewport culling added) — further LOD improvements needed |
32+
| Zoom to full not working? | **UNCLEAR** — needs verification |
33+
| Don't colorize indels not working? | **UNCLEAR** — needs verification |
34+
| Split indels code | Refactoring task |
35+
| Linked dotplot and synteny view | Idea / future feature |
36+
| Swap axes dotplot | Idea / future feature |
37+
| Swap axes linear synteny view | Idea / future feature |
38+
39+
### P4.2 R/ggplot2 Export System
40+
41+
**Status:** Very ambitious, branch exists with initial work.
42+
43+
- Design system to export session to R code generating ggplot images
44+
- Generic WebGL + ggplot2 system (very speculative)
45+
- Needs significant planning before implementation
46+
47+
### P4.4 Automatic Noisiness Scaling for Feature Frequency Thresholds
48+
49+
Compute a per-track noise estimate (e.g., mean insertion rate across sampled
50+
positions) during coverage computation and use it to automatically scale the
51+
`featureFrequencyThreshold` curve. Noisy long-read tracks (PacBio CLR) would get
52+
stricter thresholds while clean short-read tracks stay unchanged. The data is
53+
already available in `computePositionFrequencies`; main work is threading the
54+
stat through the RPC boundary and choosing a good baseline expected noise rate.
55+
56+
### P4.5 Option to Disable Sub-Pixel Feature Fade
57+
58+
Add a per-track option to disable the sub-pixel alpha fade that hides
59+
low-frequency features when zoomed out. High-quality reads (e.g., Illumina,
60+
PacBio HiFi) have very few sequencing errors, so most mismatches and insertions
61+
are real variants that users may want to see at all zoom levels regardless of
62+
frequency. When enabled, features would render at full opacity whenever they are
63+
present, bypassing both the zoom-based alpha and the frequency-based importance
64+
scaling.

agent-docs/PRD.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# JBrowse 2 WebGL/WebGPU Migration — Project Requirements Document
2+
3+
**Branch:** `webgl-poc` **Last updated:** 2026-03-17 **Status:** Active
4+
development — many features working, significant polish and testing needed
5+
6+
> **Note:** When items are completed, move them to `COMPLETED.md`.
7+
8+
---
9+
10+
## Executive Summary
11+
12+
JBrowse 2 is being migrated from its block-based HTML canvas rendering to a
13+
unified GPU-accelerated rendering pipeline supporting three backends:
14+
**WebGPU**, **WebGL 2.0**, and **HTML5 Canvas** (fallback + SVG export). The
15+
branch has working implementations for most track types with known bugs and gaps
16+
documented below.
17+
18+
---
19+
20+
## Priority 1 — Critical / Blocking
21+
22+
These issues block production readiness or affect the majority of users.
23+
24+
### P1.3 Expand Browser Test Suite
25+
26+
**Requirements:**
27+
28+
- WebGPU does not work on CI action runners — tests must work with WebGL and
29+
Canvas fallback
30+
31+
### P1.4 Demo Session Loading
32+
33+
- Many shared session links fail to load or load with incorrect settings. This
34+
is the primary way users encounter the app.
35+
36+
### Extra ideas
37+
38+
Make curvy breakpoint split view lines in the alignments track for link
39+
paired/supp reads
40+
41+
- Idea: The 'Link supplementary alignments has the concept of connecting reads
42+
using a single line. But, we have logic in breakpoint split view for properly
43+
linking the ORIENTATION of the reads using curved lines. evaluate whether we
44+
can do this in the Linked paired end/supplementary reads mode in the normal
45+
alignments track. If might be a separate mode from Link supplementary reads,
46+
like "Link paired/supp reads with curved lines"
47+
48+
## Priority 4 — Low / Future Enhancements
49+
50+
### P4.3 Loading old configs
51+
52+
- Ensure all old renderer configuration settings e.g. PileupRenderer (which were
53+
all effectively removed) are mapped to new display model settings (e.g. to
54+
LinearAlignmentsDisplay)
55+
56+
## Architecture Notes
57+
58+
### Current Rendering Backends
59+
60+
```
61+
┌─────────────────────────────────────────────┐
62+
│ Track Display Model │
63+
│ (prepares data, layout) │
64+
└──────────────┬──────────────────────────────┘
65+
66+
┌──────────┴──────────┐
67+
▼ ▼
68+
┌────────┐ ┌────────┐ ┌────────────┐
69+
│ WebGPU │ │WebGL2 │ │ Canvas 2D │ ← COMPLETE (all track types)
70+
│ (WGSL) │ │(GLSL) │ │ (fallback) │
71+
└────────┘ └────────┘ └────────────┘
72+
73+
┌────┴────┐
74+
▼ ▼
75+
┌────────┐ ┌───────┐
76+
│ Screen │ │ SVG │ (via SvgCanvas.ts)
77+
└────────┘ │Export │
78+
└───────┘
79+
```
80+
81+
### Backend Selection
82+
83+
- `?gpu=webgpu` — force WebGPU
84+
- `?gpu=webgl` — force WebGL2
85+
- `?gpu=off` — disable GPU (uses Canvas 2D fallback)
86+
- Default: auto-detect (WebGPU → WebGL2 → Canvas 2D)
87+
88+
### Test Infrastructure
89+
90+
- Puppeteer-based browser tests in `products/jbrowse-web/browser-tests/`
91+
- **21 test suites** with **~120 test cases** covering: alignments, bigwig,
92+
variants, synteny, dotplot, HiC, canvas2d-fallback (8 tests: features,
93+
multi-track, zoom, alignments+coverage, SNP coverage, arcs, sequence, wiggle),
94+
canvas2d-variants, rendering-backends (16 tests: VCF, GFF3, wiggle, BAM/CRAM
95+
pileup, SNP coverage, multi-wiggle, SV, JEXL, sequence, alignments+coverage,
96+
arcs, synteny LGV, synteny linear, dotplot), color-by-tag, wiggle-color,
97+
workspaces, session-spec, demo-inventory, svg-export, authentication,
98+
main-thread-rpc, custom-url, redraw, basic-lgv, misc
99+
- Screenshot comparison via pixelmatch (threshold 0.1)
100+
- Backend-specific golden snapshots in `__snapshots__/{webgl,webgpu,canvas2d}/`
101+
- `--backend=webgl|webgpu|canvas2d` flag, `--filter=` for running subsets
102+
- `compare-backends.ts` for cross-backend visual regression (categories:
103+
identical, similar <5%, different ≥5%)
104+
- Unit tests co-located with source (`*.test.ts`) using Jest with jsdom — **157
105+
tests across 15 suites** in modified plugins
106+
- Canvas 2D renderer unit tests use mock canvas context pattern (20 tests
107+
including picking)
108+
- Density-based feature limit unit tests (7 tests covering all threshold
109+
scenarios)
110+
- Strand swap coordinate tests (4 tests covering all strand×reversed
111+
combinations)
112+
- `copyView.renameIds()` unit tests (8 tests verifying ID uniqueness)
113+
- Fetch autorun tests include error recovery via `reload()` flow
114+
- Interbase indicator tests (7 tests for `computeNoncovCoverage` threshold
115+
logic, depth boundaries, dominant type selection)
116+
- Interbase frequency tests (6 tests for `computePositionFrequencies`
117+
edge/cliff/offset cases)
118+
- Depth-dependent threshold tests (2 tests for `applyDepthDependentThreshold`
119+
interbase mode)
120+
- `featureFrequencyThreshold` tests (5 tests covering step boundaries,
121+
interpolation, monotonicity)
122+
- Floating label regression test verifying description data stability across
123+
zoom levels
124+
- Browser test runner forwards `[alignments]` and `[webgl-wiggle]` console logs
125+
for debugging
126+
127+
## Next Steps
128+
129+
### Cross-Backend Testing
130+
131+
1. **Cross-backend visual regression**: Use `compare-backends.ts` to flag
132+
rendering differences between WebGL and Canvas2D for each track type

0 commit comments

Comments
 (0)