Skip to content

Allow team members to add other members' todos to their watchlist#173

Closed
shobhan-sundar-goutam wants to merge 3 commits intodevelopfrom
feat/watchlist-add-team-members-todos
Closed

Allow team members to add other members' todos to their watchlist#173
shobhan-sundar-goutam wants to merge 3 commits intodevelopfrom
feat/watchlist-add-team-members-todos

Conversation

@shobhan-sundar-goutam
Copy link
Contributor

@shobhan-sundar-goutam shobhan-sundar-goutam commented Aug 7, 2025

Date: 08-08-2025

Developer Name: Shobhan Sundar Goutam (@shobhan-sundar-goutam)


Issue Ticket Number

Closes #150

Description

This PR adds support for allowing members of a team to add other members' todos to their watchlist.
The add/remove from watchlist button is now visible on the team todo list page for all relevant todos.
Additionally user will be able to add other todos in their dashboard to their watchlist

Documentation Updated?

  • Yes
  • No

Under Feature Flag

  • Yes
  • No

Database Changes

  • Yes
  • No

Breaking Changes

  • Yes
  • No

Development Tested?

  • Yes
  • No

Screenshots

Screenshot 1
Screen.Recording.2025-08-08.at.12.04.30.AM.mov

Test Coverage

Screenshot 1 Screenshot 2025-08-08 at 12 21 12 AM

Additional Notes

Description by Korbit AI

What change is being made?

Refactor the todo list table component and team tasks module to allow team members to add other members' todos to their watchlist.

Why are these changes being made?

These changes streamline the user interface by ensuring the WatchListButton is consistently available, enabling team members to monitor tasks efficiently. The refactoring accommodates the feature request to empower collaborative task tracking and improves overall code maintainability by simplifying component conditionals.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

@coderabbitai
Copy link

coderabbitai bot commented Aug 7, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Summary by CodeRabbit

  • New Features

    • The "Watch List" button is now always visible in the actions column of the to-do list table.
  • Style

    • Improved the layout of the actions column for a more consistent appearance.
  • Refactor

    • Simplified the rendering logic for the actions column by removing the placeholder when no actions are available.

Walkthrough

The rendering logic for the "Actions" column in the TodoListTableRow component was updated so that the WatchListButton is always displayed, regardless of the visibility of other action buttons. The placeholder previously shown when no actions were available was removed, and the layout was refactored for consistency.

Changes

Cohort / File(s) Change Summary
TodoListTableRow Actions Refactor
components/todo-list-table.tsx, modules/teams/team-tasks.tsx
Refactored the actions cell to always render a flex container; WatchListButton is now always shown, while other action buttons remain conditionally rendered. Removed the placeholder for no actions.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant TodoListTableRow
    participant WatchListButton

    User->>TodoListTableRow: View team todo list
    TodoListTableRow->>WatchListButton: Render with todoId and watchlist status
    WatchListButton-->>User: Display add/remove from watchlist button
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Assessment against linked issues

Objective Addressed Explanation
Allow members of a team to add other members' todos to their watchlist (#150)
Show add/remove watchlist button on teams todo list page (#150)

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes found.

Possibly related issues

Possibly related PRs

Suggested reviewers

  • amit-flx

Poem

A button for watching, now always in view,
No more dashes or placeholders, just something to do!
With todos to follow, and actions aligned,
The team’s list is clearer, flexibly designed.
🐇✨—A rabbit’s hop makes features shine!

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/watchlist-add-team-members-todos

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've completed my review and didn't find any issues... but I did find this chicken.

  \\
   (o>
  <_ )
   ^^
Files scanned
File Path Reviewed
modules/teams/team-tasks.tsx
components/todo-list-table.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.

Loving Korbit!? Share us on LinkedIn Reddit and X

@MayankBansal12
Copy link
Member

@shobhan-sundar-goutam please check for one more case, where all three action buttons (ReassignButton, EditButton, WatchlistButton) are visible, UI shouldn't break

@shobhan-sundar-goutam
Copy link
Contributor Author

@shobhan-sundar-goutam please check for one more case, where all three action buttons (ReassignButton, EditButton, WatchlistButton) are visible, UI shouldn't break

Is this even possible to have three action buttons all at once?
Edit button is shown when assignee id is equal to the logged in user id
and reassign button is shown when the assignee id is team id, user type is team and poc id is the logged in user id

Can you please tell how you're asking check for three action buttons at once. I'm confused. Please point out if I'm missing anything

Comment on lines -32 to 34
const { user } = useAuth()
const isRessignTodoCtaVisible =
const isReassignTodoCtaVisible =
todo.assignee?.user_type === USER_TYPE_ENUM.TEAM && team?.poc_id === user.id
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed the typo here. Although this is out of the scope of my task. Still fixed it to maintain clean code

@MayankBansal12
Copy link
Member

@shobhan-sundar-goutam please check for one more case, where all three action buttons (ReassignButton, EditButton, WatchlistButton) are visible, UI shouldn't break

Is this even possible to have three action buttons all at once? Edit button is shown when assignee id is equal to the logged in user id and reassign button is shown when the assignee id is team id, user type is team and poc id is the logged in user id

Can you please tell how you're asking check for three action buttons at once. I'm confused. Please point out if I'm missing anything

Sorry i thought as a POC and assignee of task you can view Reassign Button

@MayankBansal12
Copy link
Member

@shobhan-sundar-goutam Please fix merge conflicts, rest looks good!

@yesyash
Copy link
Contributor

yesyash commented Aug 8, 2025

  • closing this as the changes to allow a user to watch tasks from a team's todo list are already merged to develop.

@yesyash yesyash closed this Aug 8, 2025
@yesyash yesyash deleted the feat/watchlist-add-team-members-todos branch August 8, 2025 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

allow members of a team to watch other members todo

3 participants