GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(shared): formatDuration renders "60s" instead of "1m" at the sub-minute boundary by arhxam · Pull Request #5026 · pingdotgg/t3code

Conversation

@arhxam

@arhxam arhxam commented Jul 30, 2026 •
edited by macroscopeapp Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

What Changed

formatDuration (packages/shared/src/orchestrationTiming.ts) now rolls a sub-minute duration that rounds to 60 seconds up to "1m", instead of printing "60s". Added a test file covering the boundary and surrounding formats.

Why

The sub-minute branch used ${Math.round(durationMs / 1_000)}s, so any value in [59_500, 60_000) rounds to 60 and renders "60s". The >= 60_000 branch already guards exactly this rollover:

if (seconds === 60) return `${minutes + 1}m`;

…so the two branches disagreed: formatDuration(59_500) → "60s" while formatDuration(60_000) → "1m". This is user-visible via thread duration display (apps/mobile/src/lib/threadActivity.ts).

Verified before/after against the real module: 59_499 → "59s", 59_500 → "1m", 60_000 → "1m".

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • No UI changes (text formatting only; covered by a new unit test)

Note

Low Risk
Display-only duration formatting in shared code; no auth, data, or API behavior changes.

Overview
formatDuration in orchestrationTiming.ts now treats sub-minute durations that round to 60 seconds (e.g. 59_500ms) as "1m" instead of "60s", matching the rollover logic already used for >= 60_000ms.

A new orchestrationTiming.test.ts covers ms/s formats, the 59.5s boundary, minute strings, and invalid inputs (NaN, negatives).

Reviewed by Cursor Bugbot for commit 8d31469. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix formatDuration rendering '60s' instead of '1m' at the sub-minute boundary

Durations that round to exactly 60 seconds (e.g. 59,500ms) were displayed as '60s' instead of '1m'. The fix adds a check in orchestrationTiming.ts that returns '1m' when the rounded seconds value equals 60. New tests in orchestrationTiming.test.ts cover this boundary along with sub-second, minute, and invalid-input cases.

Macroscope summarized 8d31469.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@arhxam @claude
fix(shared): roll a sub-minute duration up to "1m" instead of "60s"
8d31469
`formatDuration` renders durations under a minute with
`${Math.round(durationMs / 1_000)}s`. For any value in [59_500, 60_000) that
rounds to 60 and prints "60s". The >= 60_000 branch already guards this exact
case (`if (seconds === 60) return `${minutes + 1}m``), so the sub-minute branch
was inconsistent with it: `formatDuration(59_500)` gave "60s" while
`formatDuration(60_000)` gives "1m".

Round first and roll 60 up to "1m". This is user-visible via thread duration
display (`apps/mobile/src/lib/threadActivity.ts`). Added a test file for
`formatDuration` covering the boundary and the surrounding formats.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ae4bea6c-2f45-4c44-af63-a7bd6fd662f7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Jul 30, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jul 30, 2026
View reviewed changes
@macroscopeapp

macroscopeapp Bot commented Jul 30, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 8d31469

Macroscope's review found this PR approvable — The PR makes a narrowly scoped correction to shared duration display logic, changing only the 59.5–60 second rounding boundary from "60s" to "1m". It adds focused regression coverage and has no schema, deployment, security, or other material runtime side effects.

Notes:

  • Diff unchanged. Approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@t3dotgg t3dotgg added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. and removed vouch:unvouched Author is not yet trusted in the VOUCHED list. labels Aug 24, 2026
@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Sep 30, 2026 — with ChatGPT Codex Connector
@macroscopeapp
macroscopeapp Bot dismissed their stale review September 30, 2026 21:51

Dismissing prior approval to re-evaluate 8d31469

macroscopeapp[bot]
macroscopeapp Bot approved these changes Sep 30, 2026
View reviewed changes
@ValeraZSD ValeraZSD mentioned this pull request Oct 5, 2026
fix(shared): no 60s or 1000K at unit boundaries #13412
Closed
@maria-rcks

maria-rcks commented Oct 11, 2026

Copy link
Copy Markdown
Collaborator

Note

Written by claude-opus-5-5 on behalf of Maria

Hi! We are cleaning up open PRs, and this one has merge conflicts with main, does not say which model created it and was opened more than two weeks ago. If this change is still important, please rebuild it on current main with a newer model and note the model in the PR description.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@maria-rcks maria-rcks closed this Oct 11, 2026
This was referenced Oct 16, 2026
fix(shared): choose duration unit after rounding seconds #20299
Merged
T3Code — single canonical promotion queue (#42) kvnloo/t3code#42
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:XS 0-9 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@arhxam @maria-rcks @t3dotgg @juliusmarminge
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.