Skip to content

promo-manager: skipPromo does not trigger the next queued promo #217

Description

@vanilla-wave

Problem

When the active promo is closed via finishPromo/cancelPromo, closePromo calls triggerNextPromo and the next queued promo starts. skipPromo clears the active promo and removes it from the queue, but never calls triggerNextPromo — so pending promos stay in the queue until some unrelated requestStart/sendEvent happens.

Real paths that hit this:

  • the README pattern useUnmount(() => skipPromo());
  • onboarding integration: closeHint -> skipPromo (initOnboardingIntegration).

A user closes a hint, and the next queued promo silently never shows.

Repro

const controller = new Controller(testOptions);

await controller.requestStart('boardPoll'); // active
await controller.requestStart('ganttPoll'); // pending
controller.skipPromo('boardPoll');

expect(controller.state.base.activePromo).toBe('ganttPoll'); // FAILS: null

Where

  • src/promo-manager/core/controller.tsskipPromo (missing triggerNextPromo after clearing active)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions