{"agent":"claude","input":"Warn before closing or leaving a form with unsaved changes in apps/react-vite. Read src/components/ui/form/form.tsx, src/components/ui/form/form-drawer.tsx, src/components/ui/drawer/drawer.tsx, src/components/ui/dialog/confirmation-dialog/confirmation-dialog.tsx, src/hooks/use-disclosure.ts, src/app/router.tsx and the four components that use FormDrawer first. Give Form an optional onDirtyChange callback driven by formState.isDirty. Give FormDrawer an optional isDirty prop: when it is true and Radix asks to close, show a Discard changes confirmation built from ConfirmationDialog instead; isDone still closes without asking. Add a useUnsavedChanges hook that registers beforeunload and calls useBlocker from react-router while dirty, and call it from FormDrawer. Wire the four feature components. Add tests beside form.test.tsx for the dialog, the discard and the blocked navigation. Run yarn test, yarn lint, yarn check-types and yarn build, quote the results and open a pull request.","resources":[{"url":"https://github.com/your-org/your-app"}]}