Skip to content

fix(desktop-gpui): show hours in times past an hour - #3304

Merged
richiemcilroy merged 2 commits into
CapSoftware:mainfrom
patrickballard:fix/editor-clock-hours
Oct 26, 2026
Merged

richiemcilroy merged 2 commits into
CapSoftware:mainfrom
patrickballard:fix/editor-clock-hours

Conversation

@patrickballard

@patrickballard patrickballard commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Closes #3303.

The recording controls' timer and the editor's transport clock, timeline ruler, timing cards and clip durations formatted times as minutes and seconds only, ported from the Tauri app's formatTime and formatClipDuration, so anything past the hour mark read as a minute count: an hour-long recording's timer read 65:05, the editor showed 0:00 / 65:05, and the ruler labelled the hour 60:00. The export dialog in the same app already shows hours (format_duration).

format_time in editor_timeline.rs, which the clock and the ruler share, now prints H:MM:SS from an hour on, and the recording timer (controls_window.rs) and the clips sidebar's durations (editor_clips.rs, after their existing rounding) use it too. The timing cards' format_time in editor_panels.rs prints H:MM:SS.s. Under an hour every one of them prints exactly what it did before.

Screenshots

The editor on a synthetic 65-minute recording, seeked to 1:02:05.

main this PR
Editor on main: clock 62:05 / 65:05, ruler 60:00 60:30 61:00 Editor with this PR: clock 1:02:05 / 1:05:05, ruler 1:00:00 1:00:30 1:01:00

The ruler draws each label in a fixed 44 px box; 1:00:30 takes about 40 px, so labels below ten hours still fit.

The recording controls during a sandboxed recording, from a temporary build whose timer starts 1 h 4 m 55 s ahead:

Recording controls with this PR, timer reading 1:05:08

Tests

  • New the_clock_and_ruler_show_hours_from_an_hour_on and the_timer_shows_hours_from_an_hour_on, and new cases in the_timing_cards_print_the_source_clock and durations_format_like_the_source. The old formatters print 60:00 and 65:05 where these expect 1:00:00 and 1:05:05.
  • cargo test --release --bin cap-gpui: 1470 passed.
  • cargo clippy --release --bin cap-gpui: no warnings in the changed files. rustfmt clean.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

Adds hour-aware time labels to the desktop editor.

  • The transport clock and ruler show hours for long recordings.
  • Timing cards show hours while keeping tenths of a second.

No actionable issues found. Checks were source-only; tests and the native UI were not run.

Reviews (1) · Last reviewed commit: "fix(desktop-gpui): show hours in the edi..." · Reviewed by Greptile

… cards

The transport clock, timeline ruler and timing cards printed minutes and
seconds only, so a point 1 h 5 m 5 s into a recording read 65:05. Print
H:MM:SS (H:MM:SS.s on the timing cards) from an hour on; shorter times
print as before.
@vercel

vercel Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

@patrickballard is attempting to deploy a commit to the Cap Software Inc Team on Vercel.

A member of the Team first needs to authorize it.

The recording controls' timer and the clips sidebar's clip durations
also counted minutes past 59, so a recording 1 h 5 m 5 s in read 65:05.
Format both with the editor clock's format_time; under an hour they
print as before.
@patrickballard patrickballard changed the title fix(desktop-gpui): show hours in the editor's clock, ruler and timing cards fix(desktop-gpui): show hours in times past an hour Oct 26, 2026

@richiemcilroy richiemcilroy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, checked the output under and over an hour and the tests pin it.

@richiemcilroy
richiemcilroy merged commit 0b6a583 into CapSoftware:main Oct 26, 2026
43 of 45 checks passed
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.

Times past an hour show as minutes (65:05 instead of 1:05:05) across the desktop app, web, Chrome extension and mobile app

2 participants