mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-10-30 16:47:54 +09:00
- Add Notification model with pending/accepted/declined status - Add WorkspaceMember soft-delete via removedAt column - Create notification CRUD (create, list, count, accept, decline) - Wire addMember to create notifications instead of direct insert - Accept handler upserts WorkspaceMember, verifies workspace exists - 7-day TTL expiration on all notification queries - Idempotent duplicate detection for pending invites - Add bell icon with dot indicator and notification popover - Add notification tRPC router (list, count, accept, decline) - Refactor dashboard findMany to object params with UUID validation - Add toast errors on accept/decline failures - Anti-enumeration: silent succeed for non-existent emails
Postgrest
Postgrest-js
Generated Types
pnpm generate-types
or in case of non devcontainer environment
docker compose exec -iT app bash
cd /workspaces/webstudio/packages/postgrest
pnpm generate-types
Playground
pnpm playground ./playground/{file}.ts
# OR
pnpm tsx --env-file ../../apps/builder/.env ./playground/{file}.ts
Next steps.
Use https://supabase.com/docs/reference/cli/supabase-db-start or directly https://github.com/djrobstep/migra for migrations.
Supabase can be used with --db-url flag to not reproduce "local" env
Sql testing
CREATE SCHEMA IF NOT EXISTS pgtap;
DROP EXTENSION pgtap;
CREATE EXTENSION IF NOT EXISTS pgtap WITH SCHEMA pgtap;
pnpx supabase test new latest-builds
docker run --rm --network host -v ./supabase/tests:/tests -e PGOPTIONS='--search_path=pgtap,public' supabase/pg_prove:3.36 pg_prove -d "postgresql://postgres:pass@localhost/webstudio" --ext .sql /tests
# OR
pnpm run db-test