-
Notifications
You must be signed in to change notification settings - Fork 164
fix(#1011): update extension request card status from 'Completed' to 'Done' #1012
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
Conversation
Deploying dashboard-rds with
|
| Latest commit: |
0271393
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://81bf3001.dashboard-rds.pages.dev |
| Branch Preview URL: | https://refactor-replace-complete-wi.dashboard-rds.pages.dev |
Summary by CodeRabbit
WalkthroughThe changes introduce support for the "COMPLETED" task status across the application. Mock data for a completed task and its related extension request was added. The UI logic in components and extension requests scripts now normalizes "COMPLETED" to display as "DONE". Corresponding test cases and mock data handling were updated to validate this scenario. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant UI
participant MockServer
participant Component
User->>UI: Navigates to extension request page
UI->>MockServer: Requests task details (with taskId)
MockServer-->>UI: Responds with taskCompleted data (status: "COMPLETED")
UI->>Component: Passes task status
Component->>Component: Normalizes status ("COMPLETED" → "DONE")
Component-->>UI: Renders status as "DONE"
UI-->>User: Displays extension request card with status "DONE"
Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (6)
__tests__/extension-requests/extension-requests.test.js(5 hunks)__tests__/task-requests/task-requestDetails.test.js(1 hunks)components/request-card/script.js(1 hunks)extension-requests/script.js(1 hunks)mock-data/extension-requests/index.js(2 hunks)mock-data/tasks/index.js(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
__tests__/extension-requests/extension-requests.test.js (3)
mock-data/constants.js (2)
STAGING_API_URL(1-1)LOCAL_TEST_PAGE_URL(2-2)mock-data/tasks/index.js (1)
taskCompleted(94-118)mock-data/extension-requests/index.js (1)
extensionRequestsTaskCompleted(221-237)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build-test (22.x)
🔇 Additional comments (8)
__tests__/task-requests/task-requestDetails.test.js (1)
426-428: LGTM! Excellent test reliability improvement.Adding the explicit wait for toast visibility prevents potential race conditions and makes the test more robust. This ensures the toast component is fully rendered before proceeding with assertions.
mock-data/extension-requests/index.js (1)
221-247: LGTM! Mock data structure is consistent and well-formed.The new
extensionRequestsTaskCompletedmock object follows the established patterns and provides the necessary data structure for testing extension requests related to completed tasks.mock-data/tasks/index.js (1)
94-124: LGTM! Mock data correctly represents a completed task.The
taskCompletedmock object is well-structured with logical field values (100% completion, "COMPLETED" status) that properly support testing the status normalization feature.components/request-card/script.js (1)
392-395: LGTM! Status normalization logic is correctly implemented.The conditional check properly normalizes the "COMPLETED" status to "DONE" for consistent UI display. The variable scope change from
consttoletis necessary and appropriate for the reassignment.extension-requests/script.js (1)
1434-1437: LGTM! Consistent status normalization across components.The implementation matches the logic in
components/request-card/script.js, ensuring uniform behavior when displaying task status across different parts of the application. This consistency is crucial for maintaining a coherent user experience.__tests__/extension-requests/extension-requests.test.js (3)
10-10: LGTM: Mock data imports properly addedThe imports for
extensionRequestsTaskCompletedandtaskCompletedare correctly added and follow the existing import patterns.Also applies to: 24-28
143-155: LGTM: Network interception for COMPLETED task statusThe network interception setup correctly handles the specific task ID and returns the appropriate mock data for the COMPLETED status scenario.
381-396: LGTM: Extension requests network interception setupThe network interception properly handles both dev and non-dev flag scenarios for the extension requests filtered by task ID and status.
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 |
|---|---|---|
| Inconsistent Task Status Value ▹ view | ||
| Inconsistent Status Transformation ▹ view |
Files scanned
| File Path | Reviewed |
|---|---|
| mock-data/tasks/index.js | ✅ |
| mock-data/extension-requests/index.js | ✅ |
| components/request-card/script.js | ✅ |
| extension-requests/script.js | ✅ |
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.
pankajjs
left a 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.
LGTM
Date: 10 June 2025
Developer Name: @AnujChhikara
Issue Ticket Number
Description
Documentation Updated?
Under Feature Flag
Database Changes
Breaking Changes
Development Tested?
Screenshots
Screenshot 1
brave_EwfcEY0V1j.mp4
Test Coverage
Screenshot 1
Additional Notes
Description by Korbit AI
What change is being made?
Replace the task status "COMPLETED" with "DONE" in the extension request card display logic and associated tests.
Why are these changes being made?
This change aligns the task status in the interface with user expectations by using a more conventional and easily understood term "DONE" instead of "COMPLETED", thus improving user interpretation of task statuses. The update is reflected across the relevant components and test cases to ensure consistent behavior and display.