Skip to content

Fix/critical bugs worker ai translator focus#12

Merged
LSUDOKO merged 16 commits into
mainfrom
fix/critical-bugs-worker-ai-translator-focus
Jul 13, 2026
Merged

Fix/critical bugs worker ai translator focus#12
LSUDOKO merged 16 commits into
mainfrom
fix/critical-bugs-worker-ai-translator-focus

Conversation

@LSUDOKO

@LSUDOKO LSUDOKO commented Jul 13, 2026

Copy link
Copy Markdown
Owner

What

How to Test

Checklist

  • make lint passes
  • make test passes
  • Feature tested in Slack sandbox
  • Demo video updated (if UX changed)
  • Docs updated (if API changed)

Summary by CodeRabbit

  • New Features

    • Added Slack commands for personalized modes, decision summaries, action plans, GitHub searches, and Notion documentation searches.
    • Improved catch-up summaries with AI-only fallback support.
    • Added thread summaries triggered by the memo reaction.
    • Enhanced Deep Work, translation, digest, mentions, and direct-message workflows.
    • Added memory-based personalization and urgency-aware responses.
    • Added an AI chat API for integrations and automation.
  • Documentation

    • Added comprehensive Slack setup, troubleshooting, testing, and demo guides.
  • Deployment

    • Added configurations for container builds, hosted services, health checks, and background processes.

LSUDOKO added 16 commits July 13, 2026 02:19
…p.go to fix compilation error - Required for error logging in HandleSlashCommand
… 'unspecified' when creating new users - Prevents database constraint violation on user creation - Fixes: ERROR: new row for relation users violates check constraint users_neurotype_check
…sers.profile:write scope for Deep Work status updates - Add search:read scope for RTS API (catchup feature) - Alphabetize scopes for readability - Create APPLY_MANIFEST.md with step-by-step instructions This manifest has all required configurations for Signal to work.
…anifest.yml with all required scopes - Add APPLY_MANIFEST.md for applying manifest to Slack app - Add SLACK_CONFIG_CHECKLIST.md for manual verification - Add SLACK_FIX_COMMANDS.md for troubleshooting All guides provide step-by-step instructions to fix slash command and DM issues.
…s - Fix duplicate key constraint violation in ensureUser (graceful retry) - Add emoji-based debug logging for all Socket Mode events - Create comprehensive Slack token diagnostics script - Add Event Subscriptions configuration guide - Fix: properly handle user already exists case - All Slack features now working: @mentions, slash commands, DMs
…ICAL FIXES: - Fix Block Kit button syntax (emoji + style parameters corrected) - Add SLACK_USER_TOKEN support for RTS search (bot tokens don't work) - Create separate Slack API client for RTS with user token - Escape markdown special chars in translated messages - Add graceful fallback if user token not provided RESULT: /translate and /catchup now fully functional
…sureUser now uses Upsert (ON CONFLICT DO UPDATE) - no more duplicate key errors - /catchup falls back to AI guidance when RTS missing_scope - always returns a result - /focus uses user token for SetUserStatus (not bot token) - /focus falls back to channel post when PostWebhook 500s - /focus stopDeepWork posts to channelID directly (no OpenDMChannel) - SetUserStatus silently skips when no user token (not a fatal error) - PostWebhook failure in /focus no longer crashes the command - All commands now respond immediately via response_url (no DM needed) WORKING: - /signal -> help menu - /translate -> AI tone analysis - /catchup -> semantic search + AI summary (with AI fallback) - /focus -> deep work mode activation - /digest -> on-demand digest
…tting FIXES: - Remove ALL intermediate 'working...' PostWebhook calls (response_url is single-use) - Fix /catchup AI prompt to use Slack mrkdwn (*bold*) not markdown (## headers) - Fix /digest: use correct date format 'after:YYYY-MM-DD' not 'after:today' - Fix /digest: use 'to:<@userid>' search query for actual mentions - Fix /focus button styles: StylePrimary/StyleDanger constants not strings - Fix /focus button emoji param: false not true - Fix all ActionBlock buttons emoji=false to prevent invalid_blocks - /catchup, /focus, /digest, /translate all single-call via response_url
…ry, smart DM NEW FEATURES: - /mode [adhd|autism|anxiety|ally] ??? neurotype-aware personalization * ADHD: shorter summaries, lower focus threshold (30 msgs), urgent-only digest * Autism: always-on translator, explicit subtext, literal AI responses * Anxiety: calm framing, reassuring tone, auto focus guard * Updates DB preferences automatically - /decisions [#channel] [days] ??? AI decision log from channel history * Scans last N days of messages * AI extracts formal decisions + action items * Works on any channel Signal is a member of - /plan [goal] ??? AI action planner * Neurotype-aware task formatting (ADHD: energy labels, Autism: literal steps) * Integrates with AI memory for personalized context * Time estimates + completion criteria per task - AI Workspace Memory ??? Redis-backed context persistence * Stores last 10 interactions per user (7-day TTL) * Injected into /plan and future AI calls * Makes all features more personalized over time - Thread Summary via ???? reaction * React with ???? (memo emoji) on any thread * AI summarizes the thread as ephemeral message * Neurotype-aware summary framing - Smart DM Auto-Responder during Deep Work * AI classifies incoming DMs as URGENT/NORMAL/LOW * URGENT messages bypass deep work with notification * Non-urgent get polite auto-reply - New AI methods: ExtractDecisions, GenerateActionPlan, SummarizeThread, ClassifyUrgency, NeurotypicAwareAnalyzeTone - Manifest: added /mode, /decisions, /plan slash commands - reaction_added event properly handled - GetThreadMessages added to SlackAPI interface
…EW FEATURES: - /github command: real GitHub API integration * Lists open PRs, issues, assigned items * Searches repos with natural language * Supports: /github open PRs, /github issues, /github repo [name] * Uses GitHub Search API (rate limit: 5000 req/hour) * Graceful not-configured message if token missing - /docs command: real Notion API integration * Searches Notion workspace via Notion Search API * Returns page titles, types, last edited dates with links * GetNotionPageContent for AI page summarization * Graceful not-configured message if token missing CONFIG: - Added GITHUB_TOKEN, GITHUB_ORG env vars - Added NOTION_TOKEN env var - Added GitHubConfig, NotionConfig to config.go - .env updated with complete setup instructions for all credentials MANIFEST: - Added /github and /docs slash commands - Added user OAuth scopes: search:read, users.profile:write DOCS: - DEMO_WORKSPACE_SETUP.md: complete 11-scene demo script - Step-by-step credentials setup for GitHub, Notion, Google Calendar - Video script (3 min), judging criteria mapping, architecture diagram - All commands quick reference table
…- mcp-server/main.go: load .env file on startup (was ignoring credentials) - Support both GOOGLE_CALENDAR_CREDENTIALS and MCP_CALENDAR_CREDENTIALS_PATH - Support both GOOGLE_CALENDAR_ID and MCP_CALENDAR_ID - Google Calendar now initializes successfully from credentials file - GitHub API confirmed working: login=LSUDOKO, 11 open issues found - Notion API confirmed working: token valid (pages need to be shared)
… copies migrations, health check - Procfile: web + mcp process definitions - nixpacks.toml: build config for Railway Nixpacks builder - config.go: handle DATABASE_URL, REDIS_URL, PORT from Railway environment - DBConfig.RailwayURL: use full DATABASE_URL when provided - main.go: search multiple paths for migrations (local + /app/db/migrations) - mcp-server: load .env + support both env var naming conventions
…ender.yaml: defines signal-api (web), signal-mcp (worker), postgres, redis - Dockerfile: fixed alpine build with wget health check - Render auto-provisions PostgreSQL and Redis from render.yaml - All env vars defined as sync:false (set manually in Render dashboard)
@gitguardian

gitguardian Bot commented Jul 13, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
34776738 Triggered Slack Bot Token fd623c3 test_slack_token.sh View secret
34776739 Triggered Slack App Token fd623c3 test_slack_token.sh View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: b2596822-3d5b-4ad2-959d-a1af3508fd2d

📥 Commits

Reviewing files that changed from the base of the PR and between ad853aa and c04da3e.

⛔ Files ignored due to path filters (3)
  • api/package-lock.json is excluded by !**/package-lock.json
  • signal-agent/assets/icon.png is excluded by !**/*.png
  • signal-agent/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (76)
  • .slack/.gitignore
  • .slack/config.json
  • .slack/hooks.json
  • APPLY_MANIFEST.md
  • DEMO_WORKSPACE_SETUP.md
  • FINAL_FIX.md
  • FINAL_STATUS_AND_TESTING.md
  • Procfile
  • SLACK_CLI_SETUP.sh
  • SLACK_CONFIG_CHECKLIST.md
  • SLACK_EVENT_SUBSCRIPTIONS_FIX.md
  • SLACK_FIX_COMMANDS.md
  • WORKING_FEATURES_TEST.md
  • api/Dockerfile
  • api/cmd/api/main.go
  • api/cmd/mcp-server/main.go
  • api/cmd/worker/main.go
  • api/internal/ai/client.go
  • api/internal/config/config.go
  • api/internal/features/catchup.go
  • api/internal/features/controller.go
  • api/internal/features/decisions.go
  • api/internal/features/deepwork.go
  • api/internal/features/digest.go
  • api/internal/features/docs.go
  • api/internal/features/github.go
  • api/internal/features/memory.go
  • api/internal/features/mode.go
  • api/internal/features/planner.go
  • api/internal/features/threadsummary.go
  • api/internal/features/translator.go
  • api/internal/httpapi/handler.go
  • api/internal/slack/client.go
  • api/internal/slack/events.go
  • nixpacks.toml
  • render.yaml
  • signal-agent/.env.sample
  • signal-agent/.gitignore
  • signal-agent/.slack/.gitignore
  • signal-agent/.slack/config.json
  • signal-agent/.slack/hooks.json
  • signal-agent/LICENSE
  • signal-agent/README.md
  • signal-agent/app-oauth.js
  • signal-agent/app.js
  • signal-agent/biome.json
  • signal-agent/listeners/actions/index.js
  • signal-agent/listeners/actions/sample-action.js
  • signal-agent/listeners/commands/catchup.js
  • signal-agent/listeners/commands/digest.js
  • signal-agent/listeners/commands/focus.js
  • signal-agent/listeners/commands/index.js
  • signal-agent/listeners/commands/sample-command.js
  • signal-agent/listeners/commands/signal.js
  • signal-agent/listeners/commands/translate.js
  • signal-agent/listeners/events/app-home-opened.js
  • signal-agent/listeners/events/index.js
  • signal-agent/listeners/index.js
  • signal-agent/listeners/messages/index.js
  • signal-agent/listeners/messages/sample-message.js
  • signal-agent/listeners/shortcuts/index.js
  • signal-agent/listeners/shortcuts/sample-shortcut.js
  • signal-agent/listeners/views/index.js
  • signal-agent/listeners/views/sample-view.js
  • signal-agent/manifest.json
  • signal-agent/package.json
  • signal-agent/tests/actions/sample-action.spec.js
  • signal-agent/tests/commands/sample-command.spec.js
  • signal-agent/tests/events/app-home-opened.spec.js
  • signal-agent/tests/messages/sample-message.spec.js
  • signal-agent/tests/shortcuts/sample-shortcut.spec.js
  • signal-agent/tests/views/sample-view.spec.js
  • slack-manifest.yml
  • test_all_features.sh
  • test_slack_token.sh
  • watch_logs.sh

📝 Walkthrough

Walkthrough

Changes

Signal’s Slack integration is expanded with new commands, AI-backed feature services, Socket Mode event routing, Slack Bolt JavaScript listeners, deployment configuration, app manifests, setup guides, and automated listener tests.

Signal Slack platform

Layer / File(s) Summary
Slack setup and deployment artifacts
.slack/*, slack-manifest.yml, render.yaml, api/Dockerfile, *.md, *.sh
Slack manifests, deployment definitions, CLI setup, troubleshooting guides, demo instructions, and manual validation scripts are added or updated.
Go configuration and runtime contracts
api/cmd/*, api/internal/config/*, api/internal/ai/*, api/internal/httpapi/*, api/internal/slack/*
Runtime configuration, migrations, user-token support, AI methods, the /api/v1/ai/chat endpoint, and Slack adapters are expanded.
Feature services and Slack response flows
api/internal/features/*
New mode, decisions, planning, memory, GitHub, Notion, and thread-summary services are added; existing commands use webhook responses and catch-up gains an AI fallback.
Slack event and webhook routing
api/internal/slack/events.go
Socket Mode dispatches reactions and commands, forwards responseURL, logs event activity, posts webhook errors, retrieves threads, and uses optional user-token clients for status updates.
Slack Bolt agent and listener registration
signal-agent/*
A JavaScript Slack Bolt app, OAuth entrypoint, manifests, command handlers, event handlers, interaction handlers, package tooling, and listener registration modules are added.
Bolt agent listener tests
signal-agent/tests/*
Node test suites cover successful and error paths for sample actions, commands, events, messages, shortcuts, and views.

Estimated code review effort: 5 (Critical) | ~120 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Slack
  participant EventHandler
  participant FeatureController
  participant FeatureService
  participant AI
  Slack->>EventHandler: send command, message, or reaction
  EventHandler->>FeatureController: dispatch event
  FeatureController->>FeatureService: invoke feature handler
  FeatureService->>AI: generate, classify, or summarize
  AI-->>FeatureService: return AI result
  FeatureService-->>Slack: post webhook, channel, DM, or ephemeral response
Loading

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands.

@LSUDOKO
LSUDOKO merged commit 010efaa into main Jul 13, 2026
0 of 4 checks passed
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.

1 participant