featurebugfixrefactor

Changelog — March 20, 2026

Major dashboard improvements with sortable tables, archive/unarchive support, and a full download tracking system with history view. Database schema cleanup and hydration fixes complete the day.

✨ New Features

  • Download Tracking & History — Introduces a DownloadEvent model to capture every client download action. Exposes a downloadHistory query (studio-only) and a trackDownload mutation. Adds a dedicated download history tab to the project detail page, with download type column, empty state, and i18n translations (fr, en, es). #PR-310 #PR-312

  • Dashboard Tables Overhaul (WEB-238) — All admin dashboard tables have been significantly enhanced:

    • Projects table: Active/Archived tabs with archive/unarchive actions, monochrome progress circle replacing status badge, total asset count column, sortable headers with visual indicators, archived rows greyed out.
    • Clients table: Storage usage column computed from R2, total asset count.
    • Users table: Email, Last Login, Created At columns with fixed-width constraints.
    • Retouchers table: Email, Created At, validation rate (% approved vs reviewed), last project date.
    • Guidelines table: Type, Size, Created, Updated columns with translated headers.
    • All tables default to 50 rows per page. Empty states refactored to use shadcn Empty component. #PR-311
  • Page Title Template — Dashboard pages now follow the "Page | Etouch" title format for consistent browser tab and SEO metadata. #PR-311

🐛 Bug Fixes

  • Hydration Errors (Dashboard) — Fixed server/client HTML mismatches across the retouchers, guidelines, and users pages. Switched from useSuspenseQuery to useQuery with isMounted guards and enabled flags to ensure consistent rendering on server and client. #PR-311

  • Download Empty State — Simplified the download history empty state to an inline icon + text layout; fixed label size (text-xs) to match the Activity/Calendar components. #PR-312

  • RetouchCategory API — Removed the deprecated name field from the RetouchCategory schema; fixed createRetouchCategory and updateRetouchCategory resolvers to use label/code fields only; regenerated SDK types. #PR-312

♻️ Refactoring & Technical Improvements

  • Database Schema Audit — Comprehensive cleanup of the Prisma schema: added 15 missing indexes on FK fields for improved query performance, added onDelete: SetNull on 7 optional FK relations to prevent orphaned records, removed the dead Asset.capturedAt column, consolidated Project.category (String) into Project.retouchingCategory (enum), and removed ~300 lines of legacy migration fallback code and LEGACY_PROJECT_SELECT constants. GraphQL schema, SDK operations, and frontend updated accordingly. #PR-309

📦 Dependencies & Infrastructure

  • Released versions v1.15.6, v1.16.0, v1.17.0, and v1.18.0 via semantic-release today.
  • Regenerated Prisma client and updated react-email workspace configuration across multiple PRs.

By Théo Daguier