Skip to content

Add flowIn/flowOut Flow attribute pins to every node, displayed in the node header#3048

Open
Copilot wants to merge 15 commits into
developfrom
copilot/add-flow-attribute-type
Open

Add flowIn/flowOut Flow attribute pins to every node, displayed in the node header#3048
Copilot wants to merge 15 commits into
developfrom
copilot/add-flow-attribute-type

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 18, 2026

Add the a connection pin in the node's header, to force a flow evaluation, when nodes are not naturally connected by their attributes
Screenshot_2026-05-05_09-42-25

Flow attributes are internal attributes:
Screenshot_2026-05-05_09-44-14

  • Rename FlowAttributeFlow in desc/attribute.py and attribute.py (+ backward-compat alias)
  • Update all imports, isinstance checks, comments, and QML type strings to use "Flow"
  • Move flow input/output attrs from _attributes to _internalAttributes in node.py
  • Update node.py _applyExpr() to also iterate over _internalAttributes
  • Fix attribute.py _applyExpr() to search _internalAttributes when looking for source attr
  • Update QML Node.qml to use internalAttribute()/hasInternalAttribute() for flowIn/flowOut
  • Update nodeFactory.py compatibility checks to account for flow attrs in internalInputs
  • Remove if v is not None filter from outputs in toDict()
  • Update tests (test_flowAttribute.py, test_compatibility.py, test_pipeline.py)
  • All 257 backend tests pass, CodeQL: 0 alerts

💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Copilot AI changed the title [WIP] Add new attribute type named Flow Add FlowAttribute type for no-data node dependency edges Mar 18, 2026
Copilot AI requested a review from fabiencastan March 18, 2026 21:19
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 18, 2026

Codecov Report

❌ Patch coverage is 96.15385% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.30%. Comparing base (a33c099) to head (26e4a54).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
meshroom/core/attribute.py 77.77% 4 Missing ⚠️
meshroom/core/nodeFactory.py 87.50% 3 Missing ⚠️
meshroom/core/graph.py 71.42% 2 Missing ⚠️
meshroom/core/node.py 92.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3048      +/-   ##
===========================================
+ Coverage    83.98%   84.30%   +0.32%     
===========================================
  Files           83       84       +1     
  Lines        10829    11101     +272     
===========================================
+ Hits          9095     9359     +264     
- Misses        1734     1742       +8     

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI changed the title Add FlowAttribute type for no-data node dependency edges Add FlowAttribute type and automatic flowIn/flowOut pins on every node Mar 18, 2026
Copilot AI changed the title Add FlowAttribute type and automatic flowIn/flowOut pins on every node Add flowIn/flowOut Flow attribute pins to every node, displayed in the node header Mar 18, 2026
Comment thread tests/test_flowAttribute.py Fixed
@nicolas-lambert-tc nicolas-lambert-tc marked this pull request as ready for review May 5, 2026 07:19
Copilot AI review requested due to automatic review settings May 5, 2026 07:19
Copy link
Copy Markdown
Contributor

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

This PR adds automatic flowIn/flowOut pins to nodes and moves those flow attributes into internalAttributes so they can be shown in the node header while remaining separate from normal data attributes.

Changes:

  • Introduces Flow/FlowAttribute descriptor/runtime classes and auto-injects internal flow input/output attrs on nodes.
  • Updates serialization, expression application, compatibility checks, and UI command lookup to account for internal flow attrs.
  • Updates QML node rendering and backend tests for the new flow-pin behavior.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/test_pipeline.py Adjusts pipeline test to ignore Flow outputs in attribute iteration.
tests/test_flowAttribute.py Adds coverage for Flow descriptor behavior, linking, and graph serialization.
tests/test_compatibility.py Extends compatibility expectations for internal flow attrs.
meshroom/ui/qml/GraphEditor/Node.qml Moves flow pins into the node header and filters them from regular attribute lists.
meshroom/ui/qml/GraphEditor/AttributePin.qml Adds compact pin mode for header rendering.
meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml Handles Flow attrs as non-data UI elements.
meshroom/ui/commands.py Resolves edge commands against regular or internal attributes.
meshroom/core/nodeFactory.py Updates compatibility/name checks for internal flow serialization.
meshroom/core/node.py Applies expressions to internal attrs and auto-creates internal flow pins.
meshroom/core/desc/node.py Defines internal flow attrs on node descriptors.
meshroom/core/desc/attribute.py Adds the Flow descriptor class and alias.
meshroom/core/desc/init.py Re-exports Flow and FlowAttribute.
meshroom/core/attribute.py Resolves link expressions against internal attrs and adds runtime Flow.

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

Comment thread meshroom/core/node.py
Comment on lines +1049 to +1050
for attr in self._internalAttributes:
attr._applyExpr()
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.

yes indeed there's a problem here

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.

but deleting these lines is even worse

Comment thread meshroom/core/node.py
Comment on lines +2228 to +2237
existingAttrNames = set(self._attributes.keys())
for attrDesc in self.nodeDesc.internalFlowInputs:
if attrDesc.name not in existingAttrNames:
self._internalAttributes.add(attributeFactory(attrDesc, kwargs.get(attrDesc.name, None),
isOutput=False, node=self))

for attrDesc in self.nodeDesc.internalFlowOutputs:
if attrDesc.name not in existingAttrNames:
self._internalAttributes.add(attributeFactory(attrDesc, kwargs.get(attrDesc.name, None),
isOutput=True, node=self))
Comment thread meshroom/ui/qml/GraphEditor/Node.qml
@Alxiice Alxiice force-pushed the copilot/add-flow-attribute-type branch from 16ba3f8 to 1f78ac2 Compare May 5, 2026 08:12
Comment thread meshroom/core/desc/attribute.py Outdated
@Alxiice
Copy link
Copy Markdown
Contributor

Alxiice commented May 5, 2026

Peek 2026-05-05 22-35 Here is a gif a bit more detailed to show some functionnalities :
  • the input flow can be connected to multiple outputs
  • here the flow invalidates the node. Note that I finally decided remove it (because this would switch to compatibility mode all nodes in existing pipelines). This is up to discussion but I think it's better for the flow not to invalidate the node.
  • the serialization works well, and the flow is only serialized if not empty

@Alxiice Alxiice self-requested a review May 5, 2026 20:43
@Alxiice Alxiice force-pushed the copilot/add-flow-attribute-type branch from db3b9b3 to ed9cbc3 Compare May 6, 2026 10:20
@fabiencastan fabiencastan added this to the Meshroom 2026.1.0 milestone May 8, 2026
@fabiencastan fabiencastan added the feature new feature (proposed as PR or issue planned by dev) label May 8, 2026
@Alxiice Alxiice force-pushed the copilot/add-flow-attribute-type branch from ed9cbc3 to 6d64695 Compare May 11, 2026 10:19
@Alxiice Alxiice force-pushed the copilot/add-flow-attribute-type branch from 6d64695 to 9872cc0 Compare May 12, 2026 13:23
Comment thread meshroom/core/node.py Outdated
Copy link
Copy Markdown
Contributor

@Alxiice Alxiice left a comment

Choose a reason for hiding this comment

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

There are behaviours that still doesn't work :

  • copy node with flow connection -> the connection is somewhat restored but the UI fails to recreate it
  • delete/recreate connection : also fails

@Alxiice Alxiice force-pushed the copilot/add-flow-attribute-type branch 2 times, most recently from 42983e2 to 30924cf Compare May 15, 2026 16:13
Copilot AI and others added 15 commits May 18, 2026 14:13
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
@Alxiice Alxiice force-pushed the copilot/add-flow-attribute-type branch from e9e940a to 26e4a54 Compare May 18, 2026 12:14
@Alxiice Alxiice self-requested a review May 18, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature new feature (proposed as PR or issue planned by dev)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants