Skip to content

Conversation

@MayankBansal12
Copy link
Member

Date: 22-03-2025

Developer Name: @MayankBansal12


Issue Ticket Number:-

Description:

  • This PR removes the feature flag from /mobile page. The feature is concerned with mobile login using qr-code and has been tested and working fine in prod under feature flag.

Is Under Feature Flag

  • Yes
  • No

Database changes

  • Yes
  • No

Breaking changes (If your feature is breaking/missing something please mention pending tickets)

  • Yes
  • No

Is Development Tested?

  • Yes
  • No

Tested in staging?

  • Yes
  • No

Add relevant Screenshot below ( e.g test coverage etc. )

Screencast
screencast.mp4
Tests test test`

@coderabbitai
Copy link

coderabbitai bot commented Mar 21, 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

  • Refactor
    • Streamlined mobile page routing to ensure a consistent experience by removing an extra pre-check that previously led to unexpected redirections.

Walkthrough

The pull request removes the pre-condition check for the dev query parameter in the mobile route. Previously, the route would redirect to a "page not found" if the parameter did not equal "true." Both the routing method and its associated tests have been updated to reflect this change, now simply ensuring that the mobile route is instantiated without the feature flag condition.

Changes

File(s) Change Summary
app/routes/mobile.js Removed the beforeModel method that checked the dev query parameter and redirected to /page-not-found when the value was not "true".
tests/unit/routes/mobile-test.js Removed tests for the beforeModel hook; updated tests to verify the mobile route’s existence and removed unnecessary test stubs and restorations.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant MobileRoute
    Client->>MobileRoute: Request /mobile?dev=value
    Note over MobileRoute: Removed pre-check for 'dev' parameter
    MobileRoute->>MobileRoute: Execute model hook (fetch user profile)
    MobileRoute->>Client: Return profile data
Loading

Assessment against linked issues

Objective Addressed Explanation
Remove dev feature flag check from mobile route (#1018)

Possibly related PRs

Suggested reviewers

  • prakashchoudhary07
  • tejaskh3
  • Suvidh-kaushik
  • iamitprakash

Poem

Oh, what a thrill from a rabbit's view,
The code now hops with changes so new.
No more checks for a secret flag's cue,
The mobile route leaps right on through.
Carrots and code, a blend so true!
🐇💻
Hopping into a cleaner route anew!


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

@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: 1

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between e6fe49e and b484b0e.

📒 Files selected for processing (2)
  • app/routes/mobile.js (0 hunks)
  • tests/unit/routes/mobile-test.js (1 hunks)
💤 Files with no reviewable changes (1)
  • app/routes/mobile.js
🔇 Additional comments (2)
tests/unit/routes/mobile-test.js (2)

10-17: Hooks properly updated after feature flag removal.

The beforeEach and afterEach hooks have been correctly simplified to only handle the fetch stub, removing the previously needed transitionTo stub and restore calls that were required for testing the feature flag behavior.


1-52:

Details

❓ Verification inconclusive

Confirm test coverage is sufficient after feature flag removal.

The removed tests for feature flag behavior are no longer needed, which aligns with the PR objectives. However, consider whether it might be valuable to add a test that explicitly verifies the route no longer checks for the "dev" query parameter, ensuring complete removal of the feature flag.


🏁 Script executed:

#!/bin/bash
# Check the actual mobile route implementation to confirm feature flag has been removed
echo "Checking mobile route implementation:"
cat app/routes/mobile.js 2>/dev/null || echo "Mobile route file not found at expected location"

# Look for any remaining references to the dev parameter
echo -e "\nChecking for any remaining references to the dev parameter:"
rg -i "dev.*param|param.*dev" --type js app

Length of output: 2848


Mobile Route Feature Flag Removal Verification

The mobile route (app/routes/mobile.js) no longer contains any logic that checks or uses the "dev" query parameter. The tests in tests/unit/routes/mobile-test.js remain valid for the current behavior (fetching user profile data and handling error responses) after the removal of the feature flag logic.

  • Verified that the mobile route implementation no longer references the "dev" parameter.
  • The existing tests cover API responses and general route behavior. However, to guard against potential regressions, consider adding an explicit test that asserts the absence of "dev" query parameter handling in the mobile route.

@tejaskh3
Copy link
Contributor

tejaskh3 commented Apr 4, 2025

Please don't remove that until it got tested completely on the main site with dev flag.

@MayankBansal12 MayankBansal12 force-pushed the chore/mobile-feature-flag branch from 020f3a3 to 785dcf5 Compare January 6, 2026 11:18
@iamitprakash iamitprakash merged commit 992e7b9 into RealDevSquad:develop Jan 6, 2026
3 checks passed
@MayankBansal12 MayankBansal12 mentioned this pull request Jan 7, 2026
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.

Remove Feature Flag from /mobile page

5 participants