Skip to content

Add admin collaboration features for outreach#607

Merged
bokelley merged 3 commits into
mainfrom
bokelley/outreach-testing
Jan 5, 2026
Merged

Add admin collaboration features for outreach#607
bokelley merged 3 commits into
mainfrom
bokelley/outreach-testing

Conversation

@bokelley

@bokelley bokelley commented Jan 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements admin collaboration features for the outbound planner system (Phases 1-4):

  • Add Insight button: Enables admins to quickly add insights while viewing user context (backend API already existed)
  • Year reference cleanup: Migration 132 disables the old "Learn 2025/2026 Goals" goal and renames insight type for clarity
  • Vendor membership goal: Migration 133 adds a new goal encouraging tech vendors (adtech, AI, data companies) to become members for profile visibility
  • Admin nudge/override: "Different approach?" link allows admins to select alternative goals, with optional context that gets recorded as an insight
  • First name personalization: Fixed message templates to use first name instead of full name
  • Profile goal fix: Only show profile completion goal for paid members, handle personal workspaces

Changes

Migrations

  • 132_cleanup_year_references.sql: Disables old 2025/2026 goal, adds admin_context insight type
  • 133_vendor_visibility_goal.sql: Adds membership_interest insight type and "Encourage Vendor Membership" goal with outcomes

Backend

  • outbound-planner.ts: Fixed first name extraction with edge case handling, added vendor membership quick-match
  • admin-insights.ts: Added POST /api/admin/outreach/send-with-goal endpoint with improved input validation
  • admin-outbound.ts: Fixed personal workspace detection consistency
  • proactive-outreach.ts: Profile goal only for paid members with personal workspace check
  • insights-db.ts: Added getInsightTypeByName() method

Frontend

  • admin-users.html: Added "Different approach?" link, nudge modal, and fixed event listener accumulation

Test plan

  • Build passes
  • Typecheck passes
  • All tests pass
  • Verified context modal renders correctly for Slack users via Vibium browser testing
  • Verified message preview uses first name (not full name)
  • Code review completed and suggestions addressed

🤖 Generated with Claude Code

bokelley and others added 2 commits January 4, 2026 18:32
…rkspaces

- Add is_member to PlannerContext to track membership status
- Add is_personal_workspace to company context to identify auto-generated workspaces
- Profile completion goal now only shows for paid members (profiles are only visible to members)
- Personal workspaces show as "your account" instead of "User's Workspace"
- Remove legacy addie_goal fallback in admin-users.html (planner is now primary)
- Update all PlannerContext construction sites with new required fields

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add insight button to admin user detail panel
- Update year references (2025 -> 2026 cleanup) via migration 132
- Add vendor membership goal for tech companies via migration 133
- Add admin nudge/override for outreach direction
- Fix message personalization to use first name instead of full name
- Fix input validation for goal_id in admin insights endpoint
- Fix event listener accumulation in nudge modal
- Fix personal workspace detection consistency across files

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bokelley bokelley changed the title Fix profile goal eligibility and personal workspace handling Add admin collaboration features for outreach Jan 5, 2026
Migrations 132 and 133 already exist on main, so renumber ours to 134 and 135.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bokelley bokelley merged commit be718c6 into main Jan 5, 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.

1 participant