Add persistent bottom-right product marketing window
Related: https://github.com/Expensify/Expensify/issues/656359
Background
Today, in-app product marketing is mostly two surfaces: the Announcements slot on Home, and Concierge harpoons. Both share the same core problem — they disappear from view without explicit user action. Announcements only lives on Home, so it's invisible everywhere else in the app, and harpoons compete for space with support and other Concierge messages.
This initiative introduces a persistent bottom-right window that stays visible across the app, on web and mobile, regardless of which page the user is on, until they explicitly dismiss it. This gives us a reliable framework for monthly product updates and targeted feature reach-outs, and improves our odds of reaching a user while their interest in a given feature is active.
Scope
- Add a persistent, dismissible window anchored to the bottom-right of the app.
- The window remains visible across page navigation within the app until the user dismisses it.
- Support a single active window at a time (no stacking/queueing in this release).
- Each window includes an image/illustration, a heading, supporting body copy, a primary CTA, and a
Dismissaction. - Once dismissed, the window does not reappear for that specific announcement.
- Support audience-based targeting so a given announcement's content can vary by the user's role.
- Never show the window at the same time as a centered modal; the modal always takes precedence.
Product and design details
Placement and persistence
The window renders fixed to the bottom-right corner of the app, above other page content, and persists across navigation — moving from Home to Spend to Workspaces, for example, does not dismiss it. It remains until the user taps Dismiss or completes the primary CTA.
Anatomy
Each window follows a consistent template:
- Visual: an illustration or product screenshot representative of the feature being promoted.
- Heading: short, bolded (e.g. "Upload your expense policy PDF").
- Body copy: 1–2 sentences describing the feature and its benefit (e.g. "Admins can now upload a PDF of their expense policy directly to their workspace, making it visible to all employees in one place.").
- Primary CTA: green pill button that routes the user to the relevant feature or flow (e.g.
Try it out). - Secondary action: a
Dismissbutton that closes the window.
Dismissal behavior
Dismissal is scoped per announcement: tapping Dismiss closes the window for that specific announcement only. A subsequent monthly update or feature reach-out is a new announcement, so it can still surface even if the user dismissed a prior one.
Content source
Content for each window is authored by the marketing team per in-product update — image/illustration, heading, body copy, and CTA destination are all supplied by marketing for each release, not generated dynamically.
Audience targeting
A single announcement can carry different content depending on the user's role, so marketing can promote the most relevant feature to each audience rather than a one-size-fits-all message. Role is evaluated as follows:
- Member only (not an admin on any workspace): sees the member-targeted variant.
- Admin (admin on at least one workspace): sees the admin-targeted variant.
- Both (member on some workspaces, admin on others): admin prevails — the user sees the admin-targeted variant.
Each announcement therefore needs, at minimum, a member variant and an admin variant of the heading/body/CTA; marketing supplies both when authoring the announcement.
Precedence vs. centered modal
The bottom-right window and a centered modal are never shown simultaneously. If both are eligible at the same time, the centered modal takes precedence and the window does not render until the modal is dismissed or its condition no longer applies.
Examples
- An admin is on the
Spendpage when a new monthly update ships; the window appears bottom-right without interrupting their current task. - The admin navigates from
SpendtoWorkspaces; the window remains visible in the same position. - A workspace member (no admin role anywhere) sees the member-targeted variant of an announcement; an admin sees the admin-targeted variant of the same announcement.
- A user who is a member of Workspace A and an admin of Workspace B sees the admin-targeted variant, since admin prevails.
- The admin taps
Try it outon an "Upload your expense policy PDF" window; they're routed to the relevant settings page. - The admin taps
Dismissinstead; the window closes for that announcement, but a future announcement (e.g. next month's update) can still appear. - A centered modal becomes eligible while the bottom-right window is already showing: the centered modal takes precedence and the window is suppressed until the modal is dismissed.
Assigning to @danielrvidal to help push it forward from here.
@JmillsExpensify I'd like to work on this, if it's open for external contributors. Thanks!
PS: Everything is already detailed in OP.
Sounds good! We will circle back on next steps, going to add the Internal label for now.
Assigned Jack to help on the internal engineering side.
We should be starting to talk about what features will be in the product update so should have more direction then.
🚨 Edited by proposal-police: This proposal was edited at 2026-07-13 11:48:44 UTC.
Proposal
What is the root cause of that problem?
The existing product announcements cannot provide this behavior because they are ordinary Home widgets. HomePage mounts AnnouncementSection only inside its narrow and wide Home layouts, so the section unmounts as soon as the user navigates to another tab or screen.
https://github.com/Expensify/App/blob/28fe63cff2f9f70a92b6a1b640dc5de7f92dd7e5/src/pages/home/HomePage.tsx#L69-L103
The announcement model is also only a static list of title/subtitle/URL/date records, and AnnouncementSection simply opens each URL. There is no single active marketing-card model, member/admin content variants, app-level host, modal-precedence gate, or per-announcement dismissal check.
https://github.com/Expensify/App/blob/28fe63cff2f9f70a92b6a1b640dc5de7f92dd7e5/src/CONST/index.ts#L8878-L8903
https://github.com/Expensify/App/blob/28fe63cff2f9f70a92b6a1b640dc5de7f92dd7e5/src/pages/home/AnnouncementSection.tsx#L14-L49
What changes do you think we should make in order to solve the problem?
-
Add one explicitly active product-marketing announcement configuration, with
nullmeaning that no window is active. Give that announcement a stable ID and member/admin variants containing the marketing-supplied image, heading, body, CTA label, and CTA destination. Do not scan a list for the next non-dismissed announcement: if the one active ID is dismissed, render nothing until a later release replaces it with a new ID. This preserves the requested one-at-a-time behavior without introducing stacking or queueing. -
Add a
ProductMarketingWindowManagerand responsive presentational component to both platform variants ofRootNavigatorExtraContent. The authenticated root stack already installs this extra-content host outside the changing route screen, so the window can remain mounted while Home, Spend, Workspaces, and other authenticated routes change. Render it as a fixed/absolute bottom-right card on wide layouts and a safe-area-aware, near-full-width bottom card on narrow layouts, following the supplied design.
https://github.com/Expensify/App/blob/28fe63cff2f9f70a92b6a1b640dc5de7f92dd7e5/src/libs/Navigation/AppNavigator/createRootStackNavigator/index.tsx#L1-L22
https://github.com/Expensify/App/blob/28fe63cff2f9f70a92b6a1b640dc5de7f92dd7e5/src/components/Navigation/RootNavigatorExtraContent/index.tsx#L1-L16
https://github.com/Expensify/App/blob/28fe63cff2f9f70a92b6a1b640dc5de7f92dd7e5/src/components/Navigation/RootNavigatorExtraContent/index.native.tsx#L1-L7
- Resolve the audience with the existing active-admin-workspace selector: use the admin variant whenever
useHasActiveAdminPolicies()is true, otherwise use the member variant. Because that hook checks whether any active workspace is administered by the current user, a user who is both a member and an admin correctly receives the admin content.
https://github.com/Expensify/App/blob/28fe63cff2f9f70a92b6a1b640dc5de7f92dd7e5/src/hooks/useHasActiveAdminPolicies.ts#L10-L15
https://github.com/Expensify/App/blob/28fe63cff2f9f70a92b6a1b640dc5de7f92dd7e5/src/libs/PolicyUtils.ts#L1838-L1847
- Store dismissal under a namespaced key such as
productMarketingWindow:<announcementID>in the existing dismissed-product-training NVP. Extend its Onyx type to accept that key pattern, and usedismissProductTraining()for both actions.Dismissrecords the active ID and closes the card; the primary CTA records the ID first and then navigates to its configured destination, preventing the card from flashing again during navigation. A future announcement has a different ID and remains eligible.
https://github.com/Expensify/App/blob/28fe63cff2f9f70a92b6a1b640dc5de7f92dd7e5/src/libs/actions/Welcome/index.ts#L191-L207
https://github.com/Expensify/App/blob/28fe63cff2f9f70a92b6a1b640dc5de7f92dd7e5/src/types/onyx/DismissedProductTraining.ts#L18-L37
- Subscribe the manager to
ONYXKEYS.MODALwithisModalCoveringSelector()and render nothing while a non-popover covering modal is opening or visible. This conservatively includes centered modals, guarantees they never overlap the marketing window, and lets the still-mounted manager show the card again when the modal state clears.
https://github.com/Expensify/App/blob/28fe63cff2f9f70a92b6a1b640dc5de7f92dd7e5/src/selectors/Modal.ts#L6-L12
https://github.com/Expensify/App/blob/28fe63cff2f9f70a92b6a1b640dc5de7f92dd7e5/src/components/Modal/BaseModal.tsx#L152-L174
Test coverage: add unit tests for single-active selection (including proving that dismissal does not fall through to an older item), member/admin/both audience resolution, and namespaced dismissal. Add component tests proving the window survives route changes, dismisses before CTA navigation, stays hidden after either action, is suppressed and restored around a centered modal, and uses the expected wide and narrow layouts.
What alternative solutions did you explore? (Optional)
Extending AnnouncementSection would retain the existing Home-only lifetime and fail cross-app persistence. Mounting the new manager in GlobalModals would make it global, but that host is also initialized for public navigation once startup is ready, so it would require an additional authentication gate; the authenticated root navigator's existing extra-content hook gives the feature the correct lifetime directly.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jayeshmangwani (External)
Job added to Upwork: https://www.upwork.com/jobs/~022076629358073920496
Lets start on the implementation in the background then
🚨 Edited by proposal-police: This proposal was edited at 2026-07-14 12:58:07 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
The app needs a single dismissible product-marketing window that remains visible across authenticated navigation on web and native.
It must support:
- One active announcement at a time, without stacking or queueing.
- An image, heading, body, primary CTA, and
Dismissaction. - Member and admin variants, with admin taking precedence.
- Per-announcement dismissal.
- The window remains visible across navigation until the user dismisses it or completes its CTA.
- Responsive wide and narrow placement.
- Suppression while a centered or confirm modal is opening or visible.
What is the root cause of the problem?
The existing AnnouncementSection is rendered only inside HomePage, so it is unavailable on every non-Home route.
Its current model also does not provide persistent app-wide display, audience variants, per-announcement dismissal, CTA-completion behavior, or centered-modal precedence.
The App already has most of the required primitives:
GlobalModalsprovides a shared cross-platform overlay host that remains mounted across navigation.useIsAuthenticated()can prevent public-screen exposure.useHasActiveAdminPolicies()implements the required audience rule.dismissProductTraining()andnvp_dismissedProductTrainingprovide optimistic, server-persisted dismissal.- The modal Onyx state exposes visible modal state and type.
The remaining gaps are a single active-announcement model, a dynamic dismissal namespace, and exact detection of centered modals during both opening and visible phases.
What changes should we make?
1. Mount one manager in GlobalModals
Add ProductMarketingWindowManager beside GrowlNotification:
<GrowlNotification ref={growlRef} />
<ProductMarketingWindowManager />
This gives the feature one mount across web and native navigation.
Render the window as a normal positioned overlay rather than another Modal, avoiding modal focus, backdrop, and navigation behavior.
2. Gate it to authenticated navigation
GlobalModals is also mounted during public navigation, so gate the outer manager with useIsAuthenticated():
function ProductMarketingWindowManager() {
const isAuthenticated = useIsAuthenticated();
if (!isAuthenticated) {
return null;
}
return <AuthenticatedProductMarketingWindowManager />;
}
Keep the announcement subscriptions and audience logic inside the authenticated child.
3. Add one active-announcement model
Use one active value containing either an announcement or null. Do not implement a list, queue, or fallback to an older announcement after dismissal.
type ProductMarketingCTAID =
| 'openWorkspaces'
| 'openExpensePolicy';
type ProductMarketingVariant = {
heading: string;
body: string;
ctaText: string;
ctaID: ProductMarketingCTAID;
};
type ProductMarketingAnnouncement = {
id: string;
imageUrl: string;
admin: ProductMarketingVariant;
member: ProductMarketingVariant;
};
Coordinate with the internal engineer to confirm how marketing-authored content will be delivered.
One viable implementation is an account-level server NVP included in authenticated bootstrap and reconnect responses, particularly if marketing content must change independently of App releases. The exact Onyx key, image format, CTA IDs, and API contract should be agreed with the internal engineer.
Wait until both the active-announcement source and nvp_dismissedProductTraining have finished loading before evaluating eligibility. This prevents a previously dismissed window from briefly appearing during startup.
Render nothing when the active announcement or the variant selected for the current user is missing or incomplete.
4. Keep CTA navigation controlled by the App
Keep CTA navigation controlled by the App. Depending on the internal content contract, use either a validated supported destination or a controlled CTA identifier mapped to an approved typed route.
For example, using controlled CTA identifiers:
const PRODUCT_MARKETING_CTA_ROUTES: Partial<
Record<ProductMarketingCTAID, () => Route>
> = {
openWorkspaces: () =>
ROUTES.WORKSPACES_LIST.getRoute(),
};
Resolve the destination before rendering an actionable window:
const routeBuilder =
PRODUCT_MARKETING_CTA_ROUTES[variant.ctaID];
if (!routeBuilder) {
return null;
}
The exact CTA identifiers and route builders should be coordinated with the internal engineer. Adding a genuinely new navigation capability may still require an App update.
5. Select the audience
Use useHasActiveAdminPolicies():
const variant = useHasActiveAdminPolicies()
? announcement.admin
: announcement.member;
This produces:
- Member only → member variant.
- Admin on at least one active workspace → admin variant.
- Member of one workspace and admin of another → admin variant.
6. Persist dismissal per announcement
Build the dismissal key inside the App:
const dismissalKey =
`productMarketingWindow:${announcement.id}` as const;
Extend DismissedProductTraining with a type-safe namespace:
type ProductMarketingWindowDismissalKey =
`productMarketingWindow:${string}`;
type DismissedProductTraining = {
// Existing fixed keys...
} & Partial<
Record<
ProductMarketingWindowDismissalKey,
DismissedProductTrainingElement
>
>;
Check the existing dismissal state using the current helper:
const isDismissed =
isProductTrainingElementDismissed(
dismissalKey,
dismissedProductTraining,
);
For Dismiss:
dismissProductTraining(dismissalKey, true);
For the CTA, persist dismissal before navigation:
dismissProductTraining(dismissalKey);
Navigation.navigate(routeBuilder());
Because dismissProductTraining() applies an optimistic Onyx update, this prevents the window from flashing again during navigation.
A future announcement uses a different ID, so dismissing the current announcement does not suppress later announcements.
7. Detect centered modals during opening and visible phases
The current opening state records that a modal is about to appear but not its pending type. The visible type is stored later.
Add the pending type to the modal Onyx state:
type Modal = {
// Existing fields...
pendingModalType?: ModalType | null;
};
Extend willAlertModalBecomeVisible():
function willAlertModalBecomeVisible(
isVisible: boolean,
isPopover = false,
type: ModalType | null = null,
) {
Onyx.merge(ONYXKEYS.MODAL, {
willAlertModalBecomeVisible: isVisible,
isPopover,
pendingModalType: isVisible ? type : null,
});
}
BaseModal should pass its actual type when reporting that it is opening. Existing calls to willAlertModalBecomeVisible(false) clear pendingModalType, preventing a stale centered type from suppressing the window later.
Add a centered-modal-specific selector covering both states:
const CENTERED_MODAL_TYPES = new Set<ModalType>([
CONST.MODAL.MODAL_TYPE.CONFIRM,
CONST.MODAL.MODAL_TYPE.CENTERED,
CONST.MODAL.MODAL_TYPE.CENTERED_SMALL,
CONST.MODAL.MODAL_TYPE.CENTERED_UNSWIPEABLE,
CONST.MODAL.MODAL_TYPE.CENTERED_SWIPEABLE_TO_RIGHT,
]);
const isCenteredModalOpeningOrVisibleSelector = (
modal: OnyxEntry<Modal>,
) =>
(!!modal?.isVisible &&
!!modal.type &&
CENTERED_MODAL_TYPES.has(modal.type)) ||
(!!modal?.willAlertModalBecomeVisible &&
!!modal.pendingModalType &&
CENTERED_MODAL_TYPES.has(
modal.pendingModalType,
));
This produces the required behavior:
- Centered or confirm modal opening/visible → hide the window.
- Right-docked flow → keep it visible.
- Popover or bottom-docked menu → keep it visible.
- Centered modal closes → show it again if still eligible.
This is more precise than isModalCoveringSelector(), which suppresses every opening non-popover modal.
8. Evaluate eligibility
The authenticated manager should render nothing when:
if (
isAnnouncementLoading ||
isDismissalStateLoading ||
!announcement ||
!variant ||
!routeBuilder ||
isProductTrainingElementDismissed(
dismissalKey,
dismissedProductTraining,
) ||
isCenteredModalOpeningOrVisible
) {
return null;
}
Only the active announcement is evaluated. If it is dismissed, render nothing instead of selecting an older announcement.
9. Render responsively
Render the card:
- Bottom-right with the design-specified width and spacing on wide layouts.
- Near full width above the bottom tab bar and safe-area inset on narrow layouts.
- Above ordinary page content but below
BaseModalas a defensive stacking fallback.
The manager remains mounted during navigation; only its eligibility changes.
What specific scenarios should we cover in automated tests?
- Unauthenticated sessions do not render the window.
- Loading announcement or dismissal state does not render it.
- Missing active announcement, selected variant, or CTA route does not render it.
- Member-only users receive the member variant.
- Admins and mixed member/admin users receive the admin variant.
- Dismissal uses
productMarketingWindow:<announcement.id>. - Dismissing announcement A does not dismiss announcement B.
- CTA dismissal occurs before navigation.
- The same manager remains mounted and the eligible window stays visible while navigating from Home to Spend to Workspaces.
- Centered and confirm modals suppress it during opening and visible phases.
pendingModalTypeis cleared when the modal closes or the alert-modal visibility state is reset.- Right-docked flows, popovers, and bottom-docked menus do not suppress it.
- Wide and narrow layouts use the correct responsive positioning.
What alternative solutions did you explore?
- Extending
AnnouncementSectiondoes not work because it remains available only on Home. - A static App configuration is smaller initially but requires an App update whenever marketing content changes. The final delivery contract should be decided with the internal engineer.
RootNavigatorExtraContentis also viable and its native implementation could be extended. This proposal prefersGlobalModalsbecause it provides one existing shared overlay host besideGrowlNotification, while the authentication gate prevents public-screen exposure.- A real
Modalis inappropriate because the requested window is persistent and non-blocking. isModalCoveringSelector()is too broad because it also suppresses opening right-docked flows.- The content source should not provide unrestricted routes or complete dismissal keys. The App should own its typed route mapping and
productMarketingWindow:dismissal namespace.
⚠️ @x-dev90 Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.
Proposal
Please re-state the problem that we are trying to solve in this issue.
We want a single, persistent bottom-right window that stays visible across every page (web + mobile) until the user explicitly dismisses it or completes its CTA. It needs an image, heading, body, a green primary CTA and a Dismiss action, per-announcement dismissal, admin/member audience variants (admin prevails), and it must never render at the same time as a centered modal.
What is the root cause of that problem?
New feature — no existing surface satisfies this. The only in-app marketing slot today is AnnouncementSection, a static list mounted inside Home only, so it vanishes on every other route and can't be dismissed per item:
https://github.com/Expensify/App/blob/f4e33d3cdf2881b62d167251d15df7a08b4740f3/src/pages/home/AnnouncementSection.tsx#L24-L49
Its content is a hardcoded array in CONST with no image/body/CTA model and no audience variants:
https://github.com/Expensify/App/blob/f4e33d3cdf2881b62d167251d15df7a08b4740f3/src/CONST/index.ts#L8795
The only host that is mounted once and survives navigation is GlobalModals, and it already renders the always-on bottom-right GrowlNotification — but nothing marketing-related lives there:
https://github.com/Expensify/App/blob/f4e33d3cdf2881b62d167251d15df7a08b4740f3/src/GlobalModals.tsx#L49-L78
The per-item dismissal primitive we need already exists (dismissProductTraining writing a keyed record into nvp_dismissedProductTraining), it just isn't wired to a marketing window:
https://github.com/Expensify/App/blob/f4e33d3cdf2881b62d167251d15df7a08b4740f3/src/libs/actions/Welcome/index.ts#L191-L207
And the modal-precedence gate we'd naturally reach for, isModalCoveringSelector, is too broad — it fires for any non-popover alert modal, not just centered ones:
https://github.com/Expensify/App/blob/f4e33d3cdf2881b62d167251d15df7a08b4740f3/src/selectors/Modal.ts#L10-L12
What changes do you think we should make in order to solve the problem?
Add a ProductMarketingWindow mounted once in GlobalModals, next to GrowlNotification (both are the app's persistent bottom-right layer), driven by a backend NVP for content and by the existing per-key dismissal NVP for state.
Content is server-supplied, not a static App config. The window exists to ship monthly marketing updates authored by the marketing team, and the issue is labeled Internal. A static CONST array would force an App release for every new announcement, which doesn't match that cadence. So a new nvp_activeProductAnnouncement NVP delivers the single active announcement:
type ProductAnnouncement = {
name: string; // stable id, also the dismissal key
image: string;
admin: {heading: string; body: string; ctaText: string; ctaRoute: Route};
member: {heading: string; body: string; ctaText: string; ctaRoute: Route};
};
Mount it in the persistent host (outside the deferred LazyModalSlot block so it isn't treated as a centered modal):
<GrowlNotification ref={growlRef} />
<ProductMarketingWindow />
Gate visibility on audience + dismissal + centered-modal precedence:
const [announcement] = useOnyx(ONYXKEYS.NVP_ACTIVE_PRODUCT_ANNOUNCEMENT);
const [dismissed] = useOnyx(ONYXKEYS.NVP_DISMISSED_PRODUCT_TRAINING);
const isAdminSomewhere = useActiveAdminPolicies().length > 0; // admin on ≥1 workspace ⇒ admin prevails
const [isCenteredModalVisible] = useOnyx(ONYXKEYS.MODAL, {selector: isCenteredModalVisibleSelector});
const variant = isAdminSomewhere ? announcement?.admin : announcement?.member;
if (!announcement || !variant || dismissed?.[announcement.name] || isCenteredModalVisible) {
return null;
}
Precedence must be centered-modal-specific, so add a selector alongside the existing ones in src/selectors/Modal.ts rather than reusing isModalCoveringSelector:
const CENTERED_TYPES = [
CONST.MODAL.MODAL_TYPE.CONFIRM,
CONST.MODAL.MODAL_TYPE.CENTERED,
CONST.MODAL.MODAL_TYPE.CENTERED_SMALL,
CONST.MODAL.MODAL_TYPE.CENTERED_UNSWIPEABLE,
CONST.MODAL.MODAL_TYPE.CENTERED_SWIPEABLE_TO_RIGHT,
];
const isCenteredModalVisibleSelector = (modal: OnyxEntry<Modal>) => !!modal?.isVisible && !!modal?.type && CENTERED_TYPES.includes(modal.type);
Supporting changes, described:
- Placement: render the card
position: fixedbottom-right reusing the same anchor asstyles.growlNotificationContainerBottomRight, with safe-area / bottom-tab offsets on narrow layouts, and a z-index belowBaseModalso a centered modal always covers it. - Audience:
useActiveAdminPoliciesalready resolves "admin on ≥1 active workspace" for the current login viaactiveAdminPoliciesSelector, which is exactly the "admin prevails" rule. https://github.com/Expensify/App/blob/f4e33d3cdf2881b62d167251d15df7a08b4740f3/src/hooks/useActiveAdminPolicies.ts#L13-L18 - Dismiss: call
dismissProductTraining(announcement.name, true); because the record is keyed byname, a future announcement (newname) still surfaces after a prior one was dismissed, and dismissal persists server-side across devices. - CTA: navigate to
variant.ctaRoute, then calldismissProductTraining(announcement.name)so completing the CTA also closes it. - Type-safety:
DismissedProductTrainingis a closed map of fixed keys, so add a dynamic namespace (e.g.[`productMarketingWindow:${string}`]: DismissedProductTrainingElement) sodismissed?.[announcement.name]type-checks. https://github.com/Expensify/App/blob/f4e33d3cdf2881b62d167251d15df7a08b4740f3/src/types/onyx/DismissedProductTraining.ts#L28-L90
What alternative solutions did you explore? (Optional)
- Static App-side config (extend
CONST.HOME.ANNOUNCEMENTSwith images/CTA/variants): rejected — every monthly announcement would ship in an App release, which fights the marketing cadence the feature exists for, and theInternallabel implies the content is delivered via the API. - Reuse
AnnouncementSectioninside a floating container: rejected — it's Home-scoped with no dismissal or targeting model, so persistence would mean duplicating a global mount around a Home widget. - Build it as a real
Modal(type: popover): rejected — it would inherit focus-trapping/backdrop behavior and collide with the "never alongside a centered modal" rule; a plain absolutely-positioned view inGlobalModalsis the right primitive. - Reuse
isModalCoveringSelectorfor precedence: rejected — it suppresses on any non-popover alert modal, broader than the centered-only requirement, so the window would hide during unrelated flows; a dedicatedisCenteredModalVisibleSelectormatches the spec precisely.
What specific scenarios should we cover in automated tests?
- Eligibility selector: no active announcement →
null; announcement present butnamein the dismissed map →null; member-only user gets the member variant; admin-on-≥1-workspace user gets the admin variant; member-of-A + admin-of-B user gets the admin variant (admin prevails). - Precedence:
isCenteredModalVisibleSelectorreturnstrueforCENTERED/CONFIRMtypes andfalseforPOPOVER/RIGHT_DOCKED; the window returnsnullwhile a centered modal is visible and re-renders after it closes. - Interactions:
DismisscallsdismissProductTraining(name, true)and the window stops rendering; CTA navigates tovariant.ctaRouteand also dismisses. - Persistence: the window stays mounted across simulated route changes (Home → Spend → Workspaces).
- Responsive: bottom-right anchor on wide layouts; bottom/safe-area offset above the tab bar on narrow layouts.
⚠️ @dilshodmackbook-sketch Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.
Updated my proposal.
What changed: Use one explicit active announcement in the authenticated root overlay host, with a typed per-ID dismissal key.
Why: This prevents logged-out exposure and ensures dismissal does not fall through to an older announcement as an unintended queue.
Proposal
Please re-state the problem that we are trying to solve in this issue.
We have no persistent, app-wide surface for in-product marketing. The only marketing slot today, the Home Announcements widget, unmounts the moment the user leaves Home, so a monthly update or feature reach-out is invisible everywhere else in the app and cannot be dismissed per-announcement, targeted by role, or held back while a centered modal is open. We need one window, anchored bottom-right, that stays visible across navigation on web and mobile until the user dismisses it or completes its CTA.
What is the root cause of that problem?
There is no host that keeps a marketing surface mounted across route changes on both platforms, and no content/dismissal/targeting model behind it. Today the announcements live inside Home only. AnnouncementSection renders a static list into a Home WidgetContainer — AnnouncementSection.tsx:24-49 — fed by a hardcoded title/subtitle/url/publishedDate array with no image, body, CTA, audience variant, or dismissal notion at CONST/index.ts:8884-8903. Because it lives in HomePage, it dies on every non-Home route.
The one host that is mounted exactly once and survives all authenticated navigation on both web and native is GlobalModals. It already renders the app's persistent bottom-right layer — GrowlNotification — from a single top-level mount at Expensify.tsx:287 ({shouldInit && <GlobalModals />}), and there is no GlobalModals.native.tsx override, so the same tree runs everywhere. On web the growl already anchors to the exact spot we want via growlNotificationContainerBottomRight.
The remaining primitives we need already exist but aren't wired together:
- Per-announcement dismissal is exactly what
dismissProductTraining()does — it merges a keyed record into thenvp_dismissedProductTrainingNVP at Welcome/index.ts:191-207, server-persisted across devices. But itsDismissedProductTrainingtype is a closed map of fixed keys at DismissedProductTraining.ts:26-95, so a per-ID marketing key won't type-check without a dynamic namespace. - Audience targeting is already resolved by useActiveAdminPolicies (admin on ≥1 active workspace) — the "admin prevails" rule falls straight out of it.
- Modal precedence has an off-the-shelf selector,
isModalCoveringSelectorat selectors/Modal.ts:10, but it fires for any non-popover covering modal — includingRIGHT_DOCKEDRHP flows — which is broader than "never alongside a centered modal" and would wrongly hide the window during ordinary right-pane navigation.
What changes do you think we should make in order to solve the problem?
Primary fix (root cause): mount a new ProductMarketingWindow once inside GlobalModals, right next to GrowlNotification — the app's existing cross-platform persistent bottom-right layer — and drive its content from a server NVP (nvp_activeProductAnnouncement) rather than a static CONST array, because the feature is Internal-labeled and authored monthly by marketing; a static array would force an App release per announcement.
// GlobalModals.tsx — persistent host, mounted once on web + native
<GrowlNotification ref={growlRef} />
<ProductMarketingWindow />
// ProductMarketingWindow.tsx — one active announcement, gated by audience + dismissal + centered modal
const [announcement] = useOnyx(ONYXKEYS.NVP_ACTIVE_PRODUCT_ANNOUNCEMENT);
const [dismissed] = useOnyx(ONYXKEYS.NVP_DISMISSED_PRODUCT_TRAINING);
const isAdminSomewhere = useActiveAdminPolicies().length > 0; // admin on ≥1 workspace ⇒ admin prevails
const [isCenteredModalVisible] = useOnyx(ONYXKEYS.MODAL, {selector: isCenteredModalVisibleSelector});
const variant = isAdminSomewhere ? announcement?.admin : announcement?.member;
if (!announcement || !variant || dismissed?.[announcement.name] || isCenteredModalVisible) {
return null;
}
// render bottom-right card: variant.image / heading / body, green CTA, Dismiss
Additional fix (type + precedence): the two supporting gaps must be closed for the gate above to be correct and type-safe:
- Add a dynamic namespace to
DismissedProductTraining—[`productMarketingWindow:${string}`]: DismissedProductTrainingElement— sodismissed?.[announcement.name]type-checks against the same NVPdismissProductTraining()already writes. - Add a centered-modal-specific selector alongside the existing ones in
src/selectors/Modal.ts, instead of reusing the broadisModalCoveringSelector:
const CENTERED_TYPES = [CONFIRM, CENTERED, CENTERED_SMALL, CENTERED_UNSWIPEABLE, CENTERED_SWIPEABLE_TO_RIGHT];
const isCenteredModalVisibleSelector = (modal: OnyxEntry<Modal>) => !!modal?.isVisible && !!modal?.type && CENTERED_TYPES.includes(modal.type);
Supporting changes, described in text: on Dismiss, call dismissProductTraining(announcement.name, true); on CTA press, navigate to variant.ctaRoute and then call dismissProductTraining(announcement.name) so completing the CTA also closes it. Placement reuses the growl anchor — position: fixed bottom-right via growlNotificationContainerBottomRight on wide layouts, and a safe-area-aware near-full-width card offset above the bottom tab bar on narrow layouts — with a z-index below BaseModal so a centered modal always covers it.
Why this fixes it:
- Home → Spend → Workspaces: the window is mounted in
GlobalModals, outside the route tree, so it never unmounts on navigation — on web and native alike. - Member only:
useActiveAdminPolicies()is empty →membervariant. Admin, or member-of-A + admin-of-B: the array is non-empty →adminvariant, so admin prevails exactly as specified. - Dismiss vs. next month: dismissal is keyed by the announcement's
name; a future announcement has a newnameand remains eligible even after a prior one was dismissed. Because it's a server NVP, dismissal follows the user across devices. - Centered modal appears:
isCenteredModalVisibleSelectorreturnstrue, the window returnsnull; when the modal closes the still-mounted window re-renders. ARIGHT_DOCKEDRHP does not suppress it, matching "never alongside a centered modal" precisely.
Result: a single, role-targeted, server-authored window persists bottom-right across every authenticated page on web and mobile, dismissable per-announcement, and always yields to centered modals.
What alternative solutions did you explore? (Optional)
- Mount in
RootNavigatorExtraContent: this host isnullon native — RootNavigatorExtraContent/index.native.tsx returnsnullbecause concierge and the tab bar are handled elsewhere on mobile — so the window would render on web only and silently fail the issue's explicit "web and mobile" scope.GlobalModalsis the strictly better host: it's the same single mount that already carriesGrowlNotificationon both platforms. - Static App-side content (extend
CONST.HOME.ANNOUNCEMENTS): ships every monthly announcement inside an App release, fighting the marketing cadence the feature exists for; theInternallabel signals API-delivered content. A server NVP decouples content from releases — strictly better for this use case. - Reuse
AnnouncementSectionin a floating container: it's Home-scoped with no image/CTA/variant or dismissal model, so "persistence" would mean duplicating a global mount around a Home widget anyway — no reuse win, and the wrong data shape. - Build it as a real
Modal(type: popover): inherits focus-trapping/backdrop behavior and would collide with the "never alongside a centered modal" rule; a plain absolutely-positioned view in the persistent host is the correct primitive. - Reuse
isModalCoveringSelectorfor precedence: suppresses on any non-popover covering modal (includingRIGHT_DOCKED), broader than the centered-only requirement, so the window would vanish during unrelated right-pane flows; a dedicatedisCenteredModalVisibleSelectormatches the spec exactly.
Any proposals that can be accepted?
Hi @JmillsExpensify / @JS00001 , could you please reassign this to @huult as the C+? I asked for the reassignment on slack https://expensify.slack.com/archives/C02NK2DQWUX/p1784012506516889 , thanks.
All set
@huult could you review proposals please?
Proposal
Please re-state the problem that we are trying to solve in this issue.
We need a single, persistent bottom-right product-marketing window that stays visible across authenticated navigation on web and mobile until the user dismisses it or completes its CTA. It must carry marketing-authored image/heading/body/CTA content with admin vs member variants (admin prevails if the user admins any workspace), per-announcement dismissal so a future campaign can still appear, and it must never render alongside a centered/interruptive modal.
What is the root cause of that problem?
There is no app-wide marketing surface with persistence, audience targeting, or per-announcement dismissal. The only in-product “Announcements” UI is a Home widget that unmounts on every non-Home route:
https://github.com/Expensify/App/blob/6d2f2152ba813fa5b69dae17436f44b954afdee8/src/pages/home/HomePage.tsx#L69-L103
That widget renders a static CONST.HOME.ANNOUNCEMENTS list with only title / subtitle / url / publishedDate — no image, body, CTA destination, role variants, or dismissal check:
https://github.com/Expensify/App/blob/6d2f2152ba813fa5b69dae17436f44b954afdee8/src/CONST/index.ts#L9072-L9091
https://github.com/Expensify/App/blob/6d2f2152ba813fa5b69dae17436f44b954afdee8/src/pages/home/AnnouncementSection.tsx#L33-L48
Several existing hosts look attractive but each is incomplete for this requirement:
GlobalModalsis mounted once outside the route tree and already hosts the bottom-rightGrowlNotification, but it is not auth-gated — it mounts whenevershouldInitis true, including public/sign-in flows:
https://github.com/Expensify/App/blob/6d2f2152ba813fa5b69dae17436f44b954afdee8/src/Expensify.tsx#L285-L302
https://github.com/Expensify/App/blob/6d2f2152ba813fa5b69dae17436f44b954afdee8/src/GlobalModals.tsx#L50-L52
RootNavigatorExtraContentsits on the authenticated root stack, but its native implementation currently returnsnull, so mounting there requires both platform files (not native-safe out of the box):
https://github.com/Expensify/App/blob/6d2f2152ba813fa5b69dae17436f44b954afdee8/src/components/Navigation/RootNavigatorExtraContent/index.native.tsx#L1-L7
- The per-key dismissal API we need already exists (
dismissProductTraining), butDismissedProductTrainingis a closed map of fixed keys, so dynamic marketing IDs do not type-check today:
https://github.com/Expensify/App/blob/6d2f2152ba813fa5b69dae17436f44b954afdee8/src/libs/actions/Welcome/index.ts#L191-L207
https://github.com/Expensify/App/blob/6d2f2152ba813fa5b69dae17436f44b954afdee8/src/types/onyx/DismissedProductTraining.ts#L28-L37
- Modal precedence is incomplete with either of the two common approaches in competing proposals:
isModalCoveringSelectoruseswillAlertModalBecomeVisible && !isPopover, so it covers the opening animation for wide confirm/centered modals, but misses narrow confirm (rendered asBOTTOM_DOCKEDwithisPopover: true) and is broader than “centered only” for some flows:
https://github.com/Expensify/App/blob/6d2f2152ba813fa5b69dae17436f44b954afdee8/src/selectors/Modal.ts#L10-L12
https://github.com/Expensify/App/blob/6d2f2152ba813fa5b69dae17436f44b954afdee8/src/components/ConfirmModal.tsx#L198-L205
- A type-only “centered modal visible” selector that checks
modal.typewhileisVisibleraces on open:willAlertModalBecomeVisibleis written first withouttype;typeis only written later insetModalVisibilityfromonModalShow:
https://github.com/Expensify/App/blob/6d2f2152ba813fa5b69dae17436f44b954afdee8/src/components/Modal/BaseModal.tsx#L152-L156
https://github.com/Expensify/App/blob/6d2f2152ba813fa5b69dae17436f44b954afdee8/src/libs/actions/Modal.ts#L96-L100
https://github.com/Expensify/App/blob/6d2f2152ba813fa5b69dae17436f44b954afdee8/src/components/Modal/BaseModal.tsx#L191-L195
- Several centered product modals are stack navigators, not
BaseModal. Most do not writeONYXKEYS.MODALat all, andFEATURE_TRAINING_MODAL_NAVIGATORincorrectly records itself asRIGHT_DOCKEDvia shared RHP listeners — so Onyx-only gates miss or misclassify them:
https://github.com/Expensify/App/blob/6d2f2152ba813fa5b69dae17436f44b954afdee8/src/libs/Navigation/AppNavigator/AuthScreens.tsx#L97-L107
https://github.com/Expensify/App/blob/6d2f2152ba813fa5b69dae17436f44b954afdee8/src/libs/Navigation/AppNavigator/AuthScreens.tsx#L309-L334
Finally, there is no Onyx key / API for an active marketing announcement today — content delivery is an Internal/backend dependency (related Expensify#656359), while frontend must still define the consumer contract.
What changes do you think we should make in order to solve the problem?
Primary fix — authenticated, navigation-persistent host + manager
Mount a new ProductMarketingWindowManager as an authenticated overlay sibling inside AuthScreens (same lifetime as GPSInProgressModal / OpenAppFailureModal). This is auth-scoped on both web and native, survives Home → Spend → Workspaces, and avoids GlobalModals public-route exposure without requiring a second authentication gate:
https://github.com/Expensify/App/blob/6d2f2152ba813fa5b69dae17436f44b954afdee8/src/libs/Navigation/AppNavigator/AuthScreens.tsx#L386-L392
// AuthScreens.tsx — after existing auth overlays
<ProductMarketingWindowManager />
Content contract (Internal / backend) — deliver exactly one active announcement via a new NVP (name TBD with backend; e.g. nvp_activeProductAnnouncement). Absence or null means no window. Do not scan a list / fall through to an older item:
type ProductAnnouncementVariant = {
heading: string;
body: string;
ctaText: string;
/** In-app Route string validated client-side, or allowlisted absolute URL */
ctaDestination: string;
imageURL: string;
};
type ActiveProductAnnouncement = {
/** Stable campaign id; client builds dismissal key from this */
name: string;
admin: ProductAnnouncementVariant;
member: ProductAnnouncementVariant;
};
Frontend eligibility returns null when: NVP undefined/malformed, either required variant missing, CTA invalid, image missing, dismissal/admin/onboarding data still loading, or any blocking modal gate below is active.
Audience — reuse the existing admin-anywhere selector. Admin on ≥1 active workspace → admin variant; else member. Member-of-A + admin-of-B → admin (admin prevails):
App/src/hooks/useHasActiveAdminPolicies.ts
Lines 10 to 14 in 6d2f2152ba81
function useHasActiveAdminPolicies() {
const login = useCurrentUserPersonalDetails().login ?? '';
const selector = (policies: OnyxCollection
const isAdminAudience = useHasActiveAdminPolicies();
const variant = isAdminAudience ? announcement?.admin : announcement?.member;
Dismissal — extend DismissedProductTraining with a dynamic namespace and always construct the key client-side as `productMarketingWindow:${announcement.name}` so server name values stay free of prefix conventions:
// DismissedProductTraining.ts
[`productMarketingWindow:${string}`]: DismissedProductTrainingElement;
Widen isProductTrainingElementDismissed to accept that string key (or add a thin wrapper). Then:
const dismissalKey = `productMarketingWindow:${announcement.name}` as const;
// Dismiss button
dismissProductTraining(dismissalKey, true);
// CTA — dismiss first (optimistic) so the globally mounted card cannot flash during navigate
dismissProductTraining(dismissalKey);
Navigation.navigate(/* validated destination */);
Wait for NVP_DISMISSED_PRODUCT_TRAINING (and announcement NVP) to finish loading before first paint — same class of race documented in MigratedUserWelcomeModalGuard — so already-dismissed users never see a flash.
Also hide when isActingAsDelegate, while guided onboarding is incomplete, and while IS_LOADING_APP is true (mirror ProductTrainingContext safety gates).
Modal precedence — transition-safe + stack-aware (this is where competitors leave regressions)
- Persist pending modal
typeat alert time so type-based selection cannot race the open animation:
// Modal.ts
function willAlertModalBecomeVisible(
isVisible: boolean,
isPopover = false,
pendingType: ModalType | null = null,
) {
Onyx.merge(ONYXKEYS.MODAL, {
willAlertModalBecomeVisible: isVisible,
isPopover,
...(isVisible && pendingType ? {type: pendingType} : {}),
});
}
// BaseModal.tsx open effect
willAlertModalBecomeVisible(
true,
type === CONST.MODAL.MODAL_TYPE.POPOVER || type === CONST.MODAL.MODAL_TYPE.BOTTOM_DOCKED,
type,
);
- Add a marketing-specific selector that blocks on interruptive types including narrow confirm’s
BOTTOM_DOCKED, using(willAlert || isVisible), and excludesRIGHT_DOCKED/ ordinaryPOPOVER:
// selectors/Modal.ts
const MARKETING_BLOCKING_MODAL_TYPES = new Set([
CONST.MODAL.MODAL_TYPE.CONFIRM,
CONST.MODAL.MODAL_TYPE.CENTERED,
CONST.MODAL.MODAL_TYPE.CENTERED_SMALL,
CONST.MODAL.MODAL_TYPE.CENTERED_UNSWIPEABLE,
CONST.MODAL.MODAL_TYPE.CENTERED_SWIPEABLE_TO_RIGHT,
CONST.MODAL.MODAL_TYPE.BOTTOM_DOCKED, // narrow confirm equivalent
]);
const isMarketingBlockingModalActiveSelector = (modal: OnyxEntry<Modal>) => {
const isActive = !!modal?.willAlertModalBecomeVisible || !!modal?.isVisible;
if (!isActive || !modal?.type) {
return false;
}
// Keep POPOVER visible; BOTTOM_DOCKED confirm still blocks.
if (modal.type === CONST.MODAL.MODAL_TYPE.POPOVER || modal.type === CONST.MODAL.MODAL_TYPE.RIGHT_DOCKED) {
return false;
}
return MARKETING_BLOCKING_MODAL_TYPES.has(modal.type);
};
Note: genuine narrow Popover sheets also use BOTTOM_DOCKED, so they will temporarily hide the marketing window — indistinguishable from confirm in Onyx after the type write, and safer than overlapping an interrupting sheet. Document that tradeoff; do not reuse isModalCoveringSelector (misses narrow confirm).
Reuse the existing centered BaseModal type set already maintained here:
https://github.com/Expensify/App/blob/6d2f2152ba813fa5b69dae17436f44b954afdee8/src/components/Modal/index.tsx#L18-L24
- Additionally gate on root navigation state for centered stack navigators that do not (or mis-)report through
ONYXKEYS.MODAL:
const CENTERED_STACK_NAVIGATORS = new Set([
NAVIGATORS.MIGRATED_USER_MODAL_NAVIGATOR,
NAVIGATORS.SUBMIT_PLAN_MODAL_NAVIGATOR,
NAVIGATORS.AI_FEATURES_PROMO_MODAL_NAVIGATOR,
NAVIGATORS.FEATURE_TRAINING_MODAL_NAVIGATOR,
]);
const isCenteredStackModalDisplayed = useRootNavigationState(
(state) => !!state?.routes.at(-1)?.name && CENTERED_STACK_NAVIGATORS.has(state.routes.at(-1)!.name),
);
UI / placement
Presentational ProductMarketingWindow: image + bold heading + body + green primary CTA + Dismiss. Wide: reuse/adapt growlNotificationContainerBottomRight fixed bottom-right anchor. Narrow: near-full-width card above bottom tab bar + safe-area insets (bottomTabHeight + insets). Not a real Modal (no focus trap / backdrop).
https://github.com/Expensify/App/blob/6d2f2152ba813fa5b69dae17436f44b954afdee8/src/styles/index.ts#L3400-L3409
Growl collision — GrowlNotification already occupies the same bottom-right region. Prefer hiding the marketing window while a growl is showing (or stack the marketing card above the growl height). Do not leave both opaque overlays on the same anchor.
Why this is minimal blast radius and covers all paths:
- Does not rewrite Home announcements or
ProductTrainingContext. - Reuses
dismissProductTraining+useHasActiveAdminPolicies. - Touches
Modal.ts/BaseModalonly to close a real lifecycle gap needed for correct precedence. - AuthScreens mount covers web + native without inventing a second host.
- Single active server announcement + namespaced dismissal prevents queue fall-through and cross-device stale flash when combined with loading gates.
What alternative solutions did you explore? (Optional)
Compared against proposals already on the issue:
-
KJ21-ENG — Correct authenticated-root intuition, single-active ID, dismiss-before-navigate, and typed dismissal namespace. Gaps: uses
isModalCoveringSelector(misses narrowBOTTOM_DOCKEDconfirm; also broader than needed for some covering types), static App-side content (fights monthly marketing cadence + Internal label), and no stack-centered-nav gate / growl collision / dismissal-load race. Mounting inRootNavigatorExtraContentis workable if both platform files are updated, but AuthScreens overlays are a clearer existing pattern for auth-scoped chrome. -
x-dev90 / dilshodmackbook-sketch / yusufdeveloper2903 — Correctly identify server NVP content and that
isModalCoveringSelectoris not “centered-specific.” Gaps shared across these:GlobalModalswithout auth gate leaks onto public navigation; type-only centered selectors race during open becausewillAlertModalBecomeVisibledoes not writetype; ignore narrow confirm=BOTTOM_DOCKED; ignore stack centered navigators (some never touch Onyx; feature-training is recorded asRIGHT_DOCKED); weak/inconsistent dismissal-key namespacing; no growl collision or NVP loading gate. yusuf’s claim thatRootNavigatorExtraContentcannot work on native is overstated — KJ21 proposed editing the native file — but AuthScreens is still the safer shared pattern.
Rejected approaches:
- Extending
AnnouncementSection/CONST.HOME.ANNOUNCEMENTSas the primary vehicle — remains Home-only and release-per-campaign. - Building this as a real
Modal(popover/confirm) — wrong UX (interruptive / focus-trapping) and fights the precedence rule. - Scanning a multi-item announcement list for “next non-dismissed” — invents queueing this release explicitly forbids.
- Hiding on every
isModalActiveSelector/ ProductTraining-style gate — would incorrectly suppress during RHP.
What specific scenarios should we cover in automated tests?
- Eligibility: no/null announcement → null; dismissed
productMarketingWindow:<id>→ null; unknown future id still eligible after prior dismiss; malformed/partial variant → null. - Audience: member-only → member; admin-on-≥1 → admin; member-of-A + admin-of-B → admin; policies still loading → null (no member flash).
- Loading races: dismissed NVP not yet loaded → null (no flash); app loading / onboarding incomplete / acting as delegate → null.
- Interactions: Dismiss calls
dismissProductTraining(key, true)and hides; CTA dismisses withclickbefore navigate and hides; offline optimistic merge still hides. - Onyx modal gate with pending-type write: open wide
CONFIRMhides duringwillAlertbeforeisVisible; mid-close (isVisiblestill true) stays hidden;RIGHT_DOCKEDRHP remains visible;POPOVERremains visible; narrowBOTTOM_DOCKEDconfirm hides. - Stack centered navigators: migrated-user / submit-plan / AI-features / feature-training top routes hide the window even when Onyx type is missing or wrongly
RIGHT_DOCKED. - Persistence: window stays mounted across simulated Home → Spend → Workspaces.
- Responsive: wide bottom-right fixed card; narrow card clears tab bar + safe area; growl-active → marketing hidden or offset (no overlap).
- Auth scope: manager not rendered on public/sign-in (
AuthScreensonly).
⚠️ @neerajbachani Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.