Skip to content

[Bug]: Mobile Usage Limits account detail screen freezes "Even pace" at initial navigation timestamp #40752

Closed

Description

@iiijiashu

Summary

On mobile Usage → Limits, opening an account's detail screen (UsageLimitAccountScreen) freezes "Even pace: {evenPace}% left by now" at the now timestamp captured when navigating from the list, even though the screen continues subscribing to live environmentPresentations updates.

Code Analysis (verified on origin/main cd3a57ac72)

  • apps/mobile/src/features/usage/UsageLimitsSection.tsx:340: The limits list screen reads a live minute clock (nowMinute / now).
  • apps/mobile/src/features/usage/UsageLimitsPooled.tsx:198 (and navigation route params at lines 588-599): Passes the static now number inside navigation.navigate("SettingsUsageAccount", { ..., now }).
  • apps/mobile/src/features/usage/UsageLimitsPooled.tsx:612: UsageLimitAccountScreen calculates const evenPace = window ? paceRemainingPercent(window, now) : null; using that frozen route.params.now rather than the live minute clock.

If the user keeps the account detail view open across one or more minutes, the countdown/pace value "% left by now" stops updating and drifts from the list screen.

Expected Behavior

UsageLimitAccountScreen should derive now from the same live minute clock used by UsageLimitsSection, rather than freezing it in navigation params.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions