fix(variables): display name rendering#1915
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryThis PR implements display name rendering for variable assignments in workflow nodes by hydrating variable IDs to their human-readable names. Key Changes:
Critical Issue Found: Other Concerns: Confidence Score: 2/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant VariablesInput
participant Select
participant VariablesStore
participant WorkflowBlock
User->>VariablesInput: Select variable from dropdown
VariablesInput->>VariablesInput: getVariableDisplayName(assignment)
alt has variableName
VariablesInput-->>Select: Display variableName
else has variableId
VariablesInput->>VariablesStore: Find variable by ID
VariablesStore-->>VariablesInput: Return variable.name
VariablesInput-->>Select: Display variable.name
else no value
VariablesInput-->>Select: Display "Select a variable..."
end
User->>WorkflowBlock: View variable assignments in node
WorkflowBlock->>WorkflowBlock: Check if subBlock type is variables-input
WorkflowBlock->>VariablesStore: getState().variables (snapshot)
Note over WorkflowBlock,VariablesStore: Issue: getState() doesn't subscribe to updates
WorkflowBlock->>WorkflowBlock: Filter by workflowId
WorkflowBlock->>WorkflowBlock: Map assignments to display names
WorkflowBlock-->>User: Display formatted variable names
|
...el-new/components/editor/components/sub-block/components/variables-input/variables-input.tsx
Outdated
Show resolved
Hide resolved
.../sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/workflow-block.tsx
Outdated
Show resolved
Hide resolved
* fix(variables): display name rendering * cleanup * cleanup more code
* fix(variables): display name rendering * cleanup * cleanup more code
Summary
Variables preview in the node.
Type of Change
Testing
Tested manually
Checklist