You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before committing to an edit surface, investigate what a node edit actually looks like and what it must not allow . options, for example:
(A) Edit the node's SOURCE block - the side panel's read-only yaml.dump(task) block (NodeDetailsView.tsx) made editable. Free-form and uniform across task types, but the user can type anything - including adding / removing / reordering child steps and other structural changes must forbid (that's Milestone 3). Hard to constrain a free-text YAML editor.
(B) Edit the rendered Properties - the flattened rows the panel builds via getTaskDetails() → DetailField[](core/taskDetails.ts). Structured and naturally constrainable (expose only editable fields), but those rows are lossy display-only today: arrays render as a count, objects past depth 4 render {...}, metadata is dropped - so the current flatten may not allow full edits. Property-editing would mean reworking what getTaskDetails / NodeDetailsView render into an editable, structured form.
Add comments to this ticket and discuss with team
Motivation
The whole milestone hinges on this choice, and each surface has a real cost. Source-editing is easy to render but hard to constrain (structural edits leak in); property-editing is easy to constrain but needs the side panel's read-only rows rebuilt. We need the field inventory + restriction rules
Proposed Implementation
No response
Definition of Done
Implementation: Fully implemented according to the Serverless Workflow spec.
Unit Tests: Comprehensive unit tests are included and passing.
Integration Tests: Verified within the monorepo and target environments (Web/VS Code).
Documentation: Updated README.md, ADRs, or official docs.
Performance: No significant regression in editor responsiveness.
Accessibility: UI changes comply with accessibility standards.
This preserves enough information to update the original task safely.
Current Limitations of getTaskDetails()
Current flattening intentionally sacrifices fidelity for readability.
Feature
Current Behaviour
Arrays
Rendered as item count
Objects past depth 4
Rendered as {...}
Metadata
Removed
Nested objects
Flattened
Original values
Not always preserved
Reconstruction
Not possible
This makes the Properties panel excellent for inspection but insufficient for editing.
Comparison
Area
Approach A (YAML)
Approach B (Properties)
Initial implementation
Easy
Medium
Restrict editable fields
Difficult
Easy
Prevent structural edits
Very difficult
Natural
Validation
Complex
Simple
Invalid syntax possible
Yes
No
Invalid workflow possible
High
Low
Full task fidelity
Yes
No (currently)
Requires redesign
No
Yes
Long-term maintainability
Lower
Higher
User friendliness
Medium
High
Recommendation
Based on the current implementation and the milestone requirements, Approach B (Editable Properties) appears to be the stronger long-term solution.
Although it requires redesigning getTaskDetails() and the DetailField model to preserve editable information, it naturally enforces the milestone requirement of preventing structural workflow changes by exposing only supported fields.
Approach A offers a quick path to editable YAML and preserves the full task representation, but enforcing restrictions such as preventing users from adding, removing, or reordering child steps would require substantial parsing, validation, and structural diffing logic. This increases implementation complexity and introduces a greater risk of invalid workflow definitions.
A future editable Properties model could evolve from a display-only representation into a richer structured model that retains value types, editability, and validation metadata, allowing safe round-trip editing while keeping workflow structure protected.
Thanks for the detailed write-up @kumaradityaraj. I agree that Approach B is the way to go.
I don't think the UX of editing YAML directly in the diagram editor sidepanel will be great, especially since people will also have the option of using the dual view and editing YAML from there - we'd most likely need intellisense in the YAML block too for it to be reasonably user-friendly. Without that, it basically results in a worse UX than just using the dual viewer and writing YAML there. Approach B lets us better control and improve UX for the user going forward
And yes, Approach A basically means we'll have to introduce a structural diff engine later, which isn't great. I think some of the "disadvantages" of Approach B are really about the current implementation rather than the approach itself - currently read only, fidelity loss and round-trip complexity aren't necessarily disadvantages, just things we need to address in the implementation.
Essentially, Approach B requires more implementation work right now to get editing working - so it's short-term loss versus long-term gain. Whereas I think Approach A will just get more and more complex very quickly as we move forward and isnt really viable from a UX perspective IMO
Activity
kumaradityaraj commentedon Jul 22, 2026
Investigation: Node Editing Surface
Overview
This document evaluates two possible approaches for enabling node editing in the side panel:
The goal is to determine which approach best supports future node editing while preventing structural workflow modifications (Milestone 3).
Current Implementation
NodeDetailsViewcurrently renders two independent representations of a task.These two views are completely independent.
Current Properties View
The Properties section is generated using:
Each field is represented by:
The task is recursively flattened into dot-notation paths.
Example:
Input:
becomes
Nested objects are flattened until
MAX_DEPTH.Arrays are summarized only by their count.
Objects deeper than
MAX_DEPTHare replaced with:Metadata is intentionally omitted.
Current Source View
The Source section is generated using
and rendered inside
The YAML is currently read-only.
This view always represents the complete task.
No information is lost.
Approach A – Editable YAML
Description
Convert the existing YAML source block into an editable editor.
Instead of
the user would edit
directly.
Advantages
1. Minimal implementation effort
Most of the existing implementation already exists.
Only the editor changes from read-only to editable.
2. Full fidelity
The YAML contains the complete task.
Nothing is lost.
Every property can be edited.
3. Uniform across task types
No task-specific UI is required.
Every task already has YAML.
4. Future-proof
New DSL fields automatically become editable without updating the UI.
Disadvantages
1. Cannot naturally restrict edits
The user can modify anything.
Examples:
can become
This violates Milestone 3.
2. Structural workflow changes are difficult to prevent
The ticket explicitly states that users must not be able to
With free-form YAML this is extremely difficult.
Preventing this would require:
Essentially a structural diff engine.
3. Invalid YAML
Users can create malformed YAML.
Example
The editor must continuously detect and recover from syntax errors.
4. Invalid workflow schema
Even valid YAML may produce an invalid workflow.
Example
inside a task that should remain an action task.
Additional schema validation would be required.
5. Difficult user experience
Errors become harder to explain.
Example:
The editor must explain exactly what changed.
6. High implementation complexity
Although enabling editing is simple, enforcing restrictions is not.
Most complexity moves into validation and change detection.
Approach B – Editable Properties
Description
Instead of editing YAML, allow editing of the rendered Properties section.
Current
could become
Each property becomes an appropriate input component.
Advantages
1. Natural restriction of editable fields
Only exposed properties are editable.
Workflow structure is never shown.
Users cannot accidentally modify
2. Easier validation
Each field can be validated individually.
Examples
expects
rather than arbitrary text.
3. Better user experience
Most users edit individual properties rather than raw YAML.
Forms also allow:
4. Safer editing
Only supported fields are writable.
Everything else remains internal.
5. Aligns with Milestone 3
Because structural fields are never exposed, users cannot perform forbidden edits.
No structural diffing is required.
Disadvantages
1. Current implementation is display-only
Today's implementation loses information.
Arrays become
instead of
Objects become
instead of
Metadata is omitted entirely.
2. DetailField is insufficient for editing
Current model
contains only display information.
It does not preserve
3. Round-trip editing is impossible today
Current pipeline
cannot reconstruct
again.
Information is discarded during flattening.
4. Requires redesign
Supporting editing likely requires a richer model.
Example
This preserves enough information to update the original task safely.
Current Limitations of getTaskDetails()
Current flattening intentionally sacrifices fidelity for readability.
{...}This makes the Properties panel excellent for inspection but insufficient for editing.
Comparison
Recommendation
Based on the current implementation and the milestone requirements, Approach B (Editable Properties) appears to be the stronger long-term solution.
Although it requires redesigning
getTaskDetails()and theDetailFieldmodel to preserve editable information, it naturally enforces the milestone requirement of preventing structural workflow changes by exposing only supported fields.Approach A offers a quick path to editable YAML and preserves the full task representation, but enforcing restrictions such as preventing users from adding, removing, or reordering child steps would require substantial parsing, validation, and structural diffing logic. This increases implementation complexity and introduces a greater risk of invalid workflow definitions.
A future editable Properties model could evolve from a display-only representation into a richer structured model that retains value types, editability, and validation metadata, allowing safe round-trip editing while keeping workflow structure protected.
kumaradityaraj commentedon Jul 22, 2026
@lornakelly @fantonangeli @handreyrc @cheryl7114
lornakelly commentedon Jul 22, 2026
Thanks for the detailed write-up @kumaradityaraj. I agree that Approach B is the way to go.
I don't think the UX of editing YAML directly in the diagram editor sidepanel will be great, especially since people will also have the option of using the dual view and editing YAML from there - we'd most likely need intellisense in the YAML block too for it to be reasonably user-friendly. Without that, it basically results in a worse UX than just using the dual viewer and writing YAML there. Approach B lets us better control and improve UX for the user going forward
And yes, Approach A basically means we'll have to introduce a structural diff engine later, which isn't great. I think some of the "disadvantages" of Approach B are really about the current implementation rather than the approach itself - currently read only, fidelity loss and round-trip complexity aren't necessarily disadvantages, just things we need to address in the implementation.
Essentially, Approach B requires more implementation work right now to get editing working - so it's short-term loss versus long-term gain. Whereas I think Approach A will just get more and more complex very quickly as we move forward and isnt really viable from a UX perspective IMO
lornakelly commentedon Jul 24, 2026
Reviewed with team and in agreement for Approach B