Skip to content

refactor(festivals): use react-hook-form in FestivalDialog [UPL-77] - #523

Merged
chiptus merged 6 commits into
mainfrom
refactor/UPL-77/festival-dialog-react-hook-form
Oct 12, 2026
Merged

chiptus merged 6 commits into
mainfrom
refactor/UPL-77/festival-dialog-react-hook-form

Conversation

@chiptus

@chiptus chiptus commented Oct 10, 2026

Copy link
Copy Markdown
Owner

UPL-77: moves the festival create/edit dialog from useState form state to react-hook-form with a zod schema, so name/slug errors show inline instead of as toasts. Slug auto-derive-until-edited and sanitize-on-keystroke behaviour are preserved.

Verification

  • Admin → Festivals → New: type a name; the slug follows it. Edit the slug, then change the name; the slug stays.
  • Submit with an empty name or cleared slug; inline field errors show and nothing is created.
  • Create a festival; the dialog closes and it appears in the list.
  • Edit an existing festival; name, slug, description, published and timezone are pre-filled; saving updates it.
  • Close and reopen the dialog; the form is reset.

🤖 Generated with Claude Code

https://claude.ai/code/session_016kJsstrWAyEUDmGUGfxtWn


Generated by Claude Code

Copilot AI balanced review requested due to automatic review settings October 10, 2026 05:09
@vercel

vercel Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
upline Ready Ready Preview Oct 12, 2026 7:07am UTC

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Core behavior is correct; only a non-blocking test-specificity gap remains.

1 open finding
What changed in this PR

Refactors FestivalDialog to use react-hook-form and Zod while preserving slug behavior.

Changes:

  • Adds inline validation and form reset handling.
  • Adds unit tests for validation, slug derivation, submission, editing, and reset.
File Description
FestivalDialog.tsx Migrates festival form state and validation.
FestivalDialog.test.tsx Tests the refactored form workflows.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/pages/admin/festivals/FestivalDialog.test.tsx Outdated
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016kJsstrWAyEUDmGUGfxtWn
@chiptus

chiptus commented Oct 10, 2026

Copy link
Copy Markdown
Owner Author

test / run failed on 78cc048 before any test body ran: the Supabase image pull from public.ecr.aws hit toomanyrequests: Rate exceeded (edge-runtime). This PR doesn't touch that. Re-running the failed job once.


Generated by Claude Code

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Playwright test results

passed  68 passed

Details

stats  68 tests across 22 suites
duration  1 minute, 18 seconds
commit  5889c39

Comment thread src/pages/admin/festivals/FestivalDialog.test.tsx Outdated
Comment thread src/pages/admin/festivals/FestivalDialog.tsx Outdated
Comment thread src/pages/admin/festivals/FestivalDialog.test.tsx Outdated
Comment thread src/pages/admin/festivals/FestivalDialog.test.tsx Outdated
Comment thread src/pages/admin/festivals/FestivalForm/festivalFormSchema.ts Outdated
…ts [UPL-77]

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017W3hceGMCk65xmVAHs4s6f
@chiptus chiptus changed the title refactor(festivals): use react-hook-form in FestivalDialog refactor(festivals): use react-hook-form in FestivalDialog [UPL-77] Oct 12, 2026
@chiptus
chiptus merged commit b9fdf6c into main Oct 12, 2026
10 checks passed
@chiptus
chiptus deleted the refactor/UPL-77/festival-dialog-react-hook-form branch October 12, 2026 14:41

This branch was successfully deployed

1 active deployment
Preview — 5889c39a Deployed Oct 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants