Skip to content

fix: canceling account edits still saves updated profile picture - #201

Open
jenniyan wants to merge 12 commits into
mainfrom
185-canceling-account-edits-still-saves-updated-profile-picture
Open

fix: canceling account edits still saves updated profile picture#201
jenniyan wants to merge 12 commits into
mainfrom
185-canceling-account-edits-still-saves-updated-profile-picture

Conversation

@jenniyan

@jenniyan jenniyan commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Description

Profile picture is only officially updated after pressing save. Previously, it would be saved even if the user pressed Cancel on the account form.

Issues

Closes #185


Summary by cubic

Fixes the bug where canceling account or profile edits still saved a new profile picture. Previously, uploads committed immediately; now picture changes commit only on Save, and Cancel/exit keeps the original. Closes #185.

  • Stage uploads for preview only; delete replaced or unsaved uploads on cancel/replace/exit, and never delete a committed picture.
  • Prevent races by tagging requests with a session/request id; ignore and delete uploads that resolve after cancel/save (including uploads started during save).
  • Make save atomic: commit the new picture on Save and then update the user; if the picture update fails, keep the prior picture and audit state unchanged.
  • Treat the picture as dirty only if the key changes; show “Profile Picture → Updated” in Changed fields and include picture in audit snapshots when changed.
  • While saving, disable Cancel (and Edit) and show Save loading in both the account drawer and profile view; add i18n for “Profile Picture” and “Updated” in en, es, fr, and zh.

Written for commit c174614. Summary will update on new commits.

Review in cubic

@jenniyan jenniyan linked an issue Aug 6, 2026 that may be closed by this pull request
@jenniyan jenniyan self-assigned this Aug 6, 2026

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 7 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread client/src/components/accounts/AccountForm/index.jsx Outdated
Comment thread client/src/components/accounts/AccountForm/index.jsx
Comment thread client/src/components/accounts/AccountForm/index.jsx

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 1 file (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread client/src/components/accounts/AccountForm/index.jsx
Comment thread client/src/components/accounts/AccountForm/index.jsx

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 1 file (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread client/src/components/accounts/AccountForm/index.jsx Outdated
Comment thread client/src/components/accounts/AccountForm/index.jsx
jenniyan and others added 2 commits August 9, 2026 10:14
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

@xgraceyan xgraceyan 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.

Did you get a chance to test it locally, now that the S3 bucket is working? I just tested it and it works for the "Accounts" page but not when I edit my own profile in /profile. Can we implement this fix in the Profile page as well?

Comment thread client/src/components/accounts/AccountForm/index.jsx

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 3 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread client/src/components/profile/useProfile.js

@cubic-dev-ai cubic-dev-ai Bot 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.

All reported issues were addressed across 1 file (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread client/src/components/profile/useProfile.js
@xgraceyan

Copy link
Copy Markdown
Contributor

Is this ready for re-review? Lmk, just re-request a review from me whenever it's ready

@jenniyan
jenniyan requested a review from xgraceyan August 20, 2026 06:55
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.

Canceling Account Edits Still Saves Updated Profile Picture

2 participants