Repository navigation
fix(web): show hours in clock times past an hour - #3305
Conversation
|
@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. |
| : `${mins}:${pad(secs)}`; | ||
| } | ||
|
|
||
| /** `MM:SS.ss`, or `H:MM:SS.ss` once the time reaches an hour. */ |
There was a problem hiding this comment.
Comment breaks repository policy
The new comment above formatClockWithHundredths only describes its output. AGENTS.md allows comments only for non-obvious context and bans comments that narrate what the code does. Remove this comment before merging to meet that requirement; the helper and its tests already show the format.
| /** `MM:SS.ss`, or `H:MM:SS.ss` once the time reaches an hour. */ |
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/web/lib/player-time.ts
Line: 30
Comment:
**Comment breaks repository policy**
The new comment above `formatClockWithHundredths` only describes its output. `AGENTS.md` allows comments only for non-obvious context and bans comments that narrate what the code does. Remove this comment before merging to meet that requirement; the helper and its tests already show the format.
```suggestion
```
**Context Used:** AGENTS.md ([source](https://github.com/capsoftware/cap/blob/main/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Removed in 941ac2a, along with the matching comment on formatClock, which only restated its format too.
|
Thanks! Can you get Greptile to 5/5? Then we'll take a look. |
Six places formatted times as minutes and seconds only, so a point 1 h 5 m 5 s in read 65:05. Move the share page's formatClock into lib/player-time next to formatPlayerTime, add formatClockWithHundredths for the web editor's detailed readout, and use them in all six; shorter times print as before.
They only restated each helper's output format, which AGENTS.md asks comments not to do; the tests already show the formats.
The speed tool's duration and estimated output duration also counted minutes past 59. Use formatClock, as the trim tool now does.
40734ce to
804c997
Compare
|
@greptileai review |
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
Closes #3303.
Seven places on the web formatted times as minutes and seconds only, so anything past the hour mark read as a minute count,
65:05instead of1:05:05:EditVideoClient.tsx)TranscriptSidebar.tsx)This adds
formatClock(M:SS, orH:MM:SSfrom an hour on) andformatClockWithHundredths(MM:SS.ss, orH:MM:SS.ss) tolib/player-time.ts, next toformatPlayerTime, and uses them in all seven. Under an hour each place prints exactly what it did before; Slack keeps its rounding to the nearest second.formatClockis the share page's existing helper, moved intolib.timeline/timeline-format.tsandearly-playback.tsnow re-export it instead of keeping their own copies, and the timeline copy's handling ofNaNandInfinityis the one kept. The MCP card imports it with a relative path, since it's bundled on its own, andlib/mcp-card-html.jsonis regenerated (mcp-card:checkpasses).Tests
__tests__/unit/clock-hours.test.ts, added to the web test list in CI: both helpers, the Slack preview text, and the web editor's transcript sidebar rendered with a line past the hour. Without the call-site changes, the Slack and transcript cases fail (Watch this 65:05 recording on Cap,65:10 · 2 words).speed-controller.test.tsloads a 90-minute video and checks the duration and the 1.5x estimate (1:30:00,1:00:00). It fails without the change.player-time,early-playback-guard,slack-unfurl,transcript-sidebar-searchandtrimming-tool-effecttests pass.homepage-seo.test.ts(it expects noFAQPagein the homepage schema), fails the same way on main.bun run typecheck: no errors. Biome: no new findings.

Confidence Score: 5/5
The PR appears safe to merge.Summary
Adds shared clock helpers and shows hours across seven web surfaces.
Reviews (2) · Last reviewed commit: "fix(web): show hours in the speed tool's..." · Reviewed by Greptile