Skip to content

Code Review Bench PR #19876 - feat(ui-v2): add WorkPoolEditForm component for editing work pools#13

Open
tomerqodo wants to merge 2 commits into
base_pr_19876_20260125_5247from
corrupted_pr_19876_20260125_5247
Open

Code Review Bench PR #19876 - feat(ui-v2): add WorkPoolEditForm component for editing work pools#13
tomerqodo wants to merge 2 commits into
base_pr_19876_20260125_5247from
corrupted_pr_19876_20260125_5247

Conversation

@tomerqodo

Copy link
Copy Markdown

Code Review Bench PR PrefectHQ#19876

Original PR Title: feat(ui-v2): add WorkPoolEditForm component for editing work pools
Original PR Description: 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.
    Original PR URL: feat(ui-v2): add WorkPoolEditForm component for editing work pools PrefectHQ/prefect#19876

devin-ai-integration Bot and others added 2 commits January 25, 2026 12:11
- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant