-
Notifications
You must be signed in to change notification settings - Fork 14
feat: display created by in Edit Todo modal #201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: display created by in Edit Todo modal #201
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. Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Summary by CodeRabbit
WalkthroughAdds a Created By field to the Todo form schema and public type, initializes it from existing data, and renders it read-only in edit mode. Updates TodoUtil to populate createdBy from todo.createdBy when available. Introduces a UserIcon for the display. No submit/cancel logic changes. Changes
Sequence Diagram(s)sequenceDiagram
actor U as User
participant M as Edit Todo Modal
participant TU as TodoUtil.getDefaultTodoFormData
participant F as Form (Zod schema)
U->>M: Open Edit Todo
M->>TU: Request default form data
TU-->>M: { title, ..., createdBy: {label,value} }
M->>F: Initialize form with data
F-->>M: Form state ready
M->>U: Render fields (Created By read-only)
U->>M: Submit/Cancel (unchanged flow)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks (5 passed)✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
| Category | Issue | Status |
|---|---|---|
| Incorrect Default Value for Created By Field ▹ view | ✅ Fix detected |
Files scanned
| File Path | Reviewed |
|---|---|
| lib/todo-util.ts | ✅ |
| components/create-edit-todo-form.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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (2)
components/create-edit-todo-form.tsx(4 hunks)lib/todo-util.ts(1 hunks)
🔇 Additional comments (2)
components/create-edit-todo-form.tsx (1)
21-21: LGTM: Icon import
UserIconimport is correct and used below.lib/todo-util.ts (1)
65-70: LGTM: Safe mapping ofcreatedByinto form defaults –todo.createdBy.nameand.idalign withTTaskCreatedBy.
|
@shobhan-sundar-goutam files structure has been changed with latest migration, kindly update the branch and fix the merge conflicts |
| label: z.string(), | ||
| value: z.string(), | ||
| }) | ||
| .optional(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can createdBy be optional in a task?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional is there to avoid any issues for Create Task. createdBy is used only for edit todo modal. Please check the new PR #204
|
Closing this PR as we got breaking changes merged into develop. Opened a new PR #204 |
Date: 11-09-25
Developer Name: Shobhan Sundar Goutam (@shobhan-sundar-goutam)
Issue Ticket Number
created byin the modal, not on table #200Description
This PR adds a
Created Byfield to the Edit Todo modal, displaying the name of the user who originally created the task.Documentation Updated?
Under Feature Flag
Database Changes
Breaking Changes
Development Tested?
Screenshots
Screenshot 1
Test Coverage
Screenshot 1
Additional Notes
Description by Korbit AI
What change is being made?
Display the "Created By" information in the Edit Todo modal.
Why are these changes being made?
These changes provide additional context to users by showing who created the task, which is particularly useful in collaborative environments. The implementation adds a
createdByfield to the form schema and updates relevant components to display this information only in edit mode, ensuring consistency with the application's existing functionality.