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: improve Slack sharing with User Token and bot membership check#173

Merged
breaking-brake merged 3 commits intomainbreaking-brake/cc-wf-studio:mainfrom
fix/slack-user-token-for-channel-listbreaking-brake/cc-wf-studio:fix/slack-user-token-for-channel-listCopy head branch name to clipboard
Nov 29, 2025
Merged

feat: improve Slack sharing with User Token and bot membership check#173
breaking-brake merged 3 commits intomainbreaking-brake/cc-wf-studio:mainfrom
fix/slack-user-token-for-channel-listbreaking-brake/cc-wf-studio:fix/slack-user-token-for-channel-listCopy head branch name to clipboard

Conversation

@breaking-brake
Copy link
Copy Markdown
Owner

Summary

Improved Slack sharing UX with the following features:

  1. User Token for channel listing - Shows only channels the user has joined
  2. Bot membership pre-check - Verifies if Slack App is added to channel before sharing
  3. Last shared channel memory - Auto-selects previously used channel

Problem

Before (Bot Token for channel listing)

  • Channel list retrieved using Bot Token's channels:read/groups:read scopes
  • Only channels where Bot is added were displayed
  • ❌ Users couldn't select channels they joined but Bot wasn't added to
  • ❌ Bot Token with channels:read/groups:read could potentially expose channels user hasn't joined (security concern)

After (User Token for channel listing)

  • Channel list retrieved using User Token's channels:read/groups:read scopes
  • Channels the user has joined are displayed
  • ✅ Channels without Bot can now be selected (with warning shown via pre-check)
  • ✅ Sensitive scopes removed from Bot Token (security improvement)

Changes

Token Scope Changes

  • Removed from Bot Token: channels:read, groups:read
  • Added to User Token: channels:read, groups:read
  • Added to Bot Token: files:read (for conversations.info API)

New Features

1. User Token Support

  • slack-oauth-service.ts: Retrieve and store User Token during OAuth
  • slack-token-manager.ts: Add methods for User Token storage/retrieval
  • slack-api-service.ts: Use User Token for channel listing

2. Bot Membership Pre-check

Since User Token change allows selecting channels without Bot, added pre-check feature:

  • slack-api-service.ts: Add checkBotMembership() method
  • SlackShareDialog.tsx: Check Bot membership when channel is selected
  • Warning UI uses VSCode theme colors with circle spinner for loading
  • /invite @Claude Code Workflow Studio command displayed in copyable format

3. Last Shared Channel Memory

  • SlackShareDialog.tsx: Remember workspaceId and channelId after successful share
  • Auto-select previous channel when same workspace is selected

UI Improvements

  • Warning display uses VSCode theme colors (readable in all themes)
  • Circle spinner consistent with OAuth loading
  • /invite command in code block format (easy to copy)

Commits

  • feat: add User Token support for Slack channel listing
  • feat: improve Slack sharing UX with channel hint and memory
  • feat: add bot membership pre-check when selecting Slack channel

Testing

  • User Token retrieved and stored during OAuth
  • Channel list shows only user-joined channels
  • Warning displayed when selecting channel without Bot
  • No warning when selecting channel with Bot
  • Previous channel auto-selected for same workspace
  • Warning messages display correctly in 5 languages (en, ja, ko, zh-CN, zh-TW)

Related

🤖 Generated with Claude Code

breaking-brake and others added 3 commits November 29, 2025 20:32
- Add userAccessToken field to SlackWorkspaceConnection type
- Store and retrieve User Token in SlackTokenManager
- Use User Token for conversations.list API when available
- Fall back to Bot Token for legacy connections
- Add hint text about Slack App invitation before channel selection
- Remember last shared channel and auto-select on next share
- Improve not_in_channel error message with detailed instructions
- Remove debug logs from Slack OAuth and API services
- Remove unnecessary try/catch blocks in slack-api-service

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Check if Slack App is added to channel before sharing
- Show warning with /invite command if bot not in channel
- Use VSCode theme colors for warning display
- Add circle spinner consistent with OAuth loading
- Remove redundant channel hint (replaced by dynamic check)
- Support 5 languages (en, ja, ko, zh-CN, zh-TW)

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

Co-Authored-By: Claude <noreply@anthropic.com>
@breaking-brake breaking-brake merged commit 48d61b2 into main Nov 29, 2025
3 checks passed
@breaking-brake breaking-brake mentioned this pull request Nov 29, 2025
github-actions Bot added a commit that referenced this pull request Nov 29, 2025
## [2.16.0](v2.15.1...v2.16.0) (2025-11-29)

### Features

* improve Slack sharing with User Token and bot membership check ([#173](#173)) ([48d61b2](48d61b2))
@github-actions
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.16.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@breaking-brake breaking-brake deleted the fix/slack-user-token-for-channel-list branch December 3, 2025 11:14
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.