Skip to content

Latest commit

 

History

History
70 lines (64 loc) · 3.72 KB

File metadata and controls

70 lines (64 loc) · 3.72 KB

Changelog

All notable changes to this project will be documented in this file.

[Unreleased]

Added

  • Clicking a recording row now opens a detail dialog showing all recording fields (slot, date, duration, start/end times, activity %, activity type, user ID, location, timestamps, thumbnail).
  • Created anava-web/src/components/ui/dialog.tsx using @radix-ui/react-dialog.
  • Recording detail dialog enhanced with amplitude waveform chart (recharts), OpenStreetMap location embed, and JSON download button.

Changed

  • Selected model is synced to URL query parameter ?model= in anava-web/src/App.tsx for shareable links.

Fixed

  • Fixed POST /anava/recordings endpoint issues:
    • Added support for optional headers with fallback to request body values
    • Fixed aggregate queries for sum and avg calculations using manual aggregation instead of unsupported Supabase syntax
    • Fixed date validation to use getTime() for proper NaN checking
    • Added automatic duration calculation when not provided
    • Improved error handling and response format
  • Fixed GET endpoints database field name issues:
    • Changed all camelCase field references to snake_case to match database schema
    • Fixed userId to user_id in all queries
    • Fixed endTimestamp to end_timestamp in ordering
    • Fixed timestamp to end_timestamp for consistency
    • Fixed slotId to slot_id in analytics
    • Fixed timestamp field names in PUT endpoint for duration recalculation
    • Fixed TypeScript error in web app by adding Vite env typings: created anava-web/src/vite-env.d.ts and typed import.meta.env.VITE_API_URL.

Added

  • Added models listing and model-based analytics/recordings:
    • GET /anava/models - list available models from recordings
    • GET /anava/recordings/model/:model - list recordings for a model (with grouping)
    • GET /anava/recordings/analytics-by-model/:model - analytics for a model (daily/weekly/monthly)
  • Updated web app to use models from API:
    • Replaced user selector with model selector in anava-web/src/App.tsx
    • RecordingsList and AnalyticsDashboard now fetch by model
    • Added getModels, getModelRecordings, getModelAnalytics in anava-web/src/lib/api.ts with fallback to derive models from /anava/recordings
  • Created API endpoints for recording management in Supabase function
    • POST /anava/recordings - Create new recording
    • GET /anava/recordings - List all recordings with filters
    • GET /anava/recordings/:id - Get single recording
    • GET /anava/recordings/user/:userId - Get recordings by user with grouping
    • GET /anava/recordings/analytics/:userId - Get user analytics (daily, weekly, monthly)
    • PUT /anava/recordings/:id - Update recording
    • DELETE /anava/recordings/:id - Delete recording
    • GET /anava/health - Health check endpoint
  • Added database integration with Supabase
    • Created recordings table with proper indexes
    • Implemented Row Level Security (RLS) policies
    • Added automatic timestamp updates via triggers
  • Created Netlify React app with modern UI
    • Built with React 18, TypeScript, and Vite
    • Styled with TailwindCSS and Shadcn/ui components
    • Responsive design for mobile and desktop
  • Implemented recordings list view with daily grouping
    • Expandable/collapsible date sections
    • Display recording details with thumbnails
    • Real-time duration calculations
  • Added comprehensive analytics dashboard
    • Daily, weekly, and monthly statistics
    • Interactive charts using Recharts
    • Activity type and time slot distributions
    • Detailed metrics and summaries
  • Added support for base64 encoded thumbnail images
  • Created comprehensive documentation
    • API documentation with endpoint details
    • Deployment instructions for Supabase and Netlify
    • Database schema documentation