Skip to content

feat(ui-v2): add WorkPoolEditForm component for editing work pools#19876

Merged
desertaxle merged 1 commit intomainfrom
devin/1766089919-work-pool-edit-form
Dec 18, 2025
Merged

feat(ui-v2): add WorkPoolEditForm component for editing work pools#19876
desertaxle merged 1 commit intomainfrom
devin/1766089919-work-pool-edit-form

Conversation

@devin-ai-integration
Copy link
Contributor

Implements Phase 3 of the work pool edit page migration from Vue to React. This PR adds a form component for editing basic work pool fields.

Changes

  • Add WorkPoolEditForm component with four fields:
    • Name: Disabled/read-only field displaying the work pool name
    • Description: Editable textarea (optional, 7 rows)
    • Flow Run Concurrency: Editable number input (optional, converts empty to null)
    • Type: Disabled/read-only field displaying the work pool type
  • Uses react-hook-form with Zod validation
  • Shows toast notifications on success/error
  • Navigates to work pool detail page on successful save
  • Cancel button navigates back via router.history.back()
  • Export useUpdateWorkPool hook and WorkPoolUpdate type from work-pools API
  • Update route component to render the form with the page header

Testing

  • 16 unit tests covering form rendering, field states, submission, navigation, and error handling
  • Storybook stories with MSW handlers for various scenarios (default, null values, error responses, different work pool types)

Human Review Checklist

  • Verify form field behavior matches Vue implementation in prefect-ui-library/src/components/WorkPoolEditForm.vue
  • Confirm API payload uses correct snake_case field names (concurrency_limit, not concurrencyLimit)
  • Check that empty concurrency limit correctly converts to null for the API

Link to Devin run: https://app.devin.ai/sessions/377d92dcbb474d4a905d414d955abca4
Requested by: alex.s@prefect.io (@desertaxle)

Checklist

  • This pull request references any related issue by including "closes <link to issue>"
    • closes OSS-7348
  • If this pull request adds new functionality, it includes unit tests that cover the changes
  • If this pull request removes docs files, it includes redirect settings in mint.json.
  • If this pull request adds functions or classes, it includes helpful docstrings.

- Create WorkPoolEditForm component with name, description, concurrency limit, and type fields
- Name and type fields are disabled/read-only
- Description and concurrency limit fields are editable
- Add comprehensive test file with 16 test cases
- Add Storybook stories with MSW handlers
- Update index.ts exports to include new component and useUpdateWorkPool hook
- Update route component to use new form

Co-Authored-By: alex.s@prefect.io <ajstreed1@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions github-actions bot added the ui-replatform Related to the React UI rewrite label Dec 18, 2025
@desertaxle desertaxle marked this pull request as ready for review December 18, 2025 23:28
@desertaxle desertaxle merged commit f4286ed into main Dec 18, 2025
10 checks passed
@desertaxle desertaxle deleted the devin/1766089919-work-pool-edit-form branch December 18, 2025 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui-replatform Related to the React UI rewrite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant