Onboarding Brand Design Update: Add Default Browser page#8514
Conversation
| private const val HEADER_IMAGE_MIN_DP = 180 | ||
| private const val HEADER_IMAGE_DESIGN_WIDTH_DP = 514 | ||
| const val DEFAULT_BROWSER_REQUEST_CODE_DIALOG = 101 | ||
| const val DEFAULT_BROWSER_RESULT_CODE_DIALOG_INTERNAL = 102 |
There was a problem hiding this comment.
Duplicated result code constant creates fragile cross-class dependency
Medium Severity
BrandDesignUpdateDefaultBrowserPage defines its own DEFAULT_BROWSER_RESULT_CODE_DIALOG_INTERNAL = 102, but BrowserActivity sends the result using DefaultBrowserPage.DEFAULT_BROWSER_RESULT_CODE_DIALOG_INTERNAL. These are independent constants that happen to share the same value. If the value in DefaultBrowserPage ever changes, BrowserActivity would send a different result code, and this fragment would silently fail to recognize it — misclassifying an internal-browser result as DialogDismissed. The constant here needs to reference the single source of truth rather than redefining it.
Please tell me if this was useful or not with a 👍 or 👎.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 813bc8d. Configure here.
| const val DEFAULT_BROWSER_REQUEST_CODE_DIALOG = 101 | ||
| const val DEFAULT_BROWSER_RESULT_CODE_DIALOG_INTERNAL = 102 | ||
| } | ||
| } |
There was a problem hiding this comment.
Near-complete fragment duplication from DefaultBrowserPage
Low Severity
BrandDesignUpdateDefaultBrowserPage is a near-complete copy of DefaultBrowserPage — roughly 120+ lines of identical logic including observeViewModel, setButtonsBehaviour, showInstructionsCard, hideInstructionsCard, onLaunchDefaultBrowserWithDialogClicked, onLaunchDefaultBrowserSettingsClicked, onActivityResult, and all lifecycle methods. Both use the same DefaultBrowserPageViewModel. Extracting shared behavior into a delegate or shared helper would reduce duplication and the risk of inconsistent bug fixes across the two classes.
Please tell me if this was useful or not with a 👍 or 👎.
Reviewed by Cursor Bugbot for commit 813bc8d. Configure here.
813bc8d to
8967fc8
Compare
2b3bc76 to
5144b64
Compare
8967fc8 to
f98ac15
Compare
5144b64 to
0f32eba
Compare
f98ac15 to
d8b0eb8
Compare
0f32eba to
37837c3
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 3 total unresolved issues (including 2 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d8b0eb8. Configure here.
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content" | ||
| android:layout_marginHorizontal="@dimen/keyline_6" | ||
| android:layout_marginTop="40dp" |
There was a problem hiding this comment.
Hardcoded non-keyline margin values in portrait layout
Low Severity
The browserProtectionTitle uses android:layout_marginTop="40dp" and browserProtectionSubtitle uses android:layout_marginTop="20dp". Neither value corresponds to an existing keyline — 40dp falls between keyline_6 (32dp) and keyline_7 (48dp), and 20dp falls between keyline_4 (16dp) and keyline_5 (24dp). Per the keyline spacing rule, hardcoded layout_margin* values in layout XML that don't align with a @dimen/keyline_* reference are flagged.
Additional Locations (1)
Triggered by learned rule: Use @dimen/keyline_* references for margin and padding in layout XML
Reviewed by Cursor Bugbot for commit d8b0eb8. Configure here.
d8b0eb8 to
c014e0d
Compare
37837c3 to
aac9d44
Compare
…re it into the page manager
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
aac9d44 to
89562a2
Compare
c014e0d to
4800237
Compare



Task/Issue URL: https://app.asana.com/1/137249556945/project/1207908166761516/task/1212699268790172?focus=true
Description
Adds a new brand-design Default Browser page to the onboarding flow, gated behind the
onboardingBrandDesignUpdatefeature flag.The page is only inserted into the flow when
shouldShowDefaultBrowserPage()returns true — i.e. on devices where the system role-manager / default-browser chooser isn't available and the user has to navigate to system settings manually. This mirrors the gating of the legacyDefaultBrowserPage; it's just the surface that's new.With the flag on:
BrandDesignUpdateDefaultBrowserPagefragment with the 2026 brand-design layout — new header illustration, restyled title / subtitle, primary "Set as default browser" + secondary "Continue" buttons.BrandDesignUpdateDefaultBrowserPageBlueprintis appended tobuildBrandDesignUpdatePageBlueprints()whenevershouldShowDefaultBrowserPage()is true.With the flag off:
buildPageBlueprints()still emits the existingDefaultBrowserBlueprint, and the originalDefaultBrowserPagerenders exactly as before.Steps to test this PR
Designs
To see these changes, patch:
Flag on (API ≤ 28)
Flag off
onboardingBrandDesignUpdatetoggled off via internal settings), repeat the fresh install on an API ≤ 28 device.DefaultBrowserPagerenders unchanged (no new illustration, original copy, original buttons).Flag on, API ≥ 29
UI changes
Screenshots: see the Screenshots subtask.
Note
Medium Risk
Moderate risk because it changes onboarding page sequencing and adds a new fragment with activity-result handling and system-settings deep links, which could affect navigation on older devices.
Overview
Adds a new brand-design variant of the onboarding Default Browser step via
BrandDesignUpdateDefaultBrowserPage, including new portrait/landscape layouts and header-image sizing logic.Extends the onboarding page builder/blueprints and updates
buildBrandDesignUpdatePageBlueprints()to append the new default-browser page whenshouldShowDefaultBrowserPage()is true, plus new unit tests covering the brand-design page count/order gating.Reviewed by Cursor Bugbot for commit 4800237. Bugbot is set up for automated code reviews on this repo. Configure here.