Skip to content

TT 7344 pending retry ux - #538

Draft
gtryus wants to merge 3 commits into
developfrom
TT-7344-pending-retry-ux
Draft

TT 7344 pending retry ux#538
gtryus wants to merge 3 commits into
developfrom
TT-7344-pending-retry-ux

Conversation

@gtryus

@gtryus gtryus commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Bugs

  • TT-7344: Footer “Retry all” is shown whenever items.length > 0 (PendingUploadsDialog.tsx ~258–264).
  • TT-7364: Retry sets busy but shows no progress; success is silent (row vanishes). useMediaUpload already snackbars t.uploadComplete; the dialog never calls it.

Design

  • Extract tiny pure helpers (easy Jest, no Electron): shouldShowRetryAll(count) → count > 1; retryProgressLabel(current, total).
  • Render Retry all only when shouldShowRetryAll(items.length).
  • While busy, show determinate progress if Retry all (n of m) or an indeterminate bar + status for a single Retry (reuse patterns from UploadProgress / ImportTab LinearProgress).
  • On each successful cb, showMessage with existing mediaTab.uploadComplete ({0} of {1}). Keep the terminal-failure warning path.

Red-green slices

  1. shouldShowRetryAll(1) === false, (2) === true.
  2. Dialog test: one item → no Retry all button; two items → button present. Mock isElectron, window.api, useGlobal keyed map, useSelector against a stub strings slice (same pattern as other Team/hook tests). Assert by button text pendingUploadBatchRetry, not fragile indices.
  3. Retry success invokes showMessage with 1 of 1 files uploaded… (stub nextUpload and invoke cb(0, true, { stringId })).
  4. Retry all: after first success, progress text reflects 1 of 2 before the second dispatch.

Files: PendingUploadsDialog.tsx (+ new PendingUploadsDialog.test.tsx and a small helper module), localization only if we add a dedicated “Uploading pending file…” string; prefer existing uploadComplete first.

Greg Trihus and others added 2 commits August 19, 2026 17:48
…load progress on retry.

Retry all is only offered when two or more files are queued, and a successful retry now reports the same uploadComplete snackbar as a normal save.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gtryus
gtryus marked this pull request as draft August 25, 2026 19:55
@gtryus
gtryus requested review from sarahentzel and a lite review from Copilot August 25, 2026 20:43
@gtryus
gtryus marked this pull request as ready for review August 25, 2026 20:44

Copilot AI left a comment

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.

Pull request overview

This PR improves the pending media upload retry experience in the React renderer’s Team UI by addressing TT-7344 (incorrect “Retry all” visibility) and TT-7364 (no visible progress / silent success).

Changes:

  • Added small pure helpers for “Retry all” visibility and progress-label formatting.
  • Updated PendingUploadsDialog to conditionally render “Retry all”, show a busy-state progress indicator, and snackbar a success message per completed retry.
  • Added Jest tests for the helper module and basic dialog rendering / single-retry success snackbar.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/renderer/src/components/Team/pendingUploadsDialogHelpers.ts Adds pure helpers for “Retry all” visibility and progress label formatting.
src/renderer/src/components/Team/pendingUploadsDialogHelpers.test.ts Unit tests for the new helper functions.
src/renderer/src/components/Team/PendingUploadsDialog.tsx Implements conditional “Retry all”, busy progress UI, and success snackbars during retries.
src/renderer/src/components/Team/PendingUploadsDialog.test.tsx Adds dialog tests for “Retry all” visibility and single-retry success snackbar.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

return count > 1;
}

/** Determinate retry progress, 1-based current index (TT-7364). */
Comment on lines +134 to +138
it('shows Retry all when more than one pending file is listed (TT-7344)', () => {
appendPendingMediaUpload({
localAbsolutePath: '/a/audio.mp3',
fileSize: 10,
uploadType: UploadType.Media,
Comment on lines +170 to +174
if (success) {
retryDoneRef.current += 1;
setRetryProgress({
completed: retryDoneRef.current,
total: retryTotalRef.current,
@gtryus
gtryus requested a lite review from Copilot August 25, 2026 21:35
@gtryus
gtryus marked this pull request as draft August 25, 2026 21:35

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment on lines +158 to 162
// Synchronous by contract: nextUpload calls cb without awaiting it, so
// anything after an await here would be stranded on a rejection --
// leaving busy stuck and the rest of the retry queue unprocessed.
cb: (_n, success, data) => {
const sid = (data as { stringId?: string } | undefined)?.stringId;
: 0
}
/>
{retryProgress.total > 1 && (
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