Skip to content

Conversation

@MayankBansal12
Copy link
Member

@MayankBansal12 MayankBansal12 commented Aug 4, 2025

Date: 04-08-2025

Developer Name: @MayankBansal12


Issue Ticket Number

Description

  • This PR correctly redirects /tasks to status site (previously left as a ToDo comment during my-site migration)
  • Ticket confirming testing for feature on status site

Documentation Updated?

  • Yes
  • No

Under Feature Flag

  • Yes
  • No

Database Changes

  • Yes
  • No

Breaking Changes

  • Yes
  • No

Development Tested?

  • Yes
  • No

Screenshots

Screenshot 1
Screencast.from.2025-08-05.00-16-52.mp4

Description by Korbit AI

What change is being made?

Redirect /tasks to the status site by updating the URL constants, adding a route redirection, and marking a specific test as skipped.

Why are these changes being made?

The /tasks path is deprecated and should redirect to the status site for a more consistent user experience, according to the project's redirection strategy. Updating the constants and route code ensures the system correctly handles requests to the deprecated path, and skipping the affected test prevents test inaccuracies while the functionality changes.

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

@MayankBansal12 MayankBansal12 self-assigned this Aug 4, 2025
@coderabbitai
Copy link

coderabbitai bot commented Aug 4, 2025

Note

Other AI code review bot(s) detected

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

    • Updated internal URLs to support a new tasks page with development mode enabled.
  • Refactor

    • Deprecated the existing tasks route and added automatic redirection to a new location.
  • Tests

    • Temporarily disabled a specific test related to task status changes.

Walkthrough

A new constant for the status site prefix is added and used to define a tasks redirect URL. The /tasks route is updated to redirect immediately to another route using the router service, marking it as deprecated. One integration test related to task status changes is skipped.

Changes

Cohort / File(s) Change Summary
Status Site URL Constants
app/constants/url.js
Added STATUS_SITE_PREFIX from environment; updated REDIRECT_URLS with a new tasks key using this prefix. Removed obsolete TODO comments.
Tasks Route Redirection
app/routes/tasks.js
Injected router service and added a beforeModel() hook to redirect to 'goto' with a query param, marking the route as deprecated.
Skipped Integration Test
tests/integration/components/tasks-test.js
Skipped a specific test by changing test to test.skip; no other test logic changed.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant EmberRouter
    participant TasksRoute

    User->>EmberRouter: Navigates to /tasks
    EmberRouter->>TasksRoute: beforeModel()
    TasksRoute->>EmberRouter: transitionTo('goto', { queryParams: { from: 'tasks' } })
    EmberRouter->>User: Navigates to 'goto' route
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Assessment against linked issues

Objective Addressed Explanation
Add redirection logic from '/tasks' page to my site (#1060)
Test and update '/tasks' page as part of product sign-off (#1060)

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes found.

Possibly related PRs

  • feat: add redirection message #632: Adds a tasks redirect URL and implements a similar beforeModel hook in TasksRoute for redirection, matching the routing and constants changes here.

Poem

The bunny bounced on routes anew,
Redirecting tasks with a hop and a cue.
Constants aligned, old paths set aside,
A test takes a nap, while changes abide.
With every review, the meadow feels bright—
Code springing forward, all working right! 🐇✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/redirect-tasks

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.

@netlify
Copy link

netlify bot commented Aug 4, 2025

Deploy Preview for staging-my ready!

Name Link
🔨 Latest commit 5e76100
🔍 Latest deploy log https://app.netlify.com/projects/staging-my/deploys/689100832dda740008fce99a
😎 Deploy Preview https://deploy-preview-637--staging-my.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Status
Performance Redundant API Call After Redirect ▹ view
Design Missing Deprecation Strategy ▹ view
Functionality Missing Environment Variable Validation ▹ view
Functionality Potentially Unnecessary Query Parameter ▹ view
Files scanned
File Path Reviewed
app/routes/tasks.js
app/constants/url.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.

Loving Korbit!? Share us on LinkedIn Reddit and X

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

🔭 Outside diff range comments (1)
app/routes/tasks.js (1)

22-39: Consider removing unused model method.

Since this route now redirects immediately in beforeModel, the model method will never be executed. Consider removing it to avoid confusion and reduce dead code.

-  model = async () => {
-    try {
-      const response = await fetch(`${API_BASE_URL}/tasks/self`, {
-        credentials: 'include',
-      });
-      if (!response.ok) {
-        if (response.status == 401) {
-          throw new Error('Please log in to continue');
-        }
-        throw new Error('Oops, We ran into a problem!');
-      }
-      return await response.json();
-    } catch (error) {
-      this.toast.error(error, '', toastNotificationTimeoutOptions);
-      // added setTimeout here because before new page opens user should be notified of error by toast
-      setTimeout(redirectAuth, 2000);
-    }
-  };
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between ef3b2cb and de93c78.

📒 Files selected for processing (3)
  • app/constants/url.js (2 hunks)
  • app/routes/tasks.js (1 hunks)
  • tests/integration/components/tasks-test.js (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: in ember.js route hooks like `beforemodel`, when using multiple `transitionto` calls, each call shou...
Learnt from: yesyash
PR: Real-Dev-Squad/website-my#632
File: app/routes/notifications.js:17-19
Timestamp: 2025-05-22T18:21:46.220Z
Learning: In Ember.js route hooks like `beforeModel`, when using multiple `transitionTo` calls, each call should be preceded by a `return` statement to prevent double transitions and TransitionAborted warnings. This is especially important when conditional redirects are used, as subsequent transitions would otherwise override earlier ones.

Applied to files:

  • app/routes/tasks.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Redirect rules - staging-my
  • GitHub Check: Header rules - staging-my
  • GitHub Check: Pages changed - staging-my
  • GitHub Check: build (16.x)
🔇 Additional comments (3)
app/constants/url.js (2)

18-18: LGTM! New constant follows established pattern.

The STATUS_SITE_PREFIX constant is properly defined using the environment variable, following the same pattern as MAIN_SITE_PREFIX.


29-29: LGTM! Tasks redirect URL correctly configured.

The tasks redirect URL properly uses the new STATUS_SITE_PREFIX and includes the dev=true parameter consistent with other redirect URLs in the object.

app/routes/tasks.js (1)

16-16: Verify the correct issue reference.

The comment references issue #1031, but this PR addresses issue #1060. Please verify which issue number is correct.

@iamitprakash iamitprakash merged commit 5f0fd49 into develop Sep 1, 2025
8 checks passed
@iamitprakash iamitprakash deleted the fix/redirect-tasks branch September 1, 2025 17:36
@MayankBansal12 MayankBansal12 mentioned this pull request Sep 5, 2025
10 tasks
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.

[My site migration] feat : '/task' page product sign-off

4 participants