Skip to content

Conversation

@millenr
Copy link
Contributor

@millenr millenr commented Jan 14, 2026

This pull request introduces significant improvements to how synthesis graphs and routes are sent to Cytoscape from the backend, along with a minor frontend update to maintain compatibility. The backend now supports sending all routes and full graphs as separate networks in a single request (multi-network mode), with robust auto-detection and naming logic for graphs and routes. The frontend is updated to explicitly request single-route mode to preserve previous behavior for UI actions.

Backend: Enhanced Cytoscape Network Upload Logic

  • Added support for sending all available synthesis graphs and all routes as separate networks in one request, including improved error handling and results aggregation. [1] [2]
  • Improved graph selection logic in convert_to_cytoscape_json to auto-detect the appropriate synthesis graph, falling back through multiple keys if needed.
  • Refined the naming logic for Cytoscape networks to use target molecule identifiers and reaction steps, with clear differentiation between full graphs and routes.
  • Extracted network upload and layout logic into a helper function for clarity and reuse, and improved error reporting for failures. [1] [2] [3]

Frontend: Compatibility Update

  • Updated the sendToCytoscape helper to explicitly set send_all_routes=false, ensuring single-route upload behavior for UI actions remains unchanged.

@millenr millenr requested a review from Jeyaraman January 14, 2026 14:35
millenr and others added 4 commits January 14, 2026 09:37
…rough an exception

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…rough an exception

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…rough an exception

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…rough an exception

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@Jeyaraman Jeyaraman merged commit 5d7608f into main Jan 15, 2026
1 of 15 checks passed
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