Skip to content

Move export validation from backend errors to frontend warnings#415

Merged
cjmyers merged 5 commits intofinalfrom
pr/export-validation
Apr 8, 2026
Merged

Move export validation from backend errors to frontend warnings#415
cjmyers merged 5 commits intofinalfrom
pr/export-validation

Conversation

@travisformayor
Copy link
Copy Markdown
Contributor

Export errors during auto-save created a stream of toast notifications in SynBioSuite.

  • Backend (MxToSBML.java, MxToSBOL.java) skips incomplete elements (missing promoters, disconnected edges, null species) and logs to stderr instead of throwing
  • Frontend ProblemsComponent checks for the same conditions and shows warnings in the Problems dropdown
  • Removed error postMessage from auto-export sending all the toast notifications to SynBioSuite
  • Fixed setInterval leak in ProblemsComponent, timer was never cleared on destroy
  • Fixed SBML parameter names from kr_f_<id> to kr_<id>_f to match iBioSim
  • Reduced SBML auto-export debounce from 2000ms to 1000ms

@github-actions
Copy link
Copy Markdown

Azure Static Web Apps: Your stage site is ready! Visit it here: https://blue-flower-0c36fd81e-415.westus2.5.azurestaticapps.net

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Moves export-time validation from backend exceptions/toast notifications into frontend “Problems” warnings to reduce noisy autosave UX, while keeping exports best-effort.

Changes:

  • Frontend: add SBML/SBOL export validation warnings in ProblemsComponent and fix its interval cleanup.
  • Frontend: stop posting auto-export errors to the embedded parent and reduce SBML debounce to 1000ms.
  • Backend: make SBOL/SBML exporters skip incomplete/invalid elements instead of throwing; adjust SBML parameter naming to match iBioSim.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
SBOLCanvasFrontend/src/app/problems/problems.component.ts Adds new validation checks + clears the validation timer on destroy.
SBOLCanvasFrontend/src/app/graph.service.ts Removes embedded error postMessage calls and reduces SBML debounce interval.
SBOLCanvasFrontend/src/app/graph-helpers.ts Exposes event/interaction dict accessors publicly for UI validation.
SBOLCanvasBackend/src/utils/MxToSBOL.java Wraps SBOL export steps in try/catch to skip invalid elements and warn to stderr.
SBOLCanvasBackend/src/utils/MxToSBML.java Skips invalid SBML constructs instead of throwing; renames parameters; adjusts error handling behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Azure Static Web Apps: Your stage site is ready! Visit it here: https://blue-flower-0c36fd81e-415.westus2.5.azurestaticapps.net

@travisformayor
Copy link
Copy Markdown
Contributor Author

export validation now produces frontend warnings

sbml-warnings

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Azure Static Web Apps: Your stage site is ready! Visit it here: https://blue-flower-0c36fd81e-415.westus2.5.azurestaticapps.net

@travisformayor travisformayor marked this pull request as ready for review April 7, 2026 22:36
@travisformayor travisformayor requested a review from cjmyers April 7, 2026 22:37
@cjmyers cjmyers merged commit 787c251 into final Apr 8, 2026
4 checks passed
@cjmyers cjmyers deleted the pr/export-validation branch April 8, 2026 23:29
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.

3 participants