wacrm/src/app
Arnas Donauskas 873ba1f4c6
feat(inbox): gate media send behind 'chat_media' beta flag
Media sends (photo/video/document/voice) are now opt-in per account via
the existing profiles.beta_features mechanism (migration 011 — same
pattern used to dogfood Flows before GA). No migration needed.

- New shared `hasBetaFeature` + `CHAT_MEDIA_BETA` ('chat_media') key, and
  a `useBetaFeature` client hook mirroring useCan (false while loading).
- Composer: the attach menu, hidden file inputs, and voice recorder only
  render when the flag is on; the hint indent reverts so non-beta users
  see the unchanged text + template composer.
- Server: the send route rejects media kinds (403) and the transcode
  route rejects (403) unless the caller's profile is opted in — so the
  endpoints can't be driven ahead of the rollout. Text + templates stay
  available to everyone.

Enable for one account via Supabase Studio:
  UPDATE profiles SET beta_features = array_append(beta_features, 'chat_media')
  WHERE email = 'someone@example.com';

Tests: hasBetaFeature null-safety + membership (419 total). typecheck/lint/build green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 10:44:02 +03:00
..
(auth) fix(theme): light-mode polish from review pass 2026-06-17 09:28:22 +03:00
(dashboard) feat(contacts): allow bulk-deleting selected contacts (#239) 2026-06-17 16:44:41 +03:00
api feat(inbox): gate media send behind 'chat_media' beta flag 2026-06-18 10:44:02 +03:00
join feat(theme): add light/dark mode toggle (#243) 2026-06-16 17:29:46 +03:00
globals.css feat(theme): add light/dark mode toggle (#243) 2026-06-16 17:29:46 +03:00
icon.tsx feat(theme): sweep remaining violet-* → primary across all surfaces 2026-05-22 17:00:32 +03:00
layout.tsx feat(theme): add light/dark mode toggle (#243) 2026-06-16 17:29:46 +03:00
page.tsx Revert "feat(i18n): re-attempt next-intl with hardened artifact tracing" 2026-05-31 21:05:34 +03:00