Skip to content

Conversation

@RishiChaubey31
Copy link
Contributor

@RishiChaubey31 RishiChaubey31 commented Aug 29, 2025

Date: 10-09-2025

Developer Name: Rishi Chaubey


Issue Ticket Number

Description

  • Fix 1: When a user changes the status of a task to "Assigned," the progress was incorrectly set to 100%. It has been corrected to set the progress to 0%.

  • Fix 2: When a user changes the status to "In Progress," the progress was incorrectly set to 0%. This has been fixed so that the progress remains unchanged.

Documentation Updated?

  • Yes
  • No

Under Feature Flag

  • Yes
  • No

Database Changes

  • Yes
  • No

Breaking Changes

  • Yes
  • No

Development Tested?

  • Yes
  • No

Screenshots

Screenshot 1
assigned-task.mp4

Test Coverage

Screenshot 1 Screenshot 2025-09-14 160048

Additional Notes

Description by Korbit AI

What change is being made?

Adjust the condition within TaskStatusDropdown.tsx to reset the task progress to 0% when the task status changes to Assigned.

Why are these changes being made?

Previously, the progress bar would incorrectly jump to 100% when task status changed to Assigned, causing confusion for users. Integrating the Assigned status into the existing check for resetting progress ensures consistency in UI behavior, aligning with user expectations and preventing misrepresentation of task progress.

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

@vercel
Copy link

vercel bot commented Aug 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
status-app Error Error Sep 27, 2025 8:34pm
website-status Error Error Sep 27, 2025 8:34pm

@coderabbitai
Copy link

coderabbitai bot commented Aug 29, 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

  • Bug Fixes
    • When changing a task’s status to Assigned, its progress now resets to 0 (consistent with In Progress), unless the task is Blocked or already at 0.
    • Ensures status transitions reflect the correct initial progress value in the task dropdown.

Walkthrough

Updates TaskStatusDropdown to reset task progress to 0 when status changes to ASSIGNED, in addition to IN_PROGRESS, if current status is not BLOCKED and progress isn’t already 0. Introduces a boolean for ASSIGNED status and adjusts the condition that determines progress reset. No exports or public declarations changed.

Changes

Cohort / File(s) Summary
Task status progress reset logic
src/components/tasks/TaskStatusDropdown.tsx
Adds isNewStatusAssigned and updates shouldTaskProgressBe0 to trigger reset when new status is IN_PROGRESS or ASSIGNED (and current status not BLOCKED, progress != 0). No other control flow or API changes.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor U as User
    participant D as TaskStatusDropdown (UI)
    participant S as Task State

    U->>D: Select new status (e.g., ASSIGNED)
    D->>D: Determine isNewStatusInProgress / isNewStatusAssigned
    alt New status is IN_PROGRESS or ASSIGNED
        opt Current status != BLOCKED and progress != 0
            D->>S: Set progress = 0
            Note right of D: Progress reset on status change
        end
    else Other statuses
        D->>S: Keep existing progress
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Suggested reviewers

  • tejaskh3
  • AnujChhikara
  • yesyash

Poem

A rabbit taps the status pane,
“Assigned,” I grin—reset the lane.
From halfway hops to zero bound,
No blocked burrow, smooth new ground.
Carrots counted, progress clear,
Now onward, tasks—let’s shift a gear! 🥕

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/assigned-status

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

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

    |\__/,|   (`\
  _.|o o  |_   ) )
-(((---(((--------
Files scanned
File Path Reviewed
src/components/tasks/TaskStatusDropdown.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

@RishiChaubey31 RishiChaubey31 changed the title fix: Progress bar jumps to 100% when task status changes to Assigned. Fix Progress Update Logic When Changing Status to "Assigned" and "In Progress" Sep 15, 2025
const timestamp = 1640995200;
const result = formatToRelativeTime(timestamp);
expect(result).toBe('3 years ago');
expect(result).toBe('4 years ago');
Copy link
Contributor

Choose a reason for hiding this comment

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

  • any specific reason to change this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes it was failing for some reason so after discussing with @MayankBansal12 I updated this

Copy link
Contributor

Choose a reason for hiding this comment

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

  • but this is not the right fix for this

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed this as this was a flaky test which was failing in CI/CD so fixed it.

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.

Fix Progress Update Logic When Changing Status to "Assigned" and "In Progress"

3 participants