mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-04 05:37:43 +01:00
The managed Supabase Cloud project (ohkueislstxomdjavyhs) is retired; the self-hosted instance at supabase.orangecat.ch on the Hetzner box is the single source of truth. Repoint the image host + setup scripts, rewrite the agent/dev guidance to use the self-host directly (not the Supabase MCP, which only reaches the retired cloud), update active docs, exit retired cloud-Management-API scripts behind a RETIRED guard, env-ify direct-connect scripts, gitignore .env-backups, and add a founder-run DECOMMISSION-CLOUD runbook. No live code path references the managed project anymore. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
45 lines
1.7 KiB
Bash
Executable File
45 lines
1.7 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
SERVICE_KEY="${SUPABASE_SERVICE_ROLE_KEY}"
|
|
BASE_URL="${NEXT_PUBLIC_SUPABASE_URL:?NEXT_PUBLIC_SUPABASE_URL is required (self-hosted: https://supabase.orangecat.ch) - managed cloud retired}"
|
|
|
|
CONV_ID="2ef0fe8f-79ba-497e-8fe2-b66a9e4759a3"
|
|
USER_ID="cec88bc9-557f-452b-92f1-e093092fecd6"
|
|
|
|
echo "=== Testing Complete Messaging Flow ==="
|
|
|
|
echo ""
|
|
echo "1. Fetching messages with sender info..."
|
|
curl -s "${BASE_URL}/rest/v1/messages?conversation_id=eq.${CONV_ID}&select=*,profiles:sender_id(id,username,name,avatar_url)&order=created_at.desc&limit=3" \
|
|
-H "apikey: ${SERVICE_KEY}" \
|
|
-H "Authorization: Bearer ${SERVICE_KEY}" | jq '.[0:2]'
|
|
|
|
echo ""
|
|
echo "2. Checking conversation last_message_at..."
|
|
curl -s "${BASE_URL}/rest/v1/conversations?id=eq.${CONV_ID}&select=id,last_message_at,last_message_preview,last_message_sender_id" \
|
|
-H "apikey: ${SERVICE_KEY}" \
|
|
-H "Authorization: Bearer ${SERVICE_KEY}" | jq .
|
|
|
|
echo ""
|
|
echo "3. Testing message_details view..."
|
|
curl -s "${BASE_URL}/rest/v1/message_details?conversation_id=eq.${CONV_ID}&limit=2" \
|
|
-H "apikey: ${SERVICE_KEY}" \
|
|
-H "Authorization: Bearer ${SERVICE_KEY}" | jq '.[0]'
|
|
|
|
echo ""
|
|
echo "4. Testing participant read times..."
|
|
curl -s "${BASE_URL}/rest/v1/conversation_participants?conversation_id=eq.${CONV_ID}&select=user_id,last_read_at,is_active" \
|
|
-H "apikey: ${SERVICE_KEY}" \
|
|
-H "Authorization: Bearer ${SERVICE_KEY}" | jq .
|
|
|
|
echo ""
|
|
echo "5. Verifying realtime publication status..."
|
|
curl -s "${BASE_URL}/rest/v1/rpc/pg_catalog.pg_publication_tables" \
|
|
-H "apikey: ${SERVICE_KEY}" \
|
|
-H "Authorization: Bearer ${SERVICE_KEY}" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{}' 2>/dev/null || echo "Unable to check publication tables directly"
|
|
|
|
echo ""
|
|
echo "=== Test Complete ==="
|