Skip to content

Avoid blocking account config on status reads#24

Merged
Pigbibi merged 1 commit into
mainfrom
codex/nonblocking-config-load
Jun 9, 2026
Merged

Avoid blocking account config on status reads#24
Pigbibi merged 1 commit into
mainfrom
codex/nonblocking-config-load

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • make /api/config return account options even when current GitHub variable status reads are slow
  • cap current strategy status reads with a fallback instead of blocking switching
  • show a loading state while account config is being read

Validation

  • jq empty web/strategy-switch-console/strategy-profiles.example.json
  • node --experimental-default-type=module tests/strategy_switch_worker_validation.mjs
  • sed -n '/<script>/,/</script>/p' web/strategy-switch-console/index.html | sed '1d;' | node --check --input-type=commonjs
  • node --check --input-type=module < web/strategy-switch-console/page_asset.js
  • node --check --input-type=module < web/strategy-switch-console/worker.js
  • python3 scripts/runtime_settings.py validate
  • python3 -m unittest discover -s tests -v

@Pigbibi Pigbibi merged commit 215ba34 into main Jun 9, 2026
2 checks passed
@Pigbibi Pigbibi deleted the codex/nonblocking-config-load branch June 9, 2026 08:07

@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: 01ef7340ff

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

Comment on lines +1308 to +1309
state.configSource = "loading";
render();

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 Restore render after config load failures

When /api/config fails, returns non-OK, or the session expires and returns no accountOptions, this new loading state is rendered before the request but the failure/no-config paths only set state.configSource = "default" without calling render(). The UI therefore stays stuck on “Loading config” with switching disabled until the page is reloaded; re-render after the fallback state is applied.

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