Skip to content

chore(webapp): upgrade @conform-to to v1#4044

Open
carderne wants to merge 3 commits into
mainfrom
chore/conform-v1
Open

chore(webapp): upgrade @conform-to to v1#4044
carderne wants to merge 3 commits into
mainfrom
chore/conform-v1

Conversation

@carderne

@carderne carderne commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Upgrades the dashboard form layer from @conform-to 0.9 to 1.x. No behaviour change is intended; this is the conform API migration only.

conform 1.x peer-depends on zod ^3.21 || ^4, so it runs on the current zod 3 and is a prerequisite for upgrading the repo to zod 4: conform 0.9 imports ZodNativeEnum, ZodEffects, and ZodPipeline, all removed in zod 4, so the webapp cannot build against zod 4 until conform is on 1.x. Landing this first (on zod 3) keeps the zod 4 PR focused on zod alone.

Migration

The standard 0.9 to 1.x API changes across the form files: parse to parseWithZod, the conform.* helpers to getInputProps/getFormProps/etc., useFieldList/useFieldset to field.getFieldList()/field.getFieldset(), list/requestIntent to the form.insert/form.remove intents, immutable submission.reply({ fieldErrors }) in actions, and field.error (string) to field.errors (string[]).

Verified locally: webapp typecheck and build are green, and the full repo typecheck passes. There are no conform unit tests; form behaviour still needs manual/E2E QA before this comes out of draft.

TODO before merging

  • test a lot more

Migrate the dashboard form layer from @conform-to 0.9 to the 1.x API.
conform 1.x peer-depends on zod ^3.21 || ^4, so it runs on the current
zod 3 and unblocks the zod 4 upgrade (conform 0.9 cannot bundle against
zod 4, which removed ZodNativeEnum, ZodEffects, and ZodPipeline).
@changeset-bot

changeset-bot Bot commented Jun 25, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e5d7cff

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The PR upgrades the webapp to Conform 1.x. It updates shared components and many routes to use parseWithZod, getFormProps, getInputProps, getSelectProps, getTextareaProps, lastResult, fields, form.insert, form.remove, and submission.reply()-based validation and error handling. It also updates apps/webapp/package.json and adds a change-log entry in .server-changes/conform-v1.md.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 2.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The PR description has a solid summary and migration details, but it omits the required Checklist, Testing, Changelog, and Screenshots sections. Add the template sections with completed checklist items, testing steps, a short changelog, and screenshots or state that none are needed.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: upgrading @conform-to to v1 in webapp.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/conform-v1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot]

This comment was marked as resolved.

Address CodeRabbit feedback on the conform 1.x migration: use defaultValue
(not value) on hidden inputs so they stay uncontrolled, return the env-var
project-lookup failure as a form-level error, join multi-message field
errors when rendering, and clone alerts.emails before using it as mutable
field-list state.
@carderne carderne marked this pull request as ready for review June 25, 2026 16:25
devin-ai-integration[bot]

This comment was marked as resolved.

The schedules and branches add-on purchase modals detected conform
responses with "intent" in fetcher.data, but conform v1's
submission.reply() returns a status field, not intent, so lastResult was
always undefined and server-side errors never rendered. Switch the guard
to "status" in fetcher.data, matching the rest of the migration.

@devin-ai-integration devin-ai-integration Bot 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.

Devin Review found 0 new potential issues.

Open in Devin Review

@carderne carderne mentioned this pull request Jun 25, 2026
2 tasks
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.

1 participant