Skip to content

fix: destructure formState properties to enable proper Proxy subscription#28661

Open
Umesh-Tiruvalluru wants to merge 1 commit intocalcom:mainfrom
Umesh-Tiruvalluru:fix/formstate-proxy-subscription
Open

fix: destructure formState properties to enable proper Proxy subscription#28661
Umesh-Tiruvalluru wants to merge 1 commit intocalcom:mainfrom
Umesh-Tiruvalluru:fix/formstate-proxy-subscription

Conversation

@Umesh-Tiruvalluru
Copy link
Copy Markdown

What does this PR do?

Fixes #25208

Destructures formState properties (isDirty, isSubmitting, isValid, errors) at the component level instead of accessing them directly through the form object.

Per react-hook-form's documentation, formState is wrapped with a Proxy and properties must be destructured to enable proper subscription and re-renders. The same fix was already applied in #25197 for routing forms — this PR extends it to all remaining instances.

Affected files:

  • AgentConfigurationSheet.tsxisDirty (two forms)
  • WorkflowPage.tsxisDirty
  • EventTypeLayout.tsxisDirty
  • IntegrationAttributeSyncCard.tsxisDirty
  • WebhookForm.tsxisDirty
  • AvailabilitySettings.tsxisDirty
  • PasswordView.tsxisDirty, isSubmitting
  • AdminUser.tsxisValid, isSubmitting
  • LicenseSelection.tsxisValid
  • EditLocationDialog.tsxerrors

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • N/A — no documentation changes required.
  • N/A — this is a refactor that ensures correct Proxy subscription, not a behavior change. Existing tests cover form functionality.

How should this be tested?

  • No environment variables needed
  • Navigate to any of the affected pages (Event Type settings, Webhooks, Availability, Workflows, Password settings)
  • Verify forms load without console errors
  • Verify Save/Submit buttons correctly enable when form is dirty and disable when form is clean

@Umesh-Tiruvalluru Umesh-Tiruvalluru requested review from a team as code owners March 29, 2026 18:51
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 29, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added Stale 🐛 bug Something isn't working labels Mar 29, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 11 files

@github-actions github-actions bot removed the Stale label Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix formState Proxy subscription issues by destructuring properties

2 participants