Skip to content

fix: add time and size estimation below export buttons (#224) - #2050

Open
BMNTR wants to merge 3 commits into
CapSoftware:mainfrom
BMNTR:fix/export-time-size-estimation
Open

fix: add time and size estimation below export buttons (#224)#2050
BMNTR wants to merge 3 commits into
CapSoftware:mainfrom
BMNTR:fix/export-time-size-estimation

Conversation

@BMNTR

@BMNTR BMNTR commented Jul 29, 2026

Copy link
Copy Markdown

Adds estimated export time and file size indicators directly under the export buttons to resolve #224.

Changes

  • Added size (MB) and duration (sec/min) estimation text below the main export button in ExportPage.tsx.
  • Added estimated size and time badge to thumbnail hover cards in recordings-overlay.tsx.

Tested locally with short and long recording lengths.

/claim #224

Greptile Summary

This PR adds estimated export size and duration text to the editor export action and recording-thumbnail hover cards.

Confidence Score: 4/5

The PR appears safe to merge, with a non-blocking readability issue for long duration estimates in the recording overlay.

The estimate units and guarded data access are consistent with their producers, but the overlay’s seconds-only formatting becomes difficult to interpret for long recordings.

Files Needing Attention: apps/desktop/src/routes/recordings-overlay.tsx

Important Files Changed

Filename Overview
apps/desktop/src/routes/editor/ExportPage.tsx Adds a guarded size and duration estimate beneath the export button with appropriate seconds-to-minutes formatting.
apps/desktop/src/routes/recordings-overlay.tsx Adds the estimate to thumbnail hover cards, but formats arbitrarily long durations exclusively as raw seconds.
Prompt To Fix All With AI
### Issue 1
apps/desktop/src/routes/recordings-overlay.tsx:388
**Format long estimates readably**

The badge renders every `estimatedExportTime` value as raw seconds, so long recordings display values such as `~10800s` instead of the more readable minutes-and-seconds format used by the main export view.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "fix: add time and size estimation below ..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

<Show when={metadata.latest}>
{(metadata) => (
<span class="text-[10px] text-gray-200 font-medium bg-black/50 px-2 py-0.5 rounded backdrop-blur-sm">
Est. {metadata().size.toFixed(1)} MB • ~{Math.ceil(metadata().estimatedExportTime)}s

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Format long estimates readably

The badge renders every estimatedExportTime value as raw seconds, so long recordings display values such as ~10800s instead of the more readable minutes-and-seconds format used by the main export view.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src/routes/recordings-overlay.tsx
Line: 388

Comment:
**Format long estimates readably**

The badge renders every `estimatedExportTime` value as raw seconds, so long recordings display values such as `~10800s` instead of the more readable minutes-and-seconds format used by the main export view.

---

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!

Comment thread apps/desktop/src/routes/editor/ExportPage.tsx Outdated
Comment thread apps/desktop/src/routes/editor/ExportPage.tsx Outdated
Comment thread apps/desktop/src/routes/recordings-overlay.tsx Outdated
: `~${Math.floor(sec / 60)}m ${sec % 60}s`;
return (
<p class="text-xs text-gray-10 text-center mt-0.5">
Est. size: {estimate.estimatedSizeMb.toFixed(1)} MB • Est. time: {timeStr}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Minor safety: toFixed() will throw if estimatedSizeMb is ever undefined/non-number (e.g. IPC hiccup). Guarding keeps the UI stable.

Suggested change
Est. size: {estimate.estimatedSizeMb.toFixed(1)} MB Est. time: {timeStr}
Est. size: {Number.isFinite(estimate.estimatedSizeMb) ? estimate.estimatedSizeMb.toFixed(1) : "?"} MB Est. time: {timeStr}

: `~${Math.floor(sec / 60)}m ${sec % 60}s`;
return (
<span class="text-[10px] text-gray-200 font-medium bg-black/50 px-2 py-0.5 rounded backdrop-blur-sm">
Est. {meta.size.toFixed(1)} MB • {timeStr}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same here: toFixed() can throw if size comes back missing/invalid. Guard avoids a runtime crash.

Suggested change
Est. {meta.size.toFixed(1)} MB {timeStr}
Est. {Number.isFinite(meta.size) ? meta.size.toFixed(1) : "?"} MB {timeStr}

<Show when={metadata.latest}>
{(metadata) => {
const meta = metadata();
const sec = Math.max(1, Math.ceil(meta.estimatedExportTime));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Minor safety guard: if meta.estimatedExportTime ever comes back NaN/Infinity, this ends up rendering ~NaNm NaNs. Might be worth mirroring the Number.isFinite guard used in ExportPage.

Suggested change
const sec = Math.max(1, Math.ceil(meta.estimatedExportTime));
const sec = Number.isFinite(meta.estimatedExportTime)
? Math.max(1, Math.ceil(meta.estimatedExportTime))
: 1;

@BMNTR
BMNTR force-pushed the fix/export-time-size-estimation branch from 2c4e6b5 to 1496e80 Compare July 29, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Time/size estimation for export

1 participant