StackTrading Docs

SRS: UC_4.7.4 — Countdown Timer

FieldValue
BA in ChargeTrang Nguyen
Date Created2026-08-08
Versionv1
Document ReferencesRFQ_ Website and Dashboard Implementation V7.pdf §679 (Key Feature text) ·docs/BA/UC_4.1-4.17/dashboard_sim/UC_4.7.4/QnA_init_docs.md (QN-4.7.4-01..05) · UC_4.9.4 §2 Trigger, §3 Pre-conditions (QN-4.9.4-02, QN-4.9.4-08 — resolved)

UC_4.7.4 — Countdown Timer

1. Overview

FieldContent
IDUC_4.7.4
Use CaseCountdown Timer
DescriptionThe "Days Remaining" counter in the persistent header (Ref:UC_4.1.1 §2), showing days left before a trader's challenge/account expires. Applies to all 3 tracks (Associate/Accelerated/Advanced), per A-15. SIM only — LIVE uses UC_4.11.1 (not yet documented in this repo), per A-05. This UC owns: the counter display, the pulse/glow visual state, and the conditional "Extend Time" button. The purchase flow triggered by that button (API call, Tax Priming, modal UI) is owned entirely by UC_4.9.4 — Time Extension Purchase — not repeated here.
Zapier Flow
Zapier Table
3rd Party

References/Wireframe/Stage 2/Dashboard/Less than 10 days.png Pulse/glow visual state when days_remaining < 10.

2. Trigger

  • The Dashboard header (Ref: UC_4.1.1) renders — frontend reads days_remaining and extend_eligible from GET /user/status.
  • User clicks the "Extend Time" button (when visible).

3. Pre-conditions

  • User is on the Dashboard, account type SIM.

4. Post-conditions

  • The counter shows the current remaining time in days and hours ("{days_remaining} days {hours_remaining} hours remaining"), ticking down live as each hour passes; the pulse/glow visual state matches the extend_eligible flag (Ref: BR_4.7.4.1), and the "Extend Time" button is visible whenever 0 <= days_remaining < 10.

5. Basic Flow

  1. On Dashboard load, frontend reads days_remaining and extend_eligible from GET /user/status.
  2. Counter renders "{days_remaining} days {hours_remaining} hours remaining" (Ref: BR_4.7.4.3).
  3. [If extend_eligible == true] → pulse/glow visual state activates on the counter (Ref: BR_4.7.4.1).
  4. [If 0 <= days_remaining < 10] → the "Extend Time" button renders, independent of the extend_eligible flag.
  5. [If days_remaining >= 10 OR days_remaining < 0] → the "Extend Time" button is hidden.
  6. User clicks "Extend Time" → control passes to UC_4.9.4's purchase flow (not repeated here).

6. Alternative Flow

  • None beyond the button visibility boundary cases covered in Basic Flow steps 4-5.

7. Exceptional Flow

  • None specific to this UC.

8. Business Rules

BR_4.7.4.1: Pulse/Glow Threshold — extend_eligible Flag (days_remaining <= 10)

The pulse/glow visual state activates when the extend_eligible flag returned by GET /user/status is true, i.e. days_remaining < 10 (inclusive), applying to all 3 tracks — Associate, Accelerated, and Advanced (Ref: A-15; this overrides the Associate-only scoping text in dashboard_v7_full.txt L679). Note this is a distinct threshold from the "Extend Time" button's own visibility condition (Ref: §5 Basic Flow steps 4-5). (Source: QN-4.7.4-02)

BR_4.7.4.2: days_remaining Formula

days_remaining = expiration_date − Today (UTC), clamped to 0 if negative — the counter never displays a negative number. expiration_date itself is set at account creation as expiration_date = Account_Creation_Date + 60 days.

BR_4.7.4.3: Countdown Display Granularity — Days and Hours

The counter counts down in days and hours, not whole days only. Text pattern: "{days_remaining} d {hours_remaining} h" (e.g. "7d 14h"). The countdown ticks down live on the Dashboard: hours_remaining decrements every hour; when it reaches 0, days_remaining decrements by 1. Final state 0 days 0 hours remaining displays "0d 0h" (clamped, never negative). (Source: client design document, updated during business clarification)

9. Screen Description

No.Field NameField TypeDisplaying rule / Behaviour rule
1Days Remaining CounterLabelDisplaying rule:- Text pattern: "{days_remaining} d {hours_remaining} h", counting down live in days and hours (Ref: BR_4.7.4.3).- Pulse/glow visual state applies when extend_eligible == true (Ref: BR_4.7.4.1).
2"Extend Time" ButtonButton (Secondary)Displaying rule:- Visible when 0 <= days_remaining < 10. Hidden when days_remaining >= 10 or days_remaining < 0.Behaviour rule:- On click: hands off to UC_4.9.4's purchase flow (not repeated here).

On this page