Skip to content

Conversation

@jumski
Copy link
Contributor

@jumski jumski commented Nov 4, 2025

Add Code Panel and Step Explanation Features

This PR adds a new interactive code panel and step explanation features to the pgflow demo, enhancing the educational value of the application.

Key additions:

  • Created a new CodePanel component that displays syntax-highlighted flow code with interactive line selection
  • Added an ExplanationPanel component that shows detailed information about selected steps
  • Implemented cross-component step selection, allowing users to select steps from the code, DAG visualization, or debug panel
  • Enhanced the DAG visualization with selection highlighting and click handlers
  • Added scrolling to selected steps in the debug panel
  • Created a new flow-code.ts file with educational code examples and line-to-step mapping

The UI now features a 55/45 split layout with code and explanation on the left, and DAG visualization and debug panel on the right. When a user selects a step (by clicking on code, DAG node, or debug panel), the step is highlighted across all components and detailed information appears in the explanation panel.

@changeset-bot
Copy link

changeset-bot bot commented Nov 4, 2025

⚠️ No Changeset found

Latest commit: cec2133

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor Author

jumski commented Nov 4, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge:queue - adds this PR to the back of the merge queue
  • hotfix:queue - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@jumski jumski force-pushed the feat-demo-4-code-explanation branch 3 times, most recently from d7fb170 to 1f7f9c7 Compare November 4, 2025 22:44
@jumski jumski force-pushed the feat-demo-4-code-explanation branch from 1f7f9c7 to c9db847 Compare November 4, 2025 22:59
@jumski jumski force-pushed the feat-demo-4-code-explanation branch from c9db847 to a026d83 Compare November 5, 2025 07:24
Implement code visualization with syntax highlighting and interactive step exploration.

New Components:
- CodePanel: Shiki-highlighted flow code with clickable lines
- ExplanationPanel: Shows step dependencies, inputs, and returns on click
- flow-code.ts: Simplified educational code snippet with line-to-step mapping

Enhanced Components:
- DAGVisualization: Added click handling and selection states
- DebugPanel: Auto-scroll to selected step with smooth animations
- Page layout: 55/45 split, all panels synchronized via step-selected events

Interactions:
- Click code line or DAG node → shows explanation + scrolls debug panel
- Visual states: active (executing) vs selected (clicked)
- ESC or outside click dismisses explanation panel

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jumski jumski force-pushed the feat-demo-4-code-explanation branch from c852760 to cec2133 Compare November 11, 2025 14:38
@jumski jumski force-pushed the feat-demo-3-dag-debug branch from 946dd0f to 67ad902 Compare November 11, 2025 14:38
@nx-cloud
Copy link

nx-cloud bot commented Nov 11, 2025

🤖 Nx Cloud AI Fix Eligible

An automatically generated fix could have helped fix failing tasks for this run, but Self-healing CI is disabled for this workspace. Visit workspace settings to enable it and get automatic fixes in future runs.

To disable these notifications, a workspace admin can disable them in workspace settings.


View your CI Pipeline Execution ↗ for commit cec2133

Command Status Duration Result
nx affected -t lint typecheck test --parallel -... ❌ Failed 14s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-11 14:46:57 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants