Skip to content

Add feature flag for the Suggest redirect feature - #9522

Merged
juandiana merged 1 commit into
developfrom
feature/juan/add_suggest_redirect_on_unresolved_error_feature_flag
Aug 27, 2026
Merged

Add feature flag for the Suggest redirect feature#9522
juandiana merged 1 commit into
developfrom
feature/juan/add_suggest_redirect_on_unresolved_error_feature_flag

Conversation

@juandiana

@juandiana juandiana commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Task/Issue URL: https://app.asana.com/1/137249556945/project/1216807998862658/task/1217572324167492?focus=true

Description

Add the feature flag interface inside the package where the feature will reside. Default value set to false.

Steps to test this PR

  1. Tap on Settings > Feature Flag Inventory.
  2. Search for “suggest”.
  3. Verify that both the suggestRedirectOnUnresolvedError toggle and its suggestRedirect sub-feature toggle are present.

UI changes

N/A


Note

Low Risk
Toggle-only addition with no navigation or error-page logic changes; risk is limited to feature inventory registration.

Overview
Introduces SuggestRedirectOnUnresolvedErrorFeature in app/browser/suggestredirect as a remote-controllable flag for an upcoming behavior: on unresolved bare-domain errors, optionally offer a link to the www subdomain when it resolves.

The feature is registered as suggestRedirectOnUnresolvedError with self() and a suggestRedirect() sub-toggle; both default to off. No user-facing behavior is wired in this PR—only inventory/toggle plumbing for later rollout.

Reviewed by Cursor Bugbot for commit 0879433. Bugbot is set up for automated code reviews on this repo. Configure here.

@juandiana
juandiana requested a review from malmstein August 18, 2026 21:00
@malmstein malmstein self-assigned this Aug 18, 2026

@malmstein malmstein left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Move the flag inside AndroidBrowserConfigFeature, it’s where are all the browser related feature flags live and where you’ll see other error page related flags too.

scope = AppScope::class,
featureName = "suggestRedirectOnUnresolvedError",
)
interface SuggestRedirectOnUnresolvedErrorFeature {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this should live inside AndroidBrowserConfigFeature and not as a separate flag.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That was my initial choice. However, a new lint, NoNewBrowserFeatureToggle, was introduced last week that prevents new toggles from being added to the AndroidBrowserConfigFeature interface. You may see it (here).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@malmstein @juandiana Correct, as written in https://app.asana.com/1/137249556945/project/1202561462274611/task/1217462888888561?focus=true we recently moved AndroidBrowserConfigFeature from :app module to a new module to unblock extraction of several features from the :app module.

We want to avoid adding new feature flags to the new module and the guidance is that they should be owned by whatever feature actually needs it. If we strongly believe that a new feature flag belongs in AndroidBrowserConfigFeature then an exception can be made. Do we think this is such a case?

cc @aibrahim- @anikiki

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I missed that task Domen, my bad. That makes total sense then, let's follow the new rules instead and keep this outside.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I believe the PR is already in good shape. It follows the first case from the article @landomen cited:

One -impl module reads it → put the @ContributesRemoteFeature interface in that -impl module.

Please let me know if I missed something otherwise.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No, looks good @juandiana

@juandiana
juandiana requested a review from malmstein August 20, 2026 15:30

@malmstein malmstein left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Discussed with @landomen and @anikiki . Moving forward with this

@juandiana
juandiana added this pull request to the merge queue Aug 27, 2026
Merged via the queue into develop with commit 55ff2c7 Aug 27, 2026
49 of 50 checks passed
@juandiana
juandiana deleted the feature/juan/add_suggest_redirect_on_unresolved_error_feature_flag branch August 27, 2026 04:22
CrisBarreiro added a commit that referenced this pull request Aug 28, 2026
The step gated on `base.ref == default_branch`, but a stacked PR keeps its
parent's branch as base.ref even after the merge queue lands its commit
directly on develop, so every PR above the root of a stack was skipped.

Compare the PR's merge commit against the default branch instead: `behind`
or `identical` means the commit is on develop, whatever the PR targeted.
Verified against the Suggest-redirect stack (#9522/#9547/#9580, all now
resolve true) and against PRs whose commits genuinely never reached develop
(they report `diverged`).

The compare status is teed to the log so a false result can be told apart
from the commit not having reached the branch yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants