Skip to content

Remove Media and Front Desk; repo is Admin + Referrals - #158

Merged
itennell merged 2 commits into
mainfrom
claude/remove-media-frontdesk
Nov 4, 2026
Merged

itennell merged 2 commits into
mainfrom
claude/remove-media-frontdesk

Conversation

@itennell

@itennell itennell commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

What this does

The public repo is now Admin + Referrals plus the shared core (Aeon chat, approvals, memory, Files, Settings, onboarding, MCP). The Media helper and Front Desk are removed completely, and REFERRALS_ONLY_DEMO is switched to false so the demo shows Admin and Referrals.

Removed

  • Media: Instagram (studio, coach, posts, reels, plan week, connect), Psychology Today profile builder and directories, website help, Grow (ads, website, private-pay planner), the Media pages and nav, their tools and approval executors (instagram_post, ads_campaign, website), the relay/ Vercel project and docs/relay.md, the SAM cut-out code (lib/cutout.ts, segmentImage, @meta-sam/parser), seed posts and their pictures, the eval:instagram|media|studio scripts.
  • Front Desk: lib/frontdesk, /api/front-desk, /api/website-chat, /website-chat, Twilio, voicemail, SMS, Cal.com booking, the phone and Cal.com cards, the alert-phone setting, docs/sms*, the SMS-only privacy policy and terms, the Front Desk rules in Settings and onboarding, the sms_reply/consult_*/web_chat_reply/text_consult_options executors.
  • Switches: FRONT_DESK_ENABLED, PHONE_ALERTS_ENABLED, PHONE_ENABLED, FRONT_DESK_TOOLS, FRONT_DESK_APPROVAL_KINDS and every branch on them.
  • Google connect (Gmail drafts, Calendar): nothing in Admin or Referrals used it (referral letters are copy-and-send; lib/referrals/gmail.ts was only called by its own test). Removed lib/connect/index|google|google-scopes|state.ts, /api/connect/*, the Google card and docs/self-hosting/google.md. Settings › Connections now holds only her own Muse key (still encrypted via lib/connections.ts).
  • Onboarding: no Instagram, phone, alert-number, Front Desk, "Connect your tools" or website screens. Team screen has Admin and Referrals.
  • Deps uninstalled: @meta-sam/parser, mediabunny, opentype.js, @types/opentype.js, @fontsource/inter. sharp stays (smoke test headshot and scripts/make-icon.ts).
  • .env.example: dropped TWILIO_, CALCOM_, INSTAGRAM_, RELAY_URL, FRONT_DESK_, CLINICIAN_ALERT_PHONE, SPIKE_IMAGE_URL, GOOGLE_*, TEST_INBOX_EMAIL, PUBLIC_BASE_URL.

Kept

  • Crisis check: lib/safety.ts keeps the fixed 988/911 reply; alertCrisis writes crisis_detected + crisis_alert_failed to audit_log, which Admin (and the menu count) shows as the urgent item. No text is sent. Crisis tests pass.
  • Referral letters still read her practice facts: the small part of lib/media/facts.ts they used now lives in lib/referrals/practice-facts.ts. The wall-clock helper moved from lib/frontdesk/calendar/zone.ts to lib/zone.ts.
  • REFERRALS_ONLY_DEMO mechanism is intact (now false). Settings now shows both the Referrals section and Office hours and fees when it is off (before, it showed one or the other).

Database

  • No migration, no dropped tables. The old Media and Front Desk tables (posts, post_research, studio_*, growth_drafts, inquiries, messages, consult_bookings, consult_offers, faqs, alerts, sms_opt_outs, front_desk_sync) are left in place and are now unused; a later migration can drop them with Isaiah's OK. db:reset still empties the demo ones so no old demo rows linger.
  • The approvals CHECK still lists the old kinds. The app ignores rows of those kinds (never listed, approved or declined).
  • The web-chat 30-day purge went away with web chat. Any old web chats already in the shared database stay until those tables are dropped.

Tests

  • npm test on the built-in DB: 4067 passed, 0 failed. Lint, next typegen + tsc and next build are clean. Gitleaks: no leaks.
  • e2e on the built-in DB (desktop-light): admin, referrals (all specs), approvals, files, connections, chat-menu, modes and onboarding all pass.
  • New tests/removed-helpers.test.ts: switch off, Admin in nav and its pages load, no Media/Front Desk page, route, tool, approval kind, connection card or onboarding question; their old paths are 404s. Admin e2e has a matching 404 check.
  • Fixed the morning_brief guard bug that turning the switch off exposed (lib/aeon/guard.ts, tool results and replies only). The brief's JSON keeps its list on one line, so a person's card name was judged in the same "sentence" as the care word in a board org's name ("Marrowpine Grief Center"). Now: "\n" in a tool result reads as a line break, board organisation names (never person-like cards) are masked before the checks, and a whole card name in a clean code-built line passes. Her typed messages and memories are unchanged. tests/mcp.test.ts pins the follow-ups, so it no longer depends on the date. tests/guard-board-orgs.test.ts checks that grief, hospice, oncology and cancer org names pass in a brief and a reply, while "Maria has cancer" and "Hollis Vance has cancer" still refuse.

🤖 Generated with Claude Code

itennell and others added 2 commits November 4, 2026 15:17
Delete the Media helper (Instagram, Psychology Today, website help, Grow,
relay/, SAM cut-outs) and Front Desk (Twilio, voicemail, SMS, Cal.com, web
chat, phone alerts), plus Google connect, which nothing else used. Drop
their tools, approval kinds, executors, onboarding questions, switches,
env vars, docs and deps. The crisis check keeps the 988 reply and the
urgent Admin item. REFERRALS_ONLY_DEMO is now false so Admin is live.
No migration: old tables stay, unused.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The morning brief was withheld whenever a partner like "Marrowpine Grief
Center" had a follow-up due: the brief's JSON keeps its list on one line
("\n" as two characters), so a person's card name was judged in the same
sentence as the care word in an org's name. In tool results and replies
only: read "\n" as a line break, mask board organisation names before the
checks, and let a whole card name in a clean code-built line pass. Her
typed messages and memories are unchanged. mcp morning_brief test pins
the follow-ups so it no longer depends on the date.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@itennell
itennell merged commit 471b29f into main Nov 4, 2026
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