Skip to content

Add tea day simulation menu for admins and executives #63

@CarlosCanet

Description

@CarlosCanet

Description

Add a simulation menu for admins and executive users to preview how a tea day will look at different times of the day, without waiting for the actual reveal times.

Motivation

Currently, to verify that story parts, tea info, and media are displayed correctly at different times (08:00, 13:00, 18:00, 21:00 UTC), developers and content managers must wait for those times or manually modify system time. A simulation mode would allow:

  • Testing progressive story reveals
  • Previewing tea name reveal (21:00 UTC)
  • Verifying YouTube embed and images display correctly
  • QA without time constraints

Tasks

  • Create simulation menu component (dropdown or modal)
  • Add time override options: 08:00, 13:00, 18:00, 21:00 UTC
  • Add "current time" option to exit simulation
  • Pass simulated time to getAdvienteaDayState() logic
  • Show simulation indicator badge when active
  • Restrict access to Admin and Executive roles only
  • Persist simulation state in session/URL params
  • Add keyboard shortcut for quick toggle (optional)

UI Design

  • Floating action button or navbar dropdown
  • Clear visual indicator when simulation is active
  • Time selector with preset options
  • "Exit simulation" button

Technical Considerations

  • Override should only affect tea day display logic
  • Should not modify actual database timestamps
  • Consider URL query param (?simulateTime=21:00) for shareable preview links
  • Integrate with existing advientea-rules.ts time functions

Definition of Done

  • Simulation menu accessible to admins/executives
  • All reveal times can be simulated
  • Visual indicator shows active simulation
  • Does not affect other users' experience
  • Works on desktop and mobile

Security

  • Only Admin and Executive roles can access simulation
  • Simulation state should not leak to regular users
  • Prevent accidental production use

Phase: Production Polish
Priority: Medium

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions