Guard strategy choices by account domain#18
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c4475c1e2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| strip.innerHTML = ""; | ||
| for (const platform of Object.keys(platformMeta)) { | ||
| ensureAccountSelection(platform); | ||
| syncStrategyForAccount(platform); |
There was a problem hiding this comment.
Preserve the selected strategy during rerenders
When the strategy dropdown change handler stores the user's choice and calls render(), renderPlatforms() now runs syncStrategyForAccount() for every platform before the controls are drawn. For accounts with a current or default_strategy_profile, defaultStrategyForAccount(..., state.forms[platform].strategy) prefers that current/default profile over the fallback user selection, so any non-default supported strategy is immediately overwritten and cannot be dispatched from the UI.
Useful? React with 👍 / 👎.
Summary
Tests