Add brand-design Duck.AI fire button onboarding dialog#8857
Merged
lmac012 merged 4 commits intoJun 18, 2026
Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
4 tasks
857f75a to
f0f440a
Compare
11 tasks
LukasPaczos
approved these changes
Jun 16, 2026
LukasPaczos
left a comment
Contributor
There was a problem hiding this comment.
One request below to remove the flag check, otherwise LGTM!
Make `BrandDesignContextualDaxDialogCta.activeIncludeId` optional. Subclasses that render only title + description — with no in-card button or options — can leave it at the default `0` and the render pipeline gracefully skips slot-related work when `findViewById(activeIncludeId)` returns null. Removes the implicit invariant that every contextual CTA must declare a content slot, and lets future no-content CTAs be defined without inventing a placeholder view in every layout variant the CTA might be inflated into (e.g. landscape). Surface changes: - `activeIncludeId` switched from `abstract val` to `open val activeIncludeId: Int = 0`. - The four `findViewById<View>(activeIncludeId)` sites now bind to `View?`. - `resetAllIncludesExcept(view, active: View)` → `active: View?`. With `active = null`, all slots get hidden. - `snapToFinished(..., activeInclude: View, ...)` → `activeInclude: View?`. The `.alpha = 1f` line becomes a safe call. - The slot-fade-in animator is only added when a slot is present.
Adds a brand-design variant of the Duck.AI fire-button CTA (CtaId.DAX_DUCK_AI_FIRE_BUTTON) so the redesigned visuals stay consistent when both the brand-design and Duck.AI onboarding flags are enabled. The new CTA mirrors DaxFireButtonBrandDesignUpdateContextualCta but preserves the legacy Duck.AI UX: no in-card primary button and no dismiss button — the user dismisses by tapping the actual fire button the arrow points at. To support that, BrandDesignContextualDaxDialogCta gains a `showDismiss` flag (default true) and a new empty content-include slot (`contextualBrandDesignNoCtaContent`) for CTAs that render title + description only.
Four BrowserTab call sites pattern-match on OnboardingDaxDialogCta.DaxDuckAiFireButtonCta to drive fire-button behaviour while the CTA is shown — fire-button pulse highlight, isDuckAiOnboarding flag on the fire flow, fireFireButtonPressed metric, and the dismissal path. The new brand-design variant from DaxDuckAiFireButtonBrandDesignUpdateContextualCta was missed in those checks, so with the brand-design flag on none of those behaviours fired. Treat both types equivalently in each site, with mirroring unit tests.
f0f440a to
65bc4e2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Task/Issue URL: https://app.asana.com/1/137249556945/project/1205648422731273/task/1215626471231067?focus=true
Tech Design URL (if applicable):
Description
Adds a brand-design-update variant of the Duck.AI in-context fire button onboarding
CTA (
CtaId.DAX_DUCK_AI_FIRE_BUTTON).The new CTA mirrors
DaxFireButtonBrandDesignUpdateContextualCtabut preserves the legacyDuck.AI UX: no in-card primary button and no dismiss button — the user dismisses by tapping
the actual fire button.
Supporting changes:
BrandDesignContextualDaxDialogCtanow supports CTAs that render title + descriptiononly:
activeIncludeIdbecomes optional (open val … = 0) and the render pipelinegracefully skips slot work when no content slot is present. A new empty content-include
slot (
contextualBrandDesignNoCtaContent) and ashowDismissflag (defaulttrue)back this.
BrowserTabcall sites that drove fire-button behaviour (pulse highlight,isDuckAiOnboardingflag,fireFireButtonPressedmetric, dismissal) only matched thelegacy
DaxDuckAiFireButtonCta; they now treat the brand-design variant equivalently.onboardingDuckAiExperimentMay26BrandDesignUpdatetoggle (default
INTERNAL).Steps to test this PR
Prerequisites
Brand-design Duck.AI fire-button dialog
it renders in the brand-design style (title + description, no in-card button, no
dismiss button).
dismisses.
Legacy fallback
INTERNAL(on in internal builds). OverrideonboardingDuckAiExperimentMay26BrandDesignUpdateto disabled; confirm thelegacy Duck.AI fire-button CTA renders instead.
UI changes
Note
Low Risk
Onboarding UI and CTA selection only; legacy path remains when brand-design is off, with broad test coverage for parity.
Overview
Introduces
DaxDuckAiFireButtonBrandDesignUpdateContextualCtafor Duck.AI onboarding on Duck Chat URLs when the brand-design update flag is on, replacing the legacyDaxDuckAiFireButtonCtain that path while keeping the sameCtaId.DAX_DUCK_AI_FIRE_BUTTONand “resolve via toolbar fire button” behavior (no in-card primary button,showDismiss = false).BrandDesignContextualDaxDialogCtanow supports title/description-only cards:activeIncludeIdis optional, animations and include reset handle a missing slot,showDismisshides the corner dismiss control, and layout addscontextualBrandDesignNoCtaContentas a padding compensator for no-button CTAs.BrowserTabFragment,BrowserTabViewModel, andCtaViewModeltreat the new CTA like the legacy Duck.AI fire CTA for fire-button pulse/highlight,isDuckAiOnboarding, deferred fire-menu handling, impression metrics, and dismissal.Reviewed by Cursor Bugbot for commit 65bc4e2. Bugbot is set up for automated code reviews on this repo. Configure here.