Skip to content

Conversation

@vaishalimaheshwari2000
Copy link
Contributor

@vaishalimaheshwari2000 vaishalimaheshwari2000 commented Apr 10, 2025

Date: @11/04/2025
Developer Name: Vaishali

Issue Ticket Number

Description

Update the filter dropdown by replacing "COMPLETED" with "DONE", and remove the associated feature flag to make the change available unconditionally.

Documentation Updated?

  • Yes
  • No

Under Feature Flag

  • Yes
  • No

Database Changes

  • Yes
  • No

Breaking Changes

  • Yes
  • No

Development Tested?

  • Yes
  • No

Screenshots

Screenshot 1

image

Test Coverage

Screenshot 1

image

Screen Record

Screen Recording
tasks-status-real-dev-squad-google-chrome-2025-04-12-17-27-13_QfrfgVEy.mp4

Additional Notes

@vercel
Copy link

vercel bot commented Apr 10, 2025

@vaishalimaheshwari2000 is attempting to deploy a commit to the RDS-Team Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link

coderabbitai bot commented Apr 10, 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

  • Style
    • Task status labels have been updated to display as “Done” instead of “Completed” for improved clarity.
  • Refactor
    • Streamlined task filtering options in dropdowns and detail views for a consistent, simplified user experience.
    • Removed conditional behavior based on development mode to ensure uniform status presentation across the application.

Walkthrough

This pull request updates task status terminology throughout the test suites and source components. The tests now expect the status value “Done” instead of “Completed” and have removed conditions related to the development flag. In the production code, conditional logic and status filtering have been streamlined by eliminating unnecessary dev mode checks and updating the status handling functions accordingly.

Changes

File(s) Change Summary
__tests__/Unit/Components/Tasks/Card.test.tsx, __tests__/Unit/Components/Tasks/FilterDropdown.test.tsx, __tests__/Unit/Components/Tasks/TaskDetails.test.tsx, __tests__/Unit/Components/Tasks/TaskDropDown.test.tsx, __tests__/Unit/Components/Tasks/TaskStatusEditMode.test.tsx Updated expected status values from “Completed” to “Done”, removed assertions and parameters related to the dev flag, and simplified test logic for status rendering.
src/components/taskDetails/TaskDetailsSection.tsx, src/components/tasks/TaskDropDown.tsx, src/components/tasks/TaskSearch/FilterDropdown.tsx, src/components/tasks/card/TaskStatusEditMode.tsx, src/components/tasks/card/index.tsx Removed conditional checks for dev mode, updated status terminology in component rendering, and streamlined the filtering and beautification logic for task statuses.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant TDS as TaskDetailsSection
    participant TD as TaskDropDown
    participant TSEM as TaskStatusEditMode

    U->>TDS: Initiate render of task details
    alt Editing Mode Active
      TDS->>TD: Render task dropdown
      TD->>TSEM: Beautify status ("Done")
      TSEM-->>TD: Return formatted status
      TD-->>TDS: Provide updated dropdown
    else Non-Editing Mode
      TDS->>TSEM: Beautify status ("Done")
      TSEM-->>TDS: Return formatted status
    end
    TDS-->>U: Display task details with updated status
Loading

Possibly related PRs

Suggested reviewers

  • AnujChhikara
  • MayankBansal12
  • iamitprakash
  • pankajjs
  • Achintya-Chatterjee

Poem

Oh, I’m a rabbit with code in my paws,
Hopping through changes without a pause.
“Done” now shines where “Completed” once lay,
Simplified checks lead the way.
In my burrow of tests, I cheer with delight,
Debugging by day and coding by night!
🐇🥕 Hop on, bugs—everything’s looking bright!


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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • 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 generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

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 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

@coderabbitai coderabbitai bot left a 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

🔭 Outside diff range comments (1)
src/components/tasks/TaskSearch/FilterDropdown.tsx (1)

28-29: 🧹 Nitpick (assertive)

Consider removing unused isDevMode variable

The isDevMode variable is still defined but no longer used in the filtering logic after the simplification. Consider removing it to improve code cleanliness.

    const router = useRouter();
-    const isDevMode = router.query.dev === 'true';
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6bf3e03 and 292efce.

📒 Files selected for processing (10)
  • __tests__/Unit/Components/Tasks/Card.test.tsx (1 hunks)
  • __tests__/Unit/Components/Tasks/FilterDropdown.test.tsx (1 hunks)
  • __tests__/Unit/Components/Tasks/TaskDetails.test.tsx (2 hunks)
  • __tests__/Unit/Components/Tasks/TaskDropDown.test.tsx (1 hunks)
  • __tests__/Unit/Components/Tasks/TaskStatusEditMode.test.tsx (2 hunks)
  • src/components/taskDetails/TaskDetailsSection.tsx (1 hunks)
  • src/components/tasks/TaskDropDown.tsx (2 hunks)
  • src/components/tasks/TaskSearch/FilterDropdown.tsx (1 hunks)
  • src/components/tasks/card/TaskStatusEditMode.tsx (2 hunks)
  • src/components/tasks/card/index.tsx (2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (4)
__tests__/Unit/Components/Tasks/Card.test.tsx (1)
src/constants/constants.ts (1)
  • DONE (5-5)
src/components/tasks/card/TaskStatusEditMode.tsx (1)
src/constants/task-status.ts (1)
  • BACKEND_TASK_STATUS (39-56)
__tests__/Unit/Components/Tasks/TaskDropDown.test.tsx (1)
src/constants/task-status.ts (1)
  • BACKEND_TASK_STATUS (39-56)
src/components/tasks/TaskDropDown.tsx (2)
src/constants/task-status.ts (1)
  • BACKEND_TASK_STATUS (39-56)
src/components/tasks/card/TaskStatusEditMode.tsx (1)
  • beautifyStatus (89-89)
🔇 Additional comments (14)
__tests__/Unit/Components/Tasks/TaskDropDown.test.tsx (1)

125-132: Approved: Status terminology update

The change from BACKEND_TASK_STATUS.COMPLETED to BACKEND_TASK_STATUS.DONE and the removal of the isDevMode prop aligns with standardizing on the "Done" status, removing the feature flag dependency.

__tests__/Unit/Components/Tasks/TaskDetails.test.tsx (2)

225-230: Approved: Removed dev flag dependency

The test description and implementation have been updated to reflect that "Done" status is now used consistently without requiring the dev flag condition.


249-254: Approved: Removed dev flag parameter

Consistent with the earlier change, the dev flag parameter has been removed from the renderWithRouter call, correctly reflecting the standardized status handling.

src/components/taskDetails/TaskDetailsSection.tsx (1)

49-49: Approved: Simplified status beautification

The isDevMode parameter has been removed from the beautifyStatus function call, correctly implementing the standardized status handling approach.

src/components/tasks/TaskSearch/FilterDropdown.tsx (1)

51-52: Filter logic simplified to exclude 'COMPLETED' unconditionally

The filter condition has been simplified to always exclude 'COMPLETED' tasks, removing the conditional logic based on the development mode. This aligns with standardizing on 'DONE' status across all environments.

__tests__/Unit/Components/Tasks/Card.test.tsx (2)

560-560: Test updated to expect 'Done' instead of 'Completed'

The test expectation has been updated to reflect the standardized task status terminology, changing from 'Completed' to 'Done'.


566-568: Test case updated to use DONE status constant

The test case has been updated to reflect the standardized status terminology, changing from COMPLETED to DONE constant. This ensures consistency with the new status handling throughout the application.

src/components/tasks/card/TaskStatusEditMode.tsx (2)

12-12: Added import for BACKEND_TASK_STATUS constant

The import for BACKEND_TASK_STATUS provides better type safety and maintainability for status comparisons.


21-25: Simplified beautifyStatus function to always convert COMPLETED to DONE

The function has been simplified to always convert 'COMPLETED' status to 'DONE', removing the conditional logic based on development mode. This aligns with standardizing status terminology across environments.

Consider adding a comment to clarify this intentional standardization for future developers:

const beautifyStatus = (status: string) => {
    let beautifiedStatus = status;
+    // Always convert COMPLETED to DONE as part of standardizing status terminology
    if (beautifiedStatus === BACKEND_TASK_STATUS.COMPLETED) {
        beautifiedStatus = 'DONE';
    }
src/components/tasks/card/index.tsx (1)

586-586: Updated beautifyStatus call to match new function signature

The call to beautifyStatus has been updated to remove the isDevMode parameter, aligning with the function's new signature and the standardization of status terminology.

__tests__/Unit/Components/Tasks/TaskStatusEditMode.test.tsx (2)

113-117: Updated filtering logic to match new terminology standards

The filtering logic now excludes 'COMPLETED' instead of 'DONE', which aligns with the standardization on "Done" terminology throughout the application. This change is consistent with removing the feature flag.


161-163: Simplified beautifyStatus test for better clarity

The test now directly verifies that BACKEND_TASK_STATUS.COMPLETED is converted to "Done" without relying on a development mode parameter. This simplification helps maintain clearer test expectations while confirming the proper status name conversion.

src/components/tasks/TaskDropDown.tsx (2)

34-35: Simplified filtering logic for task statuses

The filtering logic has been improved to consistently exclude 'COMPLETED' status regardless of development mode, which streamlines the code and aligns with standardizing on "Done" terminology.


123-123: Removed isDevMode parameter from beautifyStatus call

The removal of the isDevMode parameter is consistent with the other changes that standardize on "Done" terminology without relying on development mode flags.

@vaishalimaheshwari2000 vaishalimaheshwari2000 force-pushed the chore/remove-feature-flag-DONE branch from 573764e to 3f07b31 Compare April 10, 2025 22:39
@vaishalimaheshwari2000 vaishalimaheshwari2000 changed the title Chore/remove feature flag done : ISSUE resolved chore: update filter dropdown to replace COMPLETED with DONE Apr 11, 2025
@MayankBansal12
Copy link
Member

Hi @vaishalimaheshwari2000, can you please add a screen recording and provide a better description for your changes?

@vaishalimaheshwari2000 vaishalimaheshwari2000 changed the title chore: update filter dropdown to replace COMPLETED with DONE chore: update filter dropdown to replace COMPLETED with DONE and also remove the feature flag Apr 12, 2025
@vaishalimaheshwari2000 vaishalimaheshwari2000 changed the title chore: update filter dropdown to replace COMPLETED with DONE and also remove the feature flag chore: Replace "COMPLETED" statusn with "DONE" status in filter dropdown and remove feature flag Apr 12, 2025
@vaishalimaheshwari2000
Copy link
Contributor Author

Hi @vaishalimaheshwari2000, can you please add a screen recording and provide a better description for your changes?

Yes , I have updated the description as well as and attached the screen recording

@vaishalimaheshwari2000 vaishalimaheshwari2000 changed the title chore: Replace "COMPLETED" statusn with "DONE" status in filter dropdown and remove feature flag chore: In filterDropDown from Completed to Done status and also remove feature flag Apr 15, 2025
@vaishalimaheshwari2000 vaishalimaheshwari2000 changed the title chore: In filterDropDown from Completed to Done status and also remove feature flag chore: In filterDropDown change from Completed to Done status and also remove feature flag Apr 15, 2025
MayankBansal12
MayankBansal12 previously approved these changes Apr 19, 2025
Copy link
Contributor

@AnujChhikara AnujChhikara left a comment

Choose a reason for hiding this comment

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

Hello @vaishalimaheshwari2000 can we please write the pr title better , also why you have checked under feature flag checkbox?

@vaishalimaheshwari2000
Copy link
Contributor Author

Hello @vaishalimaheshwari2000 can we please write the pr title better , also why you have checked under feature flag checkbox?

I'm sorry @AnujChhikara for checked under the feature flag . Yeah , Sure I'll try to write it best

@vaishalimaheshwari2000 vaishalimaheshwari2000 changed the title chore: In filterDropDown change from Completed to Done status and also remove feature flag chore: Replace "COMPLETED" with "DONE" in filter dropdown and remove feature flag Apr 24, 2025
(isDevMode && tab === 'COMPLETED') ||
(!isDevMode && tab === 'DONE')
)
tab !== 'COMPLETED'
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't even need this check, we have a export const depreciatedTaskStatus = ['AVAILABLE']; at@/interfaces/task.type, add this status value in that array, it would be skipped anyway.

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.

6 participants