Skip to content

fix(desktop-gpui): carry a rounded-up minute in the timing cards - #3420

Open
patrickballard wants to merge 1 commit into
CapSoftware:mainfrom
patrickballard:fix/timing-card-rounding
Open

patrickballard wants to merge 1 commit into
CapSoftware:mainfrom
patrickballard:fix/timing-card-rounding

Conversation

@patrickballard

@patrickballard patrickballard commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Part of #3419.

format_time in editor_panels.rs rounded the seconds to tenths after splitting off the minutes, so a time within 0.05 s of a minute boundary printed :60.0. It now rounds the whole time to tenths first (the same {:.1} formatting, so every other value prints exactly as before) and then splits it.

time before after
59.94 0:59.9 0:59.9
59.96 0:60.0 1:00.0
119.97 1:60.0 2:00.0
3599.96 59:60.0 1:00:00.0
9.25 0:09.2 0:09.2

Tests

  • New the_timing_cards_carry_a_rounded_up_minute; the existing the_timing_cards_print_the_source_clock is unchanged and passes.
  • cargo test --release --bin cap-gpui: 1472 passed. Clippy: nothing on the changed lines. rustfmt clean.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

format_time now rounds the full time to tenths before splitting it into hours, minutes, and seconds.

  • Time labels carry rounded seconds into the next clock unit.

Reviews (1) · Last reviewed commit: "fix(desktop-gpui): carry a rounded-up mi..." · Reviewed by Greptile

The timing cards rounded the seconds after splitting off the minutes, so
59.96 s printed as 0:60.0 and 119.97 s as 1:60.0. Round to tenths first,
with the same formatting, then split.
@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.

This branch has not been deployed

No deployments
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.

1 participant