Skip to content

About page uptime counter runs one second ahead #1643

Open

Description

@joshunrau

The uptime counter on the About page runs one second ahead. TimeValue increments its counter and then formats counter + 1, adding the second twice. On the first tick the display jumps from the starting value straight to start + 2, then advances one second per tick from there. Every later value is one second too high. This affects both the core API uptime and the gateway uptime.

Where

apps/web/src/routes/_app/about.tsx:92-95:

useInterval(() => {
  valueRef.current = valueRef.current + 1;
  setState(format(valueRef.current + 1));
}, 1000);

Reproduce

  1. Open the About page while the setup state reports an uptime of 5 seconds.
  2. Watch the counter.

Actual: 00:00:05, then 00:00:07, 00:00:08, 00:00:09 (it skips 6). After 3 seconds it shows 00:00:09.
Expected: 00:00:05, 00:00:06, 00:00:07, 00:00:08.

Tests

apps/web/src/__tests__/about-route.test.tsx: it.fails('should show the starting uptime plus the seconds elapsed since the page opened'), with a "Known defect" comment above it. Drop .fails and the comment once fixed. should advance the uptime by exactly one second per tick, ... already passes and should keep passing.

Suggested fix

Format the incremented value directly: setState(format(valueRef.current)).

Found while raising unit test coverage in #1632.

Activity

  1. added
    BugType: existing behavior is wrong
    Priority: LowNice to have, cosmetic or speculative
    Difficulty: LowIsolated change, about 2 hours or less
    Area: Webapps/web (clinician-facing React SPA)
    Good First IssueWell-scoped, low-risk and self-contained; a good entry point for a new contributor
    on Oct 5, 2026
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

    Area: Webapps/web (clinician-facing React SPA)BugType: existing behavior is wrongDifficulty: LowIsolated change, about 2 hours or lessGood First IssueWell-scoped, low-risk and self-contained; a good entry point for a new contributorPriority: LowNice to have, cosmetic or speculative

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions