Skip to content

fix(web): show hours in the Summary tab's chapter timestamps - #3243

Merged
richiemcilroy merged 2 commits into
CapSoftware:mainfrom
patrickballard:fix/summary-chapter-hours
Oct 25, 2026
Merged

richiemcilroy merged 2 commits into
CapSoftware:mainfrom
patrickballard:fix/summary-chapter-hours

Conversation

@patrickballard

@patrickballard patrickballard commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

The share page shows AI chapters in two places, the Summary tab and the chapter list under the video (SummaryChapters), and both formatted start times with minutes-only helpers, so any chapter past the hour mark shows a minute count. The same page's header already rolls over into hours.

chapter starts at before after
59 m 59 s 59:59 59:59
1 h 0 m 0 s 60:00 1:00:00
1 h 5 m 5 s 65:05 1:05:05
2 h 3 m 4 s 123:04 2:03:04

This deletes both helpers (formatTime in Summary.tsx, and formatTimeMinutes in transcript-utils.ts, which nothing else used) and uses formatPlayerTime from @/lib/player-time, which #2655 added for the embed player's duration.

Checks

  • Under an hour the output is unchanged: every whole second from 0 to 3599, plus 20,000 random fractional values, formats identically with the old helper and the new one.
  • chapter.start is in seconds: Share.tsx's handleSeek assigns it to video.currentTime, clamped to the video's duration.
  • __tests__/unit/summary-chapters.test.ts renders both the Summary tab and SummaryChapters and checks the chapter timestamps each shows, from 00:00 to 10:00:00. Each component's cases fail without its change (60:00 instead of 1:00:00).
  • Full web suite: 4,688 passed, 0 failed. bun run typecheck: no errors. Biome: clean on all three files.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge.

Summary

Both chapter lists now use formatPlayerTime to show hours.

  • Both share-page chapter lists now show hours for long timestamps.

Reviews (2) · Last reviewed commit: "fix(web): show hours in the share page's..." · Reviewed by Greptile

The Summary tab formatted chapter start times with its own minutes-only
helper, so a chapter 1 h 5 m 5 s in read 65:05. Use formatPlayerTime,
added for the embed player in CapSoftware#2655, which rolls over into hours. Output
under an hour is unchanged.
@vercel

vercel Bot commented Oct 25, 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.

@richiemcilroy

Copy link
Copy Markdown
Member

Thanks for this, the change to the Summary tab looks right and sub-hour output is unchanged.

One gap before we merge: the share page shows chapters in a second place with the same minutes-only formatting. apps/web/app/s/[videoId]/_components/SummaryChapters.tsx (rendered under the video in the classic view on desktop) uses formatTimeMinutes from _components/utils/transcript-utils.ts, so after this PR the same chapter would read 1:05:05 in the sidebar tab and 65:05 below the video.

Could you:

  • switch SummaryChapters.tsx to formatPlayerTime as well,
  • remove formatTimeMinutes from transcript-utils.ts if nothing else uses it (nothing does on main today),
  • and cover SummaryChapters in the test too.

We'll add the new test file to the web test list in CI on our side.

SummaryChapters, the chapter list under the video, used the same
minutes-only formatTimeMinutes, so a chapter 1 h 5 m 5 s in still read
65:05 there. Use formatPlayerTime like the Summary tab, and remove
formatTimeMinutes, which nothing else used.
@patrickballard

Copy link
Copy Markdown
Contributor Author

Done in 45796a0. SummaryChapters now uses formatPlayerTime, formatTimeMinutes is gone from transcript-utils.ts (nothing else used it), and summary-chapters.test.ts runs the same two cases against both the Summary tab and SummaryChapters. Without the change, the two new SummaryChapters cases fail (60:00 instead of 1:00:00). Full web suite (4,688 passed), typecheck and Biome pass.

@richiemcilroy

Copy link
Copy Markdown
Member

@greptileai review

@richiemcilroy
richiemcilroy merged commit 9438cd6 into CapSoftware:main Oct 25, 2026
29 of 31 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.

2 participants