feat(#213): add update POC functionality with API integration#214
feat(#213): add update POC functionality with API integration#214iamitprakash merged 4 commits intodevelopfrom
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Summary by CodeRabbit
WalkthroughAdds a new Teams API method and type to update a team’s POC, and integrates a UI action in team-members to appoint a POC with mutation, query invalidation, and toast notifications. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant UI as TeamMembers UI
participant Mut as updatePocMutation
participant API as TeamsApi.updateTeamPoc
participant Srv as Server
participant QC as QueryClient
User->>UI: Click "Appoint as POC" on member
UI->>Mut: mutate({ teamId, poc_id })
Mut->>API: PATCH /v1/teams/{teamId} { poc_id }
API->>Srv: Request
Srv-->>API: 200 TeamDto
API-->>Mut: TeamDto
Mut-->>UI: onSuccess
UI->>QC: invalidateQueries(team-by-id)
QC->>Srv: refetch team-by-id
Srv-->>QC: TeamDto (updated POC)
QC-->>UI: updated data
UI-->>User: Success toast and refreshed view
alt Error
Srv-->>API: Error
API-->>Mut: Error
Mut-->>UI: onError
UI-->>User: Error toast
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ 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 |
There was a problem hiding this comment.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
| Category | Issue | Status |
|---|---|---|
| Cache key function parameter mismatch ▹ view | ||
| Redundant Type Annotation ▹ view | ||
| Missing error context in POC update failure ▹ view | ||
| Inconsistent property naming convention ▹ view | ||
| Unclear POC abbreviation in parameter name ▹ view | ||
| Race condition between cache invalidation and UI update ▹ view | ||
| Insufficient permission checks for POC appointment ▹ view |
Files scanned
| File Path | Reviewed |
|---|---|
| src/api/teams/teams.type.ts | ✅ |
| src/api/teams/teams.api.ts | ✅ |
| src/components/teams/team-members.tsx | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
src/api/teams/teams.api.ts(2 hunks)src/api/teams/teams.type.ts(1 hunks)src/components/teams/team-members.tsx(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
src/api/teams/teams.api.ts (2)
src/api/teams/teams.type.ts (2)
UpdateTeamPocParams(161-164)TeamDto(38-38)src/lib/api-client.ts (1)
apiClient(6-10)
src/components/teams/team-members.tsx (1)
src/api/teams/teams.api.ts (1)
TeamsApi(16-115)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Cloudflare Pages
b8ba0bc to
396d0cd
Compare
Deploying todo-frontend with
|
| Latest commit: |
7ba92f4
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://fcfe6877.todo-frontend-76p.pages.dev |
| Branch Preview URL: | https://anuj-feat-poc-change.todo-frontend-76p.pages.dev |
… condition in team members component
…ters for improved flexibility
Date: 9 Oct, 2025
Developer Name: @AnujChhikara
Issue Ticket Number
Description
Documentation Updated?
Under Feature Flag
Database Changes
Breaking Changes
Development Tested?
Screenshots
Screenshot 1
Screen.Recording.2025-10-12.at.1.22.49.AM.mov
Test Coverage
Screenshot 1
Additional Notes
Description by Korbit AI
What change is being made?
Implement update POC functionality by adding a new UpdateTeamParams type, a TeamsApi.updateTeam endpoint, and UI integration in TeamMembers to appoint a member as POC with optimistic UI feedback and cache invalidation.
Why are these changes being made?
Enable updating a team's POC via API and reflect the change in the UI, including proper user feedback and cache invalidation for related data.