CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

feat: feature-gap build wave — wire dead UI, 7 new pages, DB persistence, .dev hosts, admin auth #4068

Merged⚡ AI-generatedXSccantynz wants to mergeclaude/code-audit-feature-gaps-acq2mvmainopened Jun 11, 2026
ccantynzcommented Jun 11, 2026

Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/AlecRae.com/pull/63


Why

PR #62's audit found the web UI exposed ~20% of the backend, the sidebar was literally unclickable, /v1/admin/* was unprotected, 10 stores lost data on restart, and .dev placeholder hostnames blocked customer-domain onboarding. This PR closes all of it. Note: main is currently red (PR #62 merged with an in-flight typed-routes error) — the first commit here fixes that, so merging this PR restores green.

What's in it

Fixes

  • Sidebar navigation was dead (layout never passed onNavigate; clicks were preventDefault'd into a no-op) — fixed, plus the Next typed-routes follow-up (9b724d9)
  • /v1/admin/* had no admin check — any authenticated user could read cross-account stats/users/messages. New requireAdmin() (admin scope or owner/admin DB role)
  • Two cross-tenant leaks: import GET /status/:id and collaborate comments now account-scoped

Web — wiring + new surface

  • Inbox no-ops now real: AI reply, AI summarize (new aiWritingApi), Cmd+K command palette (shared store), focus mode
  • RecipientAutocomplete in compose; InboxHeatmapView on analytics
  • New pages: /automations (AI rules, auto-responder, workflows), /calendar, /tasks, /search (AI + email query console), /voice (clone manager + voice replies), /scripts, /settings/developer (API keys, webhooks, Zapier/Make/n8n integrations)
  • Sidebar reorganized: Mail / Tools / Automation / Manage

Backend — persistence (issue #28)

  • All 10 in-memory stores → Postgres: 12 new tables in migration 0002_goofy_scarecrow.sql; exact API response shapes preserved; documented hybrid for snooze undo (timer in-memory, window persisted + reconciled after restart). Run bun run db:migrate before prod.

Production blockers

  • Issue #26 closed: every .dev hostname (dns, mta, analytics tracking, inbound, imap, support copy, .env.example) is env-driven with .com defaults matching the onboarding runbook
  • Fail-fast env validation at API boot in production (assertProductionEnv()): DATABASE_URL, JWT_SECRET ≥32, WEBAUTHN_RP_ID/ORIGIN; warn-only for recommended vars

Docs

  • CLAUDE.md known-issues #26–#32 updated; audit doc carries a same-day status update

Verification

  • Web: next build green (all new routes generated), web tests pass, ESLint clean
  • API: tsc clean, 136/136 tests (39 new)
  • DB: db:check-drift in sync (3 migrations)
  • Services: dns 20/20, mta 245/245 tests; tsc clean in dns/mta/inbound/imap/support
  • Docs: docs:check 49/49 stamped

https://claude.ai/code/session_013mN1D3m3P95nke5gceVegG

ccantynzcommented Jun 11, 2026

Originally written by @vercel[bot] on GitHub.


Deployment failed with the following error:

There is no GitHub account connected to this Vercel account.
ccantynzcommented Jun 11, 2026

Originally written by @vercel[bot] on GitHub.


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

Project Deployment Actions Updated (UTC)
alec-rae-com-admin Ready Ready Preview, Comment Jun 11, 2026 11:41am

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
⮌ Merged

This pull request was merged into main.

c comment · e edit title · m merge · a approve · r request changes · ? shortcuts