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 Slack Workflow Sharing (β)#138

Merged
breaking-brake merged 2 commits intomainbreaking-brake/cc-wf-studio:mainfrom
001-slack-workflow-sharing-v2breaking-brake/cc-wf-studio:001-slack-workflow-sharing-v2Copy head branch name to clipboard
Nov 23, 2025
Merged

feat: add Slack Workflow Sharing (β)#138
breaking-brake merged 2 commits intomainbreaking-brake/cc-wf-studio:mainfrom
001-slack-workflow-sharing-v2breaking-brake/cc-wf-studio:001-slack-workflow-sharing-v2Copy head branch name to clipboard

Conversation

@breaking-brake
Copy link
Copy Markdown
Owner

Problem

Previously, there was no way to share workflows with team members or import workflows created by others. Users had to manually copy workflow files or share them through other channels.

Current Behavior

  1. Users can only create and edit workflows locally
  2. ❌ No built-in mechanism to share workflows with team members
  3. ❌ No way to discover and import workflows from others

Expected Behavior

  1. Users can share workflows directly to Slack channels
  2. ✅ Workflows appear as rich message cards with metadata in Slack
  3. ✅ Team members can import workflows via deep links from Slack
  4. ✅ Sensitive data detection prevents accidental secrets leakage

Solution

Implemented Slack integration with manual Bot Token connection workflow. This provides:

  • Manual Slack Bot Token configuration via VSCode Secret Storage
  • Share workflows to Slack channels with Block Kit rich messages
  • Import workflows from Slack via vscode:// deep links
  • Automatic workflow file upload/download via Slack API
  • Slack channel browsing and selection UI
  • Sensitive data detection before sharing

Implementation Approach

Branch Strategy: Created new branch 001-slack-workflow-sharing-v2 from latest main (v2.11.2) and merged original Slack branch with main priority conflict resolution. All Slack-specific files were manually added from the original branch.

Key Design Decisions:

  • Manual Bot Token workflow instead of OAuth (simpler for β release)
  • VSCode Secret Storage for secure token storage
  • Block Kit for rich Slack messages
  • Deep links for seamless import flow
  • Sensitive data patterns detection (AWS keys, tokens, etc.)

Changes

Core Files Modified

package.json

  • Added @slack/web-api: ^7.12.0 dependency

vite.extension.config.ts

  • Added extensive Node.js built-in externals
  • Added resolve.conditions: ['node'] to force Node.js resolution
  • Prevents "window is not defined" error during extension activation

src/extension/extension.ts

  • Registered Slack commands: slack-connect-manual, slack-import-workflow
  • Added vscode:// URI handler for deep link import
  • Initialized SlackApiService and SlackTokenManager

src/extension/commands/open-editor.ts

  • Added Slack workflow import support
  • Handles importSlackWorkflow parameters from deep links

src/webview/src/App.tsx

  • Added IMPORT_WORKFLOW_FROM_SLACK message handler
  • Added loading overlay for import operations

src/webview/src/components/Toolbar.tsx

  • Added "Share to Slack" button
  • Integrated SlackShareDialog

i18n files (en, ja, ko, zh-CN, zh-TW)

  • Added Slack integration translations for all UI strings

New Files Added

Extension Host:

  • src/extension/commands/slack-connect-manual.ts - Manual token connection
  • src/extension/commands/slack-share-workflow.ts - Workflow sharing
  • src/extension/commands/slack-import-workflow.ts - Workflow import
  • src/extension/services/slack-api-service.ts - Slack API wrapper
  • src/extension/utils/slack-token-manager.ts - Token management
  • src/extension/utils/slack-message-builder.ts - Block Kit message builder
  • src/extension/utils/slack-error-handler.ts - Error handling
  • src/extension/utils/sensitive-data-detector.ts - Security scanning
  • src/extension/utils/workflow-validator.ts - Import validation
  • src/extension/types/slack-integration-types.ts - Type definitions
  • src/extension/types/slack-messages.ts - Message type definitions

Webview UI:

  • src/webview/src/components/dialogs/SlackShareDialog.tsx - Share dialog
  • src/webview/src/components/dialogs/SlackManualTokenDialog.tsx - Token input
  • src/webview/src/services/slack-integration-service.ts - Webview-Extension bridge

Specifications:

  • specs/001-slack-workflow-sharing/ - Complete feature specification, plan, API contracts, data model, tasks, quickstart guide

Impact

UX Improvements:

  • ✅ Enables seamless workflow sharing within teams
  • ✅ Rich Slack message cards with workflow metadata
  • ✅ One-click import via deep links
  • ✅ Secure token storage in VSCode Secret Storage

Breaking Changes:

  • ❌ None - This is a new opt-in feature

Side Effects:

  • Requires Slack Bot Token for functionality
  • Adds 1.2MB to bundle size (due to @slack/web-api dependency)

Testing

  • Manual E2E testing completed (F5 debug with Slack integration)
  • Token connection flow verified
  • Workflow sharing to Slack tested
  • Import from Slack via deep link tested
  • Sensitive data detection tested with sample patterns
  • Code quality checks passed (format, lint, check, build)
  • Build succeeds: dist/extension.js 1,264.15 kB
  • Extension activates without errors

Notes

Feature Scope: This is a β release focusing on core sharing/import functionality. Future enhancements may include:

  • OAuth 2.0 authentication flow
  • Workflow search in Slack history
  • Batch import operations
  • Custom Block Kit templates

Security: All sample tokens in documentation have been replaced with safe placeholders to pass GitHub Secret Scanning.

Original PR: This supersedes PR #137 which had merge conflicts with main.

- Manual Slack Bot Token connection
- Share workflows to Slack channels with Block Kit messages
- Import workflows from Slack via deep links
- Workflow file upload/download via Slack API
- Slack channel browsing and selection
- Import prerequisite note for workspace opening

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

Co-Authored-By: Claude <noreply@anthropic.com>
@breaking-brake breaking-brake force-pushed the 001-slack-workflow-sharing-v2 branch from 827ab7d to 5b3ffb9 Compare November 23, 2025 15:57
- Changed from CJS require to ES import for nano-spawn
- Fixes "Cannot find module 'nano-spawn'" error in VSIX
- nano-spawn is now properly bundled into dist/extension.js

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

Co-Authored-By: Claude <noreply@anthropic.com>
@breaking-brake breaking-brake merged commit a0d34de into main Nov 23, 2025
3 checks passed
@breaking-brake breaking-brake mentioned this pull request Nov 23, 2025
github-actions Bot added a commit that referenced this pull request Nov 23, 2025
## [2.12.0](v2.11.2...v2.12.0) (2025-11-23)

### Features

* add Slack Workflow Sharing (β) ([#138](#138)) ([a0d34de](a0d34de))
@github-actions
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.12.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@breaking-brake breaking-brake deleted the 001-slack-workflow-sharing-v2 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.