Bugfix: Why does the WhatsApp channel setup show a sandbox step when...
Documentation for Sessions
🐛 Bugfix: Why does the WhatsApp channel setup show a sandbox step when...
Date: 2026-02-21
Time: 17:37:55 UTC
Session: gspace1-131.9
Agent: angular
Confidence: 99%
Status: ✅ Documented
📋 Decision Context
Question:
Why does the WhatsApp channel setup show a sandbox step when TWILIO_WHATSAPP_MODE=production?
Task: Not specified
🎯 Decision Made
Chosen:
Only return sandboxInfo when isSandboxMode() is true
Options Considered:
- Remove sandbox code entirely
- Only return sandboxInfo when isSandboxMode() is true
- Add a mode check in the frontend
💭 Reasoning
Bug: ChannelService.setupWhatsApp() called twilio.getSandboxInfo() unconditionally, which returns non-null whenever TWILIO_SANDBOX_NUMBER and TWILIO_SANDBOX_CODE env vars are set -- regardless of TWILIO_WHATSAPP_MODE. The frontend then checks if sandboxInfo is truthy and shows the sandbox wizard step. Fix: Only call getSandboxInfo() when isSandboxMode() returns true. In production mode, set sandboxVerified=true, status='active', and return sandboxInfo=null so the frontend skips straight to the test step. This is a data-flow bug, not a UI bug.
📁 Files Involved
- No files specified
🔗 Related
- Decision ID:
dev_1771695475415_7xnr8y1 - Session: 131
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation