Skip to content

Color links red when they are connected to non-imported task - #35

Merged
loichuder merged 1 commit into
add-missing-portsfrom
import-error-links
Oct 8, 2026
Merged

loichuder merged 1 commit into
add-missing-portsfrom
import-error-links

Conversation

@loichuder

@loichuder loichuder commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

PR summary

workflow1 json

The idea is to generate a dict of task_id: import_error and to propagate it down to the SVG creation of the link (build_svg_link_group). Unfortunately, at this point, the task_id is contained in the edge id under the form {task_id}.[input|output].{port_name}.

To retrieve it, we have to parse this edge id, adding some implicit coupling with the edge id creation. I plan to fix this in the next PR.

AI Disclosure

  • Claude generated the solution that I reviewed and refactored manually

@loichuder
loichuder added this pull request to stack #36 September 15, 2026 07:42
@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/ewoksdraw/layout/elk_link_group_builder.py 88.88% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Comment on lines +138 to +140
@property
def import_error(self) -> bool:
return self._box.get_attr("data-import-error") is not None

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is how we expose the import error from SvgTask so that SvgTaskGroup can generate the dict of import errors.

Comment on lines +40 to +41
# FIXME:
source_task_id = edge["sources"][0].split(".output.")[0]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

As a mentionned in the PR description, there is implicit coupling added here that we will have to fix.

@loichuder loichuder mentioned this pull request Sep 15, 2026
1 task done

@LudoBroche LudoBroche left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I found no issue; it's good to merge

@loichuder
loichuder merged commit cabcdc7 into main Oct 8, 2026
5 checks passed
@loichuder
loichuder deleted the import-error-links branch October 8, 2026 06:39
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