Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat: add prompt preview to SubAgentNode canvas display#118

Merged
breaking-brake merged 1 commit intomainbreaking-brake/cc-wf-studio:mainfrom
feat/subagent-prompt-previewbreaking-brake/cc-wf-studio:feat/subagent-prompt-previewCopy head branch name to clipboard
Nov 20, 2025
Merged

feat: add prompt preview to SubAgentNode canvas display#118
breaking-brake merged 1 commit intomainbreaking-brake/cc-wf-studio:mainfrom
feat/subagent-prompt-previewbreaking-brake/cc-wf-studio:feat/subagent-prompt-previewCopy head branch name to clipboard

Conversation

@breaking-brake
Copy link
Copy Markdown
Owner

Problem

SubAgentNode canvas display lacks visibility of prompt content, making it difficult to understand workflow logic at a glance.

Current Behavior

  1. Place SubAgentNode on canvas
  2. ❌ Only description and model badge are visible
  3. ❌ Must select node and open PropertyPanel to view prompt content

Expected Behavior

  1. Place SubAgentNode on canvas
  2. ✅ Description, prompt preview, and model badge are visible
  3. ✅ Can view prompt summary directly on canvas

Solution

Added prompt preview display area to SubAgentNode component using the same styling pattern as SkillNode description, limited to 2 lines with ellipsis for overflow.

Changes

File: src/webview/src/components/nodes/SubAgentNode.tsx

  • Added prompt preview section below description (lines 59-76)
  • Limited to 2 lines with ellipsis for overflow (WebkitLineClamp: 2)
  • Uses same styling pattern as SkillNode description
  • Only displays when data.prompt exists

Display order:

  1. Node header ("Sub-Agent")
  2. Description (data.description)
  3. Prompt preview (data.prompt) ← NEW
  4. Model badge (data.model)
  5. Connection handles
{/* Prompt Preview */}
{data.prompt && (
  <div
    style={{
      fontSize: '11px',
      color: 'var(--vscode-descriptionForeground)',
      marginBottom: '8px',
      lineHeight: '1.4',
      overflow: 'hidden',
      textOverflow: 'ellipsis',
      display: '-webkit-box',
      WebkitLineClamp: 2,
      WebkitBoxOrient: 'vertical',
    }}
  >
    {data.prompt}
  </div>
)}

Impact

  • UX Improvement: Easier to understand overall workflow by viewing prompt content directly on canvas
  • No Breaking Changes: No changes to existing node data structure, display-only addition
  • Consistency: Maintains UI consistency by using same styling pattern as SkillNode

Testing

  • Manual E2E testing completed
    • Verified prompt displays on SubAgentNode
    • Verified long prompts truncate to 2 lines
    • Verified empty prompts don't display
    • Verified proper display in dark/light mode
  • Code quality checks passed
    • npm run format
    • npm run lint
    • npm run check
    • npm run build

Notes

  • Implementation follows SkillNode pattern
  • Uses VSCode theme variables for dark/light mode support

Add prompt preview display to SubAgentNode component to improve
workflow visibility and understanding.

Changes:
- Added prompt preview section below description
- Limited to 2 lines with ellipsis for overflow
- Uses same styling pattern as SkillNode description
- Only displays when data.prompt exists

Display order:
1. Node header ("Sub-Agent")
2. Description (data.description)
3. Prompt preview (data.prompt) - NEW
4. Model badge (data.model)
5. Connection handles

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

Co-Authored-By: Claude <noreply@anthropic.com>
@breaking-brake breaking-brake merged commit 25f5ad6 into main Nov 20, 2025
3 checks passed
@breaking-brake breaking-brake mentioned this pull request Nov 20, 2025
github-actions Bot added a commit that referenced this pull request Nov 20, 2025
## [2.9.0](v2.8.0...v2.9.0) (2025-11-20)

### Features

* add prompt preview to SubAgentNode canvas display ([#118](#118)) ([25f5ad6](25f5ad6))

### Bug Fixes

* simplify PromptNode canvas display style ([#120](#120)) ([fc9b391](fc9b391))
* unify prompt terminology and rename translation keys ([#119](#119)) ([29d8111](29d8111))
@github-actions
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.9.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@breaking-brake breaking-brake mentioned this pull request Nov 20, 2025
github-actions Bot added a commit that referenced this pull request Nov 20, 2025
## [2.9.0](v2.8.0...v2.9.0) (2025-11-20)

### Features

* add prompt preview to SubAgentNode canvas display ([#118](#118)) ([25f5ad6](25f5ad6))

### Bug Fixes

* simplify PromptNode canvas display style ([#120](#120)) ([73d6a55](73d6a55))
* unify prompt terminology and rename translation keys ([#119](#119)) ([c616374](c616374))
@github-actions
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.9.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

breaking-brake added a commit that referenced this pull request Nov 23, 2025
Add prompt preview display to SubAgentNode component to improve
workflow visibility and understanding.

Changes:
- Added prompt preview section below description
- Limited to 2 lines with ellipsis for overflow
- Uses same styling pattern as SkillNode description
- Only displays when data.prompt exists

Display order:
1. Node header ("Sub-Agent")
2. Description (data.description)
3. Prompt preview (data.prompt) - NEW
4. Model badge (data.model)
5. Connection handles

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

Co-authored-by: Claude <noreply@anthropic.com>
breaking-brake pushed a commit that referenced this pull request Nov 23, 2025
## [2.9.0](v2.8.0...v2.9.0) (2025-11-20)

### Features

* add prompt preview to SubAgentNode canvas display ([#118](#118)) ([25f5ad6](25f5ad6))

### Bug Fixes

* simplify PromptNode canvas display style ([#120](#120)) ([73d6a55](73d6a55))
* unify prompt terminology and rename translation keys ([#119](#119)) ([c616374](c616374))
@breaking-brake breaking-brake deleted the feat/subagent-prompt-preview branch December 3, 2025 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.