Skip to content

feat: Bakta/GFF3 support, Center button, legend drag fix, reference annotations#6

Open
happykhan wants to merge 5 commits into
masterfrom
feat/bakta-gff3-center-legend-refannot
Open

feat: Bakta/GFF3 support, Center button, legend drag fix, reference annotations#6
happykhan wants to merge 5 commits into
masterfrom
feat/bakta-gff3-center-legend-refannot

Conversation

@happykhan
Copy link
Copy Markdown
Owner

Summary

  • Bakta support: Add .gbff to reference and annotation file inputs; add GFF3 feature import (.gff3/.gff) to AnnotationEditor with the same feature-type/text-filter UI as the existing GenBank import
  • Center button: New toolbar button that resets pan to origin without changing zoom level (sits alongside zoom in/out)
  • Legend drag fix: Legend drag was off because CSS-pixel deltas weren't scaled to the 1000×1000 logical canvas space — now correctly multiplied by 1000 / canvas.offsetWidth before moveLegend()
  • Reference annotation labels: CDS features are now extracted from GenBank reference files and rendered as arrows on the inner reference ring, with labels pointing inward via a new labelInward parameter on drawAnnotations

Test plan

  • Load a .gbff Bakta output as reference — GC ring appears, genome processes normally
  • Open AnnotationEditor → Import GFF3 Features → load a .gff3 file → annotations appear
  • Zoom in to 200%, click Center button → view centres without zoom changing
  • Drag a legend at zoom 2× — legend moves at correct speed, tracks cursor accurately
  • Load a .gbk reference with CDS features → CDS arrows visible on inner ring with labels

🤖 Generated with Claude Code

…nnotation rendering

- Add GFF3 feature import (.gff3/.gff) to AnnotationEditor with same
  feature-type/text-filter UI as GenBank import; add extractGFF3Features()
  to parser.worker.ts
- Add .gbff (Bakta GenBank flat file) to reference and annotation file
  accept attributes
- Add Center button to plot toolbar (resets pan, preserves zoom)
- Fix legend drag coordinate transform: CSS-px delta now correctly scaled
  to 1000×1000 logical space before passing to moveLegend()
- Render CDS features from GenBank reference files on the inner reference
  ring; labels point inward via new labelInward parameter on drawAnnotations

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 4, 2026

Deploying brigx with  Cloudflare Pages  Cloudflare Pages

Latest commit: c44f478
Status: ✅  Deploy successful!
Preview URL: https://0f8b2f1a.brigx.pages.dev
Branch Preview URL: https://feat-bakta-gff3-center-legen.brigx.pages.dev

View logs

happykhan and others added 4 commits April 4, 2026 11:08
- Move Save/Load Session from NavBar into a secondary tab-strip nav
  below the header, styled after RonaQC (--gx-bg-alt background,
  accent underline pattern)
- Rename ring 'Annotations' button to 'Custom Annotations' with a
  descriptive tooltip clarifying it's for per-ring region highlights /
  GenBank/GFF3 import overlays (not the reference annotation track)
- Replace catch(error: any) with catch(error) + instanceof Error guard
  in GenBank and GFF3 import handlers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add dist/ to ESLint ignores (was producing 14+ false-positive errors
  from compiled output)
- Add CI workflow (.github/workflows/ci.yml): type-check + lint + unit
  tests run on every PR and push to master
- Add SECURITY.md with vulnerability reporting contact and scope notes
- Fix all remaining catch(error: any) instances → catch(error) with
  instanceof Error guard (hooks/useBRIGController, lib/controller,
  workers/alignment.worker, workers/parser.worker)
- Remove dead code: unused private methods parseGenome/mergeGenomes in
  controller.ts, unused getColorForIdentity in renderer.ts
- Remove unused React import from ErrorBoundary (not needed with new JSX
  transform)
- Add tsconfig strict flags: noUnusedLocals, noUnusedParameters,
  noImplicitReturns, noFallthroughCasesInSwitch
- Clean up test files to satisfy new strict flags: remove dead
  cachedPlotData declaration, add assertions for psk57/sap014a loads,
  remove unused CircularPlotData import

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Project uses pixi for environment management. Replace npm ci (requires
lock file) with pixi + npm install.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant