Skip to content

Adapt to model and backend changes#563

Merged
manulera merged 10 commits into
masterfrom
issue-562
Dec 10, 2025
Merged

Adapt to model and backend changes#563
manulera merged 10 commits into
masterfrom
issue-562

Conversation

@manulera
Copy link
Copy Markdown
Collaborator

@manulera manulera commented Dec 9, 2025

Issue #562


Note

Update frontend to use repository_id/coordinates-based source schema with new repository metadata, add strict URL param validation for genome coordinates, and refresh tests and example files.

  • Frontend:
    • Schema migration: Switch sources to repository_id + coordinates (e.g., formatSequenceLocationString) instead of sequence_accession/start/end/strand; remove repository_name usage.
    • Repository abstraction: Add repositoryMetadata and refactor repository UI to use source type (e.g., NCBISequenceSource, AddgeneIdSource); update request endpoints to use slugs.
    • Genome coordinates:
      • Validate URL params (numeric start/end, strand ∈ {1, -1}, start>0, `end>start}); show specific error alerts.
      • New GenomeCoordinatesMessage rendering using coordinates and repository_id.
    • Manually typed source: Change POST payload to nested { source, sequence } structure.
    • Utilities: Add formatSequenceLocationString helper.
  • Tests (Cypress):
    • Add/adjust checks for genome coordinate URL errors and display (.. formatting; strand validation); update alert selector path.
  • Examples/Data:
    • Bump schema_version to 0.4.9 and update example JSONs to new fields (repository_id, coordinates); remove repository_name entries and update SnapGene/GenBank fields accordingly.

Written by Cursor Bugbot for commit ea0e120. This will update automatically on new commits. Configure here.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on January 1

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Comment thread src/components/sources/FinishedSource.jsx Outdated
Comment thread src/components/sources/SourceRepositoryId.jsx
Comment thread src/components/sources/FinishedSource.jsx
Comment thread src/components/sources/FinishedSource.jsx
@manulera
Copy link
Copy Markdown
Collaborator Author

manulera commented Dec 9, 2025

Related to OpenCloning/OpenCloning_backend#383

Comment thread src/App.jsx
end,
strand,
repository_id: sequence_accession,
coordinates: formatSequenceLocationString(start, end, strand),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: URL strand parameter not converted to number before comparison

The strand value from URL parameters is a string (e.g., '-1' or '1'), but formatSequenceLocationString compares it against the number -1 with strict equality. Since '-1' !== -1, the complement format will never be generated for negative strand sequences loaded from URL parameters. The strand value needs to be converted to a number (e.g., Number(strand)) before being passed to formatSequenceLocationString.

Fix in Cursor Fix in Web

@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.39%. Comparing base (92e27aa) to head (ea0e120).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #563      +/-   ##
==========================================
+ Coverage   82.32%   82.39%   +0.06%     
==========================================
  Files         176      177       +1     
  Lines        6157     6181      +24     
  Branches     1319     1328       +9     
==========================================
+ Hits         5069     5093      +24     
  Misses       1088     1088              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread src/utils/other.js
@manulera manulera merged commit b292322 into master Dec 10, 2025
28 checks passed
@manulera manulera deleted the issue-562 branch December 10, 2025 14:24
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