Skip to content

refactor(accounts): move account crud into the accounts store#3036

Merged
afonsojramos merged 3 commits into
mainfrom
refactor/accounts-store-crud
Jul 20, 2026
Merged

refactor(accounts): move account crud into the accounts store#3036
afonsojramos merged 3 commits into
mainfrom
refactor/accounts-store-crud

Conversation

@afonsojramos

Copy link
Copy Markdown
Member

Summary

Split from #3034. The accounts store now owns account CRUD:

  • The AuthState-shaped helpers in utils/auth/utils.ts (addAccount, removeAccount, hasAccounts, hasMultipleAccounts, getPrimaryAccountHostname) are inlined into useAccountsStore actions, and the AuthState type is deleted.
  • utils/auth/utils.ts keeps only account-scoped utilities (refreshAccount, getAccountUUID, isValidHostname).
  • Account-creation test coverage (Cloud + Enterprise, PAT + OAuth, re-auth upsert) moved from auth/utils.test.ts into useAccountsStore.test.ts, plus new primaryAccountHostname coverage.

Notes

…re-crud

# Conflicts:
#	src/renderer/utils/notifications/notifications.ts
@sonarqubecloud

Copy link
Copy Markdown

@afonsojramos
afonsojramos merged commit 8043b10 into main Jul 20, 2026
17 checks passed
@afonsojramos
afonsojramos deleted the refactor/accounts-store-crud branch July 20, 2026 17:48
@github-actions github-actions Bot added this to the Release 7.0.0 milestone Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Refactoring of existing feature

Development

Successfully merging this pull request may close these issues.

2 participants