feat: Add selected node details to sidebar#168
Open
lornakelly wants to merge 1 commit into
Open
Conversation
✅ Deploy Preview for swf-editor ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds node selection support to the diagram editor and surfaces selected node task details in the right-hand SidePanel (including flattened task properties and a JSON source view).
Changes:
- Extend
DiagramEditorContextto trackselectedNodeId, update it from React Flow selection, and clear it when workflow content changes. - Introduce
getTaskDetails()to flatten SWF task fields for display, plus a newNodeDetailsViewUI and shared SidePanel field components. - Update SidePanel header/content to switch between workflow info and selected node details; add i18n strings and styling.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/serverless-workflow-diagram-editor/tests/test-utils/render-helpers.tsx | Extends mocked context with selectedNodeId + setter for tests. |
| packages/serverless-workflow-diagram-editor/tests/store/DiagramEditorContextProvider.test.tsx | Adds coverage for clearing selection when content changes. |
| packages/serverless-workflow-diagram-editor/tests/side-panel/NodeDetailsView.test.tsx | Adds tests for rendering flattened task properties and source JSON. |
| packages/serverless-workflow-diagram-editor/tests/core/taskDetails.test.ts | Adds unit tests for the new task-flattening logic. |
| packages/serverless-workflow-diagram-editor/src/store/DiagramEditorContextProvider.tsx | Stores selection in context and resets it when the model changes. |
| packages/serverless-workflow-diagram-editor/src/store/DiagramEditorContext.tsx | Adds selectedNodeId and setSelectedNodeId to context type. |
| packages/serverless-workflow-diagram-editor/src/side-panel/WorkflowInfoView.tsx | Refactors shared field components into Fields.tsx. |
| packages/serverless-workflow-diagram-editor/src/side-panel/SidePanel.tsx | Renders node details when a node is selected; updates header icon/title/subtitle and auto-opens on selection. |
| packages/serverless-workflow-diagram-editor/src/side-panel/SidePanel.css | Adds styling for property rows, JSON section, and colored node icon wrapper. |
| packages/serverless-workflow-diagram-editor/src/side-panel/NodeDetailsView.tsx | New view that renders flattened task properties + a Source JSON section. |
| packages/serverless-workflow-diagram-editor/src/side-panel/Fields.tsx | New shared components for SidePanel field rendering and JSON collapsible block. |
| packages/serverless-workflow-diagram-editor/src/react-flow/diagram/Diagram.tsx | Wires React Flow selection changes into selectedNodeId. |
| packages/serverless-workflow-diagram-editor/src/i18n/locales/en.ts | Adds new sidebar translation keys for node/details UI. |
| packages/serverless-workflow-diagram-editor/src/core/taskDetails.ts | Implements task flattening into displayable detail fields. |
| packages/serverless-workflow-diagram-editor/src/core/index.ts | Exports the new taskDetails module. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a81c447 to
21d1360
Compare
21d1360 to
a29e5aa
Compare
a29e5aa to
8793622
Compare
Signed-off-by: lornakelly <lornakelly88@gmail.com>
8793622 to
2953065
Compare
fantonangeli
approved these changes
Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #101
Summary
Selecting a node opens the side panel and renders that task's details, changing selection updates the content and deselecting returns the panel to the workflow info state
Changes
taskDetailsto flatten task into dot-notation and expand nested objects up toMAX_DEPTHNodeDetailsViewto sidepanelselectedNodeIdto storenode.data.taskwhich is deep clone of the task in the modelFieldsScreen.Recording.2026-06-04.at.09.00.16.mov