Skip to content

Conversation

@matteo8p
Copy link
Collaborator

Fixing a lot of inefficient implementations with use-server-form, AddServerModal.tsx, and EditServerModal.tsx.

@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Nov 22, 2025
@matteo8p matteo8p merged commit 7cbf452 into main Nov 22, 2025
1 of 2 checks passed
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 22, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request refactors form state management across the connection server modals and their underlying hook. The changes replace a composite serverFormData object with discrete, individually-managed state variables (name, type, url, commandInput, etc.). The useServerForm hook's return contract is updated to expose these granular state values and their setters instead of the previous monolithic object. Both AddServerModal and EditServerModal are updated to read from and write to these individual fields. Validation and form-building logic are reworked to operate directly on local state rather than a shared data structure.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 63a6c26 and 76e8383.

📒 Files selected for processing (3)
  • client/src/components/connection/AddServerModal.tsx (10 hunks)
  • client/src/components/connection/EditServerModal.tsx (8 hunks)
  • client/src/components/connection/hooks/use-server-form.ts (9 hunks)

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 and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants