Skip to content

Stable element IDs instead of indexes in the graph #1821

Description

@0HyperCube

In order to apply the Path node's vector modification on Table<Graphic> data, it is necessary to be able to identify which row it targets.

We could do this by index (e.g. modification to row 3 within the graphic table). However @Keavon wants to allow nodes to rearrange the table rows without impacting the result.

In order to do this, each row will have an id assigned when creating it. Nodes will be able to get their own id by having the input TaggedValue::MyNodeId (which would be populated during graph pre-processing). In order to avoid cutting and pasting changing the node id (as it does currently) some more logic to check if no such id exists will be added.

Each graphic table must contain unique ids. It is the job of the constructing node to enforce this (e.g. incrementing one of the ids to avoid collision).

Activity

  1. added
    ArchitectureInvolves architecture or engineering work or discussion
    GrapheneInvolves the node graph system/engine used by Graphite
    on Jul 13, 2024
  2. changed the title [-]Stable vector data ids in the graph[/-] [+]Stable vector data IDs in the graph[/+] on Jul 15, 2024
  3. adamgerhant commented on Oct 17, 2024

    @adamgerhant
    Collaborator

    This is implemented in impl crate::vector::ConcatElement for super::VectorData and pub fn vector_new_ids_from_hash. The Flatten Vector Elements node uses .concat, where the vector data ids are generated from the hash of the input vector id and layer NodeId which that vector passes through. vector_new_ids_from_hash is used by the repeat nodes and follows a similar concept. A better method could be created that does not rely on the layer ids, maybe the Path node id can be used instead.

  4. changed the title [-]Stable vector data IDs in the graph[/-] [+]Stable vector row IDs instead of indexes in the graph[/+] on Aug 6, 2025
  5. changed the title [-]Stable vector row IDs instead of indexes in the graph[/-] [+]Stable table row IDs instead of indexes in the graph[/+] on Aug 6, 2025
  6. changed the title [-]Stable table row IDs instead of indexes in the graph[/-] [+]Stable element IDs instead of indexes in the graph[/+] on Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ArchitectureInvolves architecture or engineering work or discussionGrapheneInvolves the node graph system/engine used by Graphite

    Projects

    • Status
      Short-Term

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions