Skip to content

Read current reserved cash in switch console#42

Merged
Pigbibi merged 1 commit into
mainfrom
codex/current-reserve-policy-ui
Jun 9, 2026
Merged

Read current reserved cash in switch console#42
Pigbibi merged 1 commit into
mainfrom
codex/current-reserve-policy-ui

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • read current reserved-cash floor and ratio from platform GitHub Variables / service-target config
  • show current reserved-cash policy in the right-side current status instead of only form overrides
  • align reserved-cash controls by keeping the ratio field under the minimum cash field

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 b71060b into main Jun 9, 2026
1 check passed
@Pigbibi Pigbibi deleted the codex/current-reserve-policy-ui branch June 9, 2026 19:05

@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: b71060b8c2

ℹ️ 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".

[t("selectedAccount"), account.label],
[t("selectedMarket"), supportedDomainLabel(state.selected, account)],
[t("reservedCashPolicy"), reservedCashPolicyText(inputs)],
[t("reservedCashPolicy"), currentReservedCashPolicyText(state.selected, account)],

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 Show edited reserve policy in the confirmation

When a user edits the reserve cash fields, buildInputs() still sends those edited values, but this row now ignores inputs and always displays the currently read policy. In that scenario the confirmation panel and copied summary can show the old reserve policy while the dispatch request applies a different one, so users lose the last chance to verify the cash settings they are about to submit.

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