🐛 Bug Description
update_last_active() and upsert_staged_file() use "now()" as a plain string value in the update dict. The Supabase Python client serializes this to JSON, so PostgreSQL receives the literal string "now()" instead of executing the SQL now() function.
🔁 Steps to Reproduce
- Call
update_last_active() for any user.
- Query the
last_active field in the database.
- Observe the field contains the string
"now()" instead of a real timestamp.
✅ Expected Behavior
The last_active and updated_at fields should contain a proper UTC timestamp representing the current time.
❌ Actual Behavior
All timestamps are set to the literal string "now()", corrupting user activity tracking. Features like "last active X ago" display incorrect values, and admin dormant-user detection based on last_active will not work.
🌍 Environment
| Field |
Value |
| OS |
Any |
| VS Code version |
Any |
| GitPhone extension version |
Any |
| Python version |
Any |
📋 Additional Context
Files: backend/supabase_service.py:54, backend/supabase_service.py:92
Fix: Use a raw SQL expression (supabase.rpc()) or the Supabase schema function to properly emit SQL now().
🐛 Bug Description
update_last_active()andupsert_staged_file()use"now()"as a plain string value in the update dict. The Supabase Python client serializes this to JSON, so PostgreSQL receives the literal string"now()"instead of executing the SQLnow()function.🔁 Steps to Reproduce
update_last_active()for any user.last_activefield in the database."now()"instead of a real timestamp.✅ Expected Behavior
The
last_activeandupdated_atfields should contain a proper UTC timestamp representing the current time.❌ Actual Behavior
All timestamps are set to the literal string
"now()", corrupting user activity tracking. Features like "last active X ago" display incorrect values, and admin dormant-user detection based onlast_activewill not work.🌍 Environment
📋 Additional Context
Files:
backend/supabase_service.py:54,backend/supabase_service.py:92Fix: Use a raw SQL expression (
supabase.rpc()) or the Supabaseschemafunction to properly emit SQLnow().