Skip to content

fix(dashboard): display runtime over 24h in day format with auto-adaptive button width#2004

Open
wavever wants to merge 1 commit into
chen08209:mainfrom
wavever:issue-1824-runtime-display
Open

fix(dashboard): display runtime over 24h in day format with auto-adaptive button width#2004
wavever wants to merge 1 commit into
chen08209:mainfrom
wavever:issue-1824-runtime-display

Conversation

@wavever
Copy link
Copy Markdown

@wavever wavever commented May 7, 2026

Summary

Improve dashboard runtime display for long-running sessions by switching to day format after 24 hours.

Problem

Issue #1824: dashboard runtime in the bottom-right stop button no longer increases visually after reaching 99:59:59.

Changes

  • Switch to day format (Xd HH:mm:ss) when runtime reaches 24 hours instead of capping at 99:59:59.
    • < 24h: HH:mm:ss
    • >= 24h: Xd HH:mm:ss
  • Cache text width measurement in start button to avoid per-frame recalculation.
  • Refactor StartButton to use runTimeProvider directly instead of DateTime.now().

Files

  • lib/common/utils.dart
  • lib/views/dashboard/widgets/start_button.dart

Test

image

Fixes #1824

@wavever wavever force-pushed the issue-1824-runtime-display branch from ef762fd to 4da65d6 Compare May 7, 2026 19:01
oviron added a commit to oviron/FlClash that referenced this pull request May 8, 2026
Backport chen08209#2004 (wavever). getTimeText now formats long uptime
as days+hours instead of capping at 99:59:59. start_button caches the
short and long format widths to avoid re-measuring on every frame, and
the runTime provider read moves into the AnimatedBuilder builder so it
rebuilds with the rest of the FAB.
…tive button width

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@wavever wavever force-pushed the issue-1824-runtime-display branch from 4da65d6 to 38933f9 Compare May 9, 2026 04:46
@wavever wavever changed the title fix(dashboard): display runtime over 99:59:59 fix(dashboard): display runtime over 24h in day format with auto-adaptive button width May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] 仪表盘右下角的 累计时间在达到 99:59:59不能再进行累计了

1 participant