Disable no-op strategy switch actions#44
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5b5d5e1d2e
ℹ️ 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".
| nextProfile, | ||
| currentMode, | ||
| strategyChanged: Boolean(nextProfile && (!currentProfile || currentProfile !== nextProfile)), | ||
| modeChanged: Boolean(currentMode && inputs.execution_mode && currentMode !== inputs.execution_mode), |
There was a problem hiding this comment.
Allow mode-only switches when current mode is unread
When /api/config can read the current strategy but not an execution mode (for example the legacy STRATEGY_PROFILE fallback in worker.js returns strategy_profile without execution_mode for non-paper targets), currentMode is an empty string. In that state selecting Paper with the same strategy is a real mode change, but this condition keeps modeChanged false, so hasPendingChanges() disables the dispatch button unless the user also changes strategy or cash settings.
Useful? React with 👍 / 👎.
Summary
Tests