Skip to content

fix: reset file input after selection so re-uploading the same image …#526

Merged
ussaama merged 1 commit intomainfrom
fix/avatar-reupload-same-file
Apr 13, 2026
Merged

fix: reset file input after selection so re-uploading the same image …#526
ussaama merged 1 commit intomainfrom
fix/avatar-reupload-same-file

Conversation

@ussaama
Copy link
Copy Markdown
Contributor

@ussaama ussaama commented Apr 13, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced file input handling in account and whitelabel logo settings. Users can now re-select and upload the same file multiple times without the system ignoring duplicate selections. The file input properly resets after each selection, enabling smoother file management workflows.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 853409ad-4566-42b4-b7db-c62bae3212ec

📥 Commits

Reviewing files that changed from the base of the PR and between 1cabf37 and ffff403.

📒 Files selected for processing (2)
  • echo/frontend/src/components/settings/AccountSettingsCard.tsx
  • echo/frontend/src/components/settings/WhitelabelLogoCard.tsx

Walkthrough

Two settings card components now implement file input reset functionality. Both AccountSettingsCard and WhitelabelLogoCard use a useRef hook to manage a reset callback passed to their FileButton components, enabling the file input to be cleared before processing new file selections.

Changes

Cohort / File(s) Summary
File Input Reset Integration
echo/frontend/src/components/settings/AccountSettingsCard.tsx, echo/frontend/src/components/settings/WhitelabelLogoCard.tsx
Added useRef-managed reset callback (resetFileInputRef) wired to FileButton via resetRef prop. Both components now invoke the reset function in their handleFileSelect handlers before processing file selections, allowing the input to be cleared even for duplicate file picks.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: resetting file input after selection to enable re-uploading the same image, which directly matches the implemented functionality across both components.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/avatar-reupload-same-file

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

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

@ussaama ussaama requested a review from spashii April 13, 2026 15:51
@ussaama ussaama enabled auto-merge April 13, 2026 15:52
@ussaama ussaama added this pull request to the merge queue Apr 13, 2026
Merged via the queue into main with commit ca50efe Apr 13, 2026
11 checks passed
@ussaama ussaama deleted the fix/avatar-reupload-same-file branch April 13, 2026 16:12
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