Skip to content

Conversation

@bokelley
Copy link
Contributor

@bokelley bokelley commented Jan 7, 2026

Summary

  • Slack-only users (those who haven't signed up for an AAO account yet) were showing empty engagement scores in the admin dashboard
  • Updated the unified_contacts view to compute scores on-the-fly for Slack-only contacts based on their actual activity data
  • Uses LATERAL joins for efficient single-pass computation

What Changed

Adds migration 148 that updates the view to compute:

  • Slack activity score (0-30 points): Messages, reactions, thread replies from last 30 days
  • Conversation score (0-25 points): Addie conversations and insights from last 30 days

Test plan

  • Migration applies successfully in Docker
  • View schema is correct with engagement_score column
  • All existing tests pass
  • TypeScript type check passes

🤖 Generated with Claude Code

Slack-only users (those who haven't signed up for an AAO account) were
showing empty engagement scores in the admin dashboard. This updates the
unified_contacts view to compute scores on-the-fly based on:
- Slack activity (messages, reactions, thread replies) from last 30 days
- Addie conversations and insights from last 30 days

Uses LATERAL joins for efficient single-pass computation.

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

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@bokelley bokelley merged commit 0383ae7 into main Jan 7, 2026
6 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.

2 participants