feat(ui-v2): add WorkPoolEditForm component for editing work pools#13
Conversation
- 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>
📝 WalkthroughWalkthroughThis PR introduces a new work pool edit form feature, including a React component for editing work pools, supporting API hooks and types, comprehensive test coverage, Storybook stories, and updates the routing to render the new edit interface. Changes
Sequence DiagramsequenceDiagram
participant User
participant Form as WorkPoolEditForm
participant Router as Router
participant Hook as useUpdateWorkPool
participant API as API
participant Toast as Toast System
User->>Form: Edit fields & Submit
Form->>Hook: Call updateWorkPool(payload)
Hook->>API: PATCH /api/work_pools/:name
alt Success (204)
API-->>Hook: Success response
Hook-->>Form: Success callback
Form->>Toast: Show success message
Form->>Router: Navigate to detail page
Router-->>User: Redirect
else Error
API-->>Hook: Error response
Hook-->>Form: Error callback
Form->>Toast: Show error message
Form-->>User: Display error to user
end
User->>Form: Click Cancel
Form->>Router: Navigate back
Router-->>User: Return to previous page
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Benchmark PR from agentic-review-benchmarks#13
Summary by CodeRabbit
Release Notes