Repository navigation
Conversation
UPL-54: extend the BEFORE INSERT dedupe triggers to groups, stages, festivals and festival_editions and stop sending client-computed slugs from the group and stage create paths. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019fa8de7wuEMyUbpJgwn1Uv
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
"Require staging label for migrations" is red because this PR adds a migration and has no Generated by Claude Code |
|
Deploy →
|
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Slug allocation can race across overlapping bases, and an existing edition-dialog test contradicts the new behavior.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Extends database-managed slug generation to groups, stages, festivals, and editions, following the existing artist/set pattern.
Changes:
- Adds scoped slug deduplication triggers.
- Delegates group and stage slug creation to the database.
- Adds integration coverage for generated slugs, collisions, and explicit values.
| File | Description |
|---|---|
supabase/migrations/20261005050700_add_remaining_slug_dedupe_triggers.sql |
Adds four slug-generation triggers. |
src/test/integration/slugTriggers.integration.test.ts |
Tests slug generation and uniqueness scopes. |
src/api/stages/useCreateStage.ts |
Requests database-generated stage slugs. |
src/api/groups/useCreateGroup.ts |
Requests database-generated group slugs. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Playwright test resultsDetails
|
Copilot review on #518: different bases can resolve to the same final slug, so the advisory lock is now keyed on the uniqueness scope. Explicit slugs are no longer suffixed, so a taken one still surfaces as a conflict in the admin dialogs. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019fa8de7wuEMyUbpJgwn1Uv
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019fa8de7wuEMyUbpJgwn1Uv
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019fa8de7wuEMyUbpJgwn1Uv
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019fa8de7wuEMyUbpJgwn1Uv
Copilot review on #518: an uncommitted explicit insert (e.g. commit_schedule) must serialize with concurrent derived inserts, or the derived one picks the same slug and hits the unique constraint. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019fa8de7wuEMyUbpJgwn1Uv

UPL-54: adds BEFORE INSERT slug triggers for groups, stages, festivals and festival_editions (same idea as sets/artists) and stops the group/stage create hooks from computing slugs client-side.
Derived slugs get
-2,-3, … within each table's unique scope; an explicit slug (admin festival dialogs) is kept as-is and still errors on conflict. The festival dialogs still auto-fill their visible slug field in the UI, so that path sends an explicit slug.Verification
-2.כנסיית השכל); it gets a non-emptyn-xxxxxxxxslug.pnpm run test:integration -- slugTriggersagainst local Supabase passes.Note: this adds a migration, so the PR needs the
staginglabel (maintainer-applied) to pass the migration gate.🤖 Generated with Claude Code
https://claude.ai/code/session_019fa8de7wuEMyUbpJgwn1Uv