canvas-website/backlog/tasks/task-048 - Version-History-...

1.6 KiB

id title status assignee created_date updated_date labels dependencies priority
task-048 Version History & CryptID Registration Enhancements Done
2025-12-10 22:22 2025-12-10 22:22
feature
auth
history
high

Description

Add version history feature with diff visualization and enhance CryptID registration flow with email backup

Implementation Notes

Implementation Summary

Email Service (SendGrid → Resend)

  • Updated worker/types.ts to use RESEND_API_KEY
  • Updated worker/cryptidAuth.ts sendEmail() to use Resend API

CryptID Registration Flow

  • Multi-step registration: welcome → username → email → success
  • Detailed explainer about passwordless authentication
  • Email backup for multi-device access
  • Added email field to Session type

Version History Feature

Backend API Endpoints:

  • GET /room/:roomId/history - Get version history
  • GET /room/:roomId/snapshot/:hash - Get snapshot at version
  • POST /room/:roomId/diff - Compute diff between versions
  • POST /room/:roomId/revert - Revert to a version

Frontend Components:

  • VersionHistoryPanel.tsx - Timeline with diff visualization
  • useVersionHistory.ts - React hook for programmatic access
  • GREEN highlighting for added shapes
  • RED highlighting for removed shapes
  • PURPLE highlighting for modified shapes

Other Fixes

  • Network graph connect/trust buttons now work
  • CryptID dropdown integration buttons improved
  • Obsidian vault connection modal added

Pushed to dev branch: commit 195cc7f