Skip to content

feat(account-tree-controller): always fire :selectedAccountGroupChange on init#8427

Merged
ccharly merged 4 commits intomainfrom
cc/fix/selected-account-group-change-on-init
Apr 14, 2026
Merged

feat(account-tree-controller): always fire :selectedAccountGroupChange on init#8427
ccharly merged 4 commits intomainfrom
cc/fix/selected-account-group-change-on-init

Conversation

@ccharly
Copy link
Copy Markdown
Contributor

@ccharly ccharly commented Apr 10, 2026

Explanation

We used to not persist the selectedAccountGroup property before this change:

As a side-effect of this new persistence, we're not re-sending :selectedAccountGroupChange on init and a lot of controllers were relying on this behavior.

We re-introduce this behavior so every controllers can decide how to handle that.

References

N/A

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Medium Risk
Changes event-emission semantics so selectedAccountGroupChange now fires on every init/reinit, which may trigger extra startup work or duplicate handling in subscribers that assumed it only emitted on changes.

Overview
Ensures AccountTreeController always publishes AccountTreeController:selectedAccountGroupChange at the end of init (and therefore reinit), even when the selected group value is unchanged.

Adds a regression test covering the reinit-with-same-accounts case and updates the package changelog to document the restored behavior.

Reviewed by Cursor Bugbot for commit 0689a7b. Bugbot is set up for automated code reviews on this repo. Configure here.

@ccharly ccharly marked this pull request as ready for review April 13, 2026 12:03
@ccharly ccharly requested review from a team as code owners April 13, 2026 12:03
@ccharly ccharly changed the title fix(account-tree-controller): always fire :selectedAccountGroupChange on init feat(account-tree-controller): always fire :selectedAccountGroupChange on init Apr 14, 2026
@ccharly ccharly enabled auto-merge April 14, 2026 13:45
@ccharly ccharly added this pull request to the merge queue Apr 14, 2026
Merged via the queue into main with commit 90d8093 Apr 14, 2026
341 checks passed
@ccharly ccharly deleted the cc/fix/selected-account-group-change-on-init branch April 14, 2026 13:46
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