Skip to content

[macOS] Respect promo timeout when force showing a promo (debug menu) - #6596

Merged
rachelmcr merged 1 commit into
mainfrom
rachel/promo-queue-debug-timeout
Sep 2, 2026
Merged

[macOS] Respect promo timeout when force showing a promo (debug menu)#6596
rachelmcr merged 1 commit into
mainfrom
rachel/promo-queue-debug-timeout

Conversation

@rachelmcr

@rachelmcr rachelmcr commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Task/Issue URL: https://app.asana.com/1/137249556945/project/1209825025475019/task/1218051322379228?focus=true
Tech Design URL:
CC:

Description

This updates the Promo Queue framework to respect a promo's timeout when force-showing a promo from the debug menu. This force-show debug action allows the promo UI to be viewed separately from the promo queue (e.g. triggers, cooldowns), promo eligibility criteria, and other side effects.

Now, the promo's timeout is respected so the debug action better reflects real promo UI (including auto-dismiss) without having to manually enforce the timeout.

Testing Steps

  1. Debug menu → Promo Queue → autoplay-discoverability → Force Show.
  2. Confirm the Autoplay Discoverability promo is displayed (a popover on the permission center in the address bar).
  3. Wait for 5 seconds and confirm the promo is auto-dismissed.
  4. Debug menu → Promo Queue → autoplay-discoverability → Force Show.
  5. When the Autoplay Discoverability promo appears, hover the mouse over the popover and confirm it isn't auto-dismissed (matches production behavior).

Impact

Low: Behavior change is limited to debug action (internal tooling)


Internal references:

Definition of Done | Engineering Expectations | Tech Design Template


Note

Low Risk
Changes are centered on debug force-show and session bookkeeping; production promo evaluation and history updates are unchanged except removing a redundant custom timeout that matched the feature-tip default.

Overview
Debug Force Show in the Promo Queue menu now runs promos through the same PromoService active-session path as production shows, so timeouts, eligibility retraction, and promo conflicts behave like a real show instead of a one-off delegate call with a manual sleep.

Force-show sessions are tagged with isForceShow: they skip writing lastShown, cooldown/dismissal history, and applyResult on any outcome, while still driving hide() and timeout handling via PromoType.timeoutInterval.

For autoplay discoverability, the delegate no longer owns a 5s displayDuration or sleeps on force show; it presents the permission center and awaits the continuation until the service times out or cleans up. PromoType(.featureTip) still uses the default 5s feature-tip timeout. Force show also skips the shown pixel.

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

@jleandroperez jleandroperez 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.

✅ Changes look good!
✅ Verified all test scenarios
✅ Verified Autoplay Promo still works as expected

:shipit:

@rachelmcr
rachelmcr merged commit c802974 into main Sep 2, 2026
56 of 57 checks passed
@rachelmcr
rachelmcr deleted the rachel/promo-queue-debug-timeout branch September 2, 2026 09:08
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.

2 participants