feat: [US-046] - Presence indicators for active collaborators

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Gustavo Henrique Santos Souza de Miranda
2026-01-23 15:42:07 -03:00
co-authored by Claude Opus 4.5
parent 7278b7527f
commit f92fc1ad01
5 changed files with 118 additions and 8 deletions
+10
View File
@@ -20,6 +20,15 @@ export default async function EditorPage({ params }: PageProps) {
return null
}
// Fetch user's display name for presence
const { data: profile } = await supabase
.from('profiles')
.select('display_name')
.eq('id', user.id)
.single()
const userDisplayName = profile?.display_name || user.email || 'Anonymous'
// Try to load as owner first
const { data: ownedProject } = await supabase
.from('projects')
@@ -102,6 +111,7 @@ export default async function EditorPage({ params }: PageProps) {
<FlowchartEditor
projectId={project.id}
userId={user.id}
userDisplayName={userDisplayName}
isOwner={isOwner}
initialData={flowchartData}
needsMigration={needsMigration}