-
Notifications
You must be signed in to change notification settings - Fork 3.1k
fix(variables): display name rendering #1915
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 files reviewed, 2 comments
...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