Skip to content

Disable no-op strategy switch actions#44

Merged
Pigbibi merged 1 commit into
mainfrom
codex/disable-no-op-switch
Jun 9, 2026
Merged

Disable no-op strategy switch actions#44
Pigbibi merged 1 commit into
mainfrom
codex/disable-no-op-switch

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • hide pending reserved-cash and strategy rows unless they differ from readable current state
  • disable the switch button when there are no pending changes
  • keep the button enabled when strategy, mode, or reserved-cash settings actually change

Tests

  • node --experimental-default-type=module tests/strategy_switch_worker_validation.mjs
  • python3 -m pytest tests/test_runtime_settings.py -q
  • node --check --input-type=module < web/strategy-switch-console/worker.js
  • node --check --input-type=module < web/strategy-switch-console/page_asset.js
  • node --check --input-type=module < web/strategy-switch-console/strategy_profiles_asset.js
  • sed -n '/<script>/,/</script>/p' web/strategy-switch-console/index.html | sed '1d;' | node --check --input-type=commonjs
  • jq empty web/strategy-switch-console/account-options.example.json web/strategy-switch-console/strategy-profiles.example.json
  • git diff --check

@Pigbibi Pigbibi merged commit c2ac3bd into main Jun 9, 2026
2 checks passed
@Pigbibi Pigbibi deleted the codex/disable-no-op-switch branch June 9, 2026 19:32

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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