UI/UX Enhancements: Custom channel mode and interactive permission buttons#13
Open
BRBCoffeeDebuff wants to merge 5 commits into
Open
UI/UX Enhancements: Custom channel mode and interactive permission buttons#13BRBCoffeeDebuff wants to merge 5 commits into
BRBCoffeeDebuff wants to merge 5 commits into
Conversation
New Features: - Add claude-slack-test command for testing Slack connection - Add --local flag to test directory-level hook configuration - Add optional --description flag to claude-slack for meaningful thread descriptions Path Standardization: - Consolidate all paths to ~/.claude/slack/ directory structure: - ~/.claude/slack/logs/ for all log files - ~/.claude/slack/sockets/ for Unix sockets - ~/.claude/slack/registry.db for session database - Remove hardcoded /tmp/ paths that were inconsistent with config.py defaults - Update .env.example to show correct default paths (commented out) - Fix .env to not override defaults with /tmp/ paths Files Changed: - bin/claude-slack-test (new): Test Slack connection and directory setup - bin/claude-slack: Add --description and --help flags - bin/claude-slack-listener: Fix monitor log path - bin/claude-slack-monitor: Add env loading, fix log paths - bin/claude-slack-debug: Fix log/socket directory paths - core/slack_listener.py: Use get_socket_dir() for legacy socket - core/claude_wrapper_hybrid.py: Use LOG_DIR for buffer files - core/session_registry.py: Add description support in Slack threads - hooks/on_*.py: Add LOG_DIR, fix debug log paths - README.md, SECURITY.md: Update path references Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Key changes: 1. Fix session ID detection bug - hooks now use project_dir fallback when session_id lookup fails, resolving the mismatch between wrapper session IDs (8-char) and Claude's internal project session IDs (36-char UUID) 2. Replace emoji reactions with interactive Block Kit buttons for permission prompts - buttons show colored options (green approve, red deny) and update in-place when clicked to show the selection 3. Add project-specific channel support - use `--channel #my-channel` flag to post session threads to a specific channel instead of the default 4. Database schema migration - added project_dir column and expanded session_id column to support UUIDs, with automatic migration for existing databases Technical details: - registry_db.py: Expanded session_id column from String(8) to String(50), added project_dir column with index, added get_by_project_dir() method - on_notification.py: Added post_permission_card() for Block Kit cards, enhanced enhance_notification_message() to return permission options - slack_listener.py: Added handle_permission_button() for button clicks - session_registry.py: Support custom_channel in _create_slack_thread() - claude_wrapper_hybrid.py: Added --channel flag, pass project_dir in registration calls Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Custom channels: - Custom channel mode now uses top-level messages instead of threading - Helps keep project-specific channels organized without long threads Permissions channel: - New --permissions-channel flag for dedicated permission prompts channel - Permissions can go to a separate channel from main session messages Message cleanup: - Permission messages are deleted after approval to keep channels clean - Falls back to updating message if delete permissions not available Deny feedback: - Clicking deny button prompts user to type feedback for Claude - User's reply in thread will be routed as the deny response - Improves communication flow when rejecting proposed actions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Wrapper now waits for channel (not thread_ts) since custom channels use top-level messages without a parent thread - REGISTER_EXISTING command now only requires session_id and channel (thread_ts can be None for custom channel mode) - Added file-based logging to session registry for debugging - Updated log messages to clarify top-level vs threaded mode Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
UI/UX Enhancements: - Custom channel mode (--channel/-c): Post messages as top-level instead of threads - Interactive buttons for permission prompts (Block Kit cards) - Proper handling of 2-option vs 3-option permission prompts - Channel-based routing for custom channel sessions Bug Fixes: - Fix stale sessions: Sessions now marked inactive on cleanup - Fix socket lookup: Skip sessions with non-existent sockets - Fix deny button: Detect via button style (danger) not just value Technical Changes: - hooks/on_notification.py v2.2.0: Custom channel support, interactive buttons - core/slack_listener.py: get_socket_for_channel(), channel ID resolution - core/session_registry.py: deactivate_session() method - core/claude_wrapper_hybrid.py: Cleanup marks sessions inactive - README.md: Documentation for custom channel mode Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
Summary
This PR adds several UI/UX enhancements to improve the Slack integration experience:
New Features
Custom Channel Mode (
--channel/-c)claude-slack --channel testchannelInteractive Permission Buttons
Bug Fixes
Technical Changes
hooks/on_notification.pycore/slack_listener.pyget_socket_for_channel(), channel ID→name resolutioncore/session_registry.pydeactivate_session()methodcore/claude_wrapper_hybrid.pyREADME.mdTesting
🤖 Generated with Claude Code