mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-04 07:43:36 +01:00
Forty-five 2025 plans, assessments, design scenarios, status reports and superseded business docs move to docs/archive/ (same relative path). Each described a plan or a snapshot as if it were the running system: strict:false, a five-table schema, an "organization" entity, price_sats, a Gemini /api/chat widget, a /auth/forgot-password page, Google Places, building group labels and contract voting flows that never landed. Fixed in place: NAVIGATION_UX_DESIGN.md (referenced by .claude/rules) gains a status note naming what shipped and where; GENERIC_API_HANDLERS.md lists the handler options the code actually takes; datetime_standards.md points at scripts/dev/; CONTRIBUTING.md describes the auto-merge shipping flow. Inbound links repointed (SECURITY.md at the root, SUPABASE_SCHEMA_GUIDE.md for schema). Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD Co-authored-by: Claude <noreply@anthropic.com>
2.4 KiB
2.4 KiB
Messaging System Notes
created_date: 2025-12-08
last_modified_date: 2025-12-11
last_modified_summary: Link avatars/names in DM list and header to profiles
- Conversations now load via
get_user_conversationsRPC to avoid duplicate rows from older views. - Detail view fallback uses
conversation_detailswith a safemaybeSingleto prevent "Conversation not found" when multiple rows existed. - New migration
20251208_grant_messaging_permissions.sqlgrants authenticated users access to messaging views/functions. - Removed console logging in the new conversation modal to keep production logs clean.
- Validate after deploy: open
/messages, start a new conversation, and send/receive replies between two users. - Next.js 16 (like 15 before it) requires awaiting route
params;messages/[conversationId]handlers now awaitparamsto avoid runtime errors. - Dev-only auto-migration call to
/api/admin/apply-messaging-migrationsnow records failed attempts to prevent repeated 500s whenSUPABASE_ACCESS_TOKENis missing; run the migrations manually when credentials are unavailable. - Auth state changes post to
/api/auth/callbackand also prime the current session on mount so Supabase cookies stay in sync and/api/messageshandlers don’t return 401 on first load. - Conversation fetch now trusts
get_user_conversationsscoping for auth, and if that fails, falls back to any participant row (even inactive) plus a minimal conversation fetch to avoid false 403s that were triggering the new-conversation modal. /api/profilesnow returns a standard paginated array shape (withmetadatafor page/limit/total) so the new-conversation picker renders user rows and search results correctly.- Messages UI now mirrors the split-view DM layout (tabs, refined search, softer empty state with primary CTA) to make starting or finding chats easier.
- Conversation list rows are tightened to the X/Twitter DM look; long-press to enter selection mode on touch, drag across rows (mouse or touch) to select/deselect quickly, and unread chips surface request-like items when the Requests tab is active.
- Message bubbles now show WhatsApp-style delivery/read ticks: single gray = sent, double gray = delivered to someone, double colored = read by all recipients; pending/failed still show inline.
- Bulk delete flows now confirm when removing multiple items and surface success/error toasts for conversations and in-thread message deletes.