Skip to content

fix: use async profile rename in invalid-profile prompt flow#124

Merged
felipefreitag merged 3 commits intoresend:mainfrom
Esubaalew:fix/async-invalid-profile-rename
Mar 19, 2026
Merged

fix: use async profile rename in invalid-profile prompt flow#124
felipefreitag merged 3 commits intoresend:mainfrom
Esubaalew:fix/async-invalid-profile-rename

Conversation

@Esubaalew
Copy link
Contributor

@Esubaalew Esubaalew commented Mar 18, 2026

Summary

  • use renameProfileAsync() in promptRenameIfInvalid()
  • ensure profile renames also update secure-storage backed credentials
  • avoid leaving legacy invalid profiles in a broken state after rename

Why

The invalid-profile prompt flow was still using the synchronous rename path, which only updates the credentials file. For users with secure_storage enabled, that could rename the profile entry without moving the stored API key in the credential backend, leaving the renamed profile unable to resolve its key.


Summary by cubic

Switched the invalid-profile rename prompt to use the async rename path. This moves secure-storage credentials with the rename and prevents broken profiles after renaming legacy entries.

  • Bug Fixes
    • Use renameProfileAsync() with await in promptRenameIfInvalid().
    • Move secure-storage API keys with the rename so the new profile can resolve its credentials.

Written for commit 75a00cc. Summary will update on new commits.

Ensure the invalid-profile prompt uses the async rename path so secure-storage backed credentials are moved when a legacy profile is renamed.
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file


Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Add one-off context when rerunning by tagging @cubic-dev-ai with guidance or docs links (including llms.txt)
  • Ask questions if you need clarification on any suggestion

@felipefreitag felipefreitag merged commit 9f10ebd into resend:main Mar 19, 2026
8 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.

3 participants