[Diagram Editor] Generate simpler operation IDs that express the operation
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 72
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Currently we automatically generate a unique ID for each operation using a full UUID. While this has the positive property of virtually guaranteeing uniqueness for all time, that's not the most useful property that we could have.
In practice, the operation ID is often used in error messages that a user might want to read and make sense of. In particular, it's used in help messages that give the user hints about what connections are valid.
Right now seeing the full auto-generated UUID in the help message is
- taking up too much space
- making it harder to read the help message
- making it hard to know which operation is being referred to in the message
There will never be so many operations in a diagram that we would need a full 128 bit UUID to ensure uniqueness. Instead we should generate shorter IDs that say something about the underlying operation in it. We can append a randomly generated 6-character alphanumeric key afterwards. For example:
- Fork Clone operation ->
clone_F7ABXC - Fork result operation ->
result_BCV89D - Node with an
addbuilder ->node_add_WD87DA - Script running an
executefunction ->script_execute_JI85ER
Indicating the type of operation gives instant context to the user, and using a 6-character code will be much easier for the user to recognize and track down the operation of interest.
In some cases an operation or choice of node builder may change, which would require us to update this ID to keep it consistent. Whenever a relevant operation property changes (e.g. the choice of node builder) we should automatically update the ID.
If a user manually types in an ID, then we should stop automatically generating the ID and stick with the one set by the user. If the user deletes their manually generated ID and leaves the ID field blank then we should go back to automatically generating them.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the diagram editor's operation-ID generation and the field that stores a user-entered ID. Trace which operation properties identify forks, results, node builders, and scripts, then check how those properties change. Done means generated IDs are readable, unique, refreshed when relevant properties change, and preserved when manually set until cleared.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100