Skip to content

feat(buddy): Sobers Buddy AI companion — database foundation, feature flag, and tab navigation#426

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/implement-feature-for-issue-412
Draft

feat(buddy): Sobers Buddy AI companion — database foundation, feature flag, and tab navigation#426
Copilot wants to merge 4 commits intomainfrom
copilot/implement-feature-for-issue-412

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 12, 2026

Initial infrastructure for the Sobers Buddy AI-powered accountability partner (Epic #412). Establishes the data layer, feature gating, and navigation entry point that all subsequent AI features will build on.

Database

  • New migration: ai_buddy_conversations and ai_buddy_messages tables with RLS (user-only access), indexes, and updated_at triggers
  • ai_buddy_enabled boolean column on profiles (default true, matching show_program_content pattern)

Types & Analytics

  • AiBuddyConversation, AiBuddyMessage, AiBuddyMessageRole in types/database.ts
  • ai_buddy_enabled on Profile interface
  • Analytics events: AI_BUDDY_ENABLED, AI_BUDDY_DISABLED, AI_BUDDY_MESSAGE_SENT, AI_BUDDY_CONVERSATION_STARTED

Navigation & UI

  • Buddy tab added to TAB_ROUTES with conditional visibility (same mechanism as Program tab):
const shouldShowBuddy = profile?.ai_buddy_enabled !== false;
  • Placeholder buddy.tsx screen with coming soon content
  • Settings toggle in Features section following the show_program_content toggle pattern exactly

Tests

  • Buddy screen rendering, settings toggle, tab visibility (native + web), analytics type integrity
  • Updated all existing test mocks for new Bot icon import

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cdp.expo.dev
    • Triggering command: /opt/hostedtoolcache/node/24.14.0/x64/bin/node /opt/hostedtoolcache/node/24.14.0/x64/bin/node /home/REDACTED/work/sobers/sobers/node_modules/.pnpm/@expo+cli@55.0.15_@expo+dom-webview@55.0.3_@expo+metro-runtime@55.0.6_expo-constants@55_c0846f7da0f08a4013497f6734026025/node_modules/@expo/cli/build/src/utils/telemetry/clients/flushFetchDetached.js /tmp/30a35c98a3601ed7eb642ddaf0afcc1d/expo-telemetry.json (dns block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/work/sobers/sobers/node_modules/.bin/../expo/bin/cli export --platform web st.tsx __tests__/app/tabs-layout-native.test.tsx __tests__/components/settings/SettingsContent.sbash main de/node/bin/node (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sobers Ready Ready Preview, Comment Mar 12, 2026 3:03am

Request Review

…d tab navigation (#412)

- Create migration for ai_buddy_conversations and ai_buddy_messages tables with RLS
- Add ai_buddy_enabled feature flag to profiles table
- Add AiBuddyConversation and AiBuddyMessage TypeScript types
- Add AI Buddy analytics events
- Add Sobers Buddy toggle in Settings Features section
- Add Buddy tab to navigation (conditionally visible)
- Create placeholder Buddy screen

Co-authored-by: BillChirico <13951316+BillChirico@users.noreply.github.com>
@qltysh
Copy link
Copy Markdown

qltysh bot commented Mar 12, 2026

2 new issues

Tool Category Rule Count
qlty Structure Function with many returns (count = 12): SettingsContent 1
qlty Duplication Found 31 lines of similar code in 2 locations (mass = 157) 1

Comment thread components/settings/SettingsContent.tsx
Copilot AI and others added 2 commits March 12, 2026 02:50
…nd tab navigation (#412)

Co-authored-by: BillChirico <13951316+BillChirico@users.noreply.github.com>
…to error logging (#412)

Co-authored-by: BillChirico <13951316+BillChirico@users.noreply.github.com>
Comment thread components/settings/SettingsContent.tsx
{profile?.ai_buddy_enabled !== false ? 'ON' : 'OFF'}
</Text>
</View>
)}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found 31 lines of similar code in 2 locations (mass = 157) [qlty:similar-code]

Copilot AI changed the title [WIP] [VOL-412] Start implementation on feature feat(buddy): Sobers Buddy AI companion — database foundation, feature flag, and tab navigation Mar 12, 2026
@morph-subagents
Copy link
Copy Markdown

🤖 Morph Preview Test

Preview URL: https://sobers-jdl66rint-volvox-llc.vercel.app

AI Summary

Issues:

  • The "Sobers Buddy" toggle in the Settings menu fails to update. Multiple attempts resulted in a "Failed to update. Please try again." error message, preventing verification of the tab's visibility control.

Verified:

  • The "Buddy" tab is visible by default in the main navigation bar.
  • The Buddy screen correctly displays the "Sobers Buddy" title and "Coming Soon" placeholder card.
  • The feature list (e.g., "Real-time chat conversations", "Private and secure") is present and visible on the Buddy screen.

Notes:

  • Functional blocker: The toggle functionality is currently broken in the preview environment, which blocked the completion of the visibility and responsive tests.

Recording

Preview Recording

View full session →


Automated testing by Morph

@BillChirico BillChirico self-requested a review March 20, 2026 13:27
@BillChirico BillChirico added analytics Metrics and tracking frontend Frontend/UI related changes database types ai AI/ML related sobers-buddy Sobers Buddy AI companion feature labels Mar 22, 2026
@BillChirico
Copy link
Copy Markdown
Member

🐣 PR Triage: This PR has been marked as stale (older than 7 days) as part of automated triage.

Next steps:

  • Since this is a draft PR, it should not be requested for review until it is ready
  • Consider adding ready-for-review label when this PR is ready for team review
  • The PR includes infrastructure for Sobers Buddy AI companion feature (complexity: critical)

Current status:

  • ✅ Database foundation complete
  • ✅ Feature flagging implemented
  • ✅ Navigation entry point added
  • 🔄 Waiting for final implementation details

@BillChirico @copilot please update when ready for review.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 9, 2026

🐣 PR Triage: This PR has been marked as stale (older than 7 days) as part of automated triage.

Next steps:...

The implementation is complete — database migration, feature flag, navigation tab, settings toggle, placeholder screen, and tests are all in place and passing. This PR is ready for review whenever the team is available.

@BillChirico
Copy link
Copy Markdown
Member

🤖 Automated PR Triage: This PR has been reviewed and processed by the automated triage system.

@BillChirico BillChirico added backend Backend/API related changes frontend Frontend/UI related changes labels Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Backend/API related changes frontend Frontend/UI related changes size:XL status/stale tests triage-auto-label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants