Skip to content

fix(settings): defer profile selection persistence until save - #141

Open
jgindin wants to merge 1 commit into
mainfrom
fix-profile-selection
Open

fix(settings): defer profile selection persistence until save#141
jgindin wants to merge 1 commit into
mainfrom
fix-profile-selection

Conversation

@jgindin

@jgindin jgindin commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Description

Decouples profile dropdown selection from immediate LocalStorage and StartupResolution mutation. Profile changes in the Settings UI now update local form state only, and are persisted when saveSettings() is explicitly invoked.

Pre-launch Checklist

  • I signed the [CLA].
  • I read the [Contributors Guide].
  • I read the [Style Guide].
  • I have added updates to the [CHANGELOG].
  • I updated/added relevant documentation.
  • My code changes (if any) have tests.
  • If my branch is on fork, I have verified that scripts/e2e_test.sh passes.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request refactors the settings view to handle profile selection locally as a draft state (draftSelectedProfileId) rather than committing changes immediately. The actual profile selection is now only saved when the user explicitly clicks "Save Settings". The review feedback highlights opportunities to simplify the code by removing an unnecessary queueMicrotask deferral, eliminating a redundant state initialization in ngOnInit(), and directly querying the profiles dictionary in onProfileSelected instead of relying on a computed signal.

Comment thread shell/src/app/settings/settings-view/settings.ts Outdated
Comment thread shell/src/app/settings/settings-view/settings.ts
Comment thread shell/src/app/settings/settings-view/settings.ts Outdated
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

⚡ A2UI Composer PR Preview

Your automated preview is successfully live (commit aef1721):
👉 Launch PR Preview

Note: This environment will be wiped automatically when the PR is merged or closed.

Decouples profile dropdown selection from immediate LocalStorage and
StartupResolution mutation. Profile changes in the Settings UI now
update local form state only, and are persisted when saveSettings()
is explicitly invoked.
@jgindin
jgindin force-pushed the fix-profile-selection branch from 5f8349c to aef1721 Compare July 31, 2026 18:10
@jgindin
jgindin requested review from sugoi-yuzuru, suyangw-g and wrenj and removed request for sugoi-yuzuru, suyangw-g and wrenj July 31, 2026 18:38
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.

1 participant