Skip to content

Broken diagram link - #2766

Open
AbbyGavin wants to merge 11 commits into
seek4science:seek-1.19from
AbbyGavin:broken-diagram-link
Open

AbbyGavin wants to merge 11 commits into
seek4science:seek-1.19from
AbbyGavin:broken-diagram-link

Conversation

@AbbyGavin

Copy link
Copy Markdown
Contributor

Fixes #470

Displays a more useful message than a broken image link if the image doesn't actually exist. The only way I could get it to appear is if the CWL diagram wasn't parsable. I've added a message for that, but other cases could easily have a message added.

image

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Failed CWL rendering triggers extraction twice in the same request, repeating costly external commands instead of reusing the original generation outcome.

1 open issue
What changed in this PR

This PR addresses #470 by showing a warning instead of a broken image when a workflow diagram is unavailable, with a specific message for CWL generation errors.

Changes:

  • Adds diagram-error reporting through the workflow model and extractors.
  • Displays fallback warnings on the workflow page.
  • Adds rendering tests and a malformed CWL fixture.
File Description
test/​functional/​workflows_controller_test.rb Tests SVG, non-SVG, and failed-generation displays.
test/​fixtures/​files/​workflows/​rp2/​workflows/​broken_cwl.cwl Adds malformed CWL input.
test/​factories/​workflows.rb Adds a workflow factory for diagram failures.
test/​factories/​content_blobs.rb Adds a content-blob factory using malformed CWL.
lib/​seek/​workflow_extractors/​rolike.rb Delegates error checks to the applicable extractor.
lib/​seek/​workflow_extractors/​rocrate.rb Wraps error checks in crate access.
lib/​seek/​workflow_extractors/​cwl.rb Separates diagram extraction and adds error detection.
lib/​seek/​workflow_extractors/​base.rb Defines the default diagram-error predicate.
app/​views/​workflows/​show.html.erb Shows warnings when no diagram is available.
app/​models/​concerns/​workflow_extraction.rb Exposes the extractor’s error check to the view.

Review effort: Balanced

Comment thread lib/seek/workflow_extractors/cwl.rb Resolved
@stuzart stuzart added this to the 1.19.0 milestone Oct 29, 2026
@stuzart
stuzart changed the base branch from main to seek-1.19 October 29, 2026 11:27

This branch has not been deployed

No deployments
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.

Diagram generation error shows broken image icon instead of error message/notice

3 participants