Skip to content

Harden strategy switch console boot fetch timeout fallback#144

Merged
Pigbibi merged 1 commit into
mainfrom
fix-console-load-timeout
Jul 2, 2026
Merged

Harden strategy switch console boot fetch timeout fallback#144
Pigbibi merged 1 commit into
mainfrom
fix-console-load-timeout

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Why

The console can stay stuck during initialization when backend bootstrap APIs (/api/session, /api/strategy-profiles, /api/config) do not return.

What changed

  • Add request timeout wrapper (15s) for startup API calls
  • Add explicit JSON/error handling helper
  • On bootstrap config failure, degrade gracefully to public preview mode instead of hanging on loading state
  • Add new bootTimeout message in Chinese/English
  • Guard boot() with top-level fallback to avoid uncaught boot exception

How to verify

  • node --test tests/strategy_switch_worker_validation.mjs
  • node --check web/strategy-switch-console/app.js
  • node --check web/strategy-switch-console/app_js.js
  • node --check web/strategy-switch-console/worker.js

Co-Authored-By: Codex <noreply@openai.com>
@chatgpt-codex-connector

This comment has been minimized.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

🤖 Codex PR Review

⚠️ Review skipped: The Codex review could not be completed.

No Codex service URL or API key configured. Set CODEX_AUDIT_SERVICE_URL, ANTHROPIC_API_KEY, or OPENAI_API_KEY.

Please ensure a human reviewer checks this PR before merging.

@Pigbibi Pigbibi merged commit 5d0876c into main Jul 2, 2026
8 checks passed
@Pigbibi Pigbibi deleted the fix-console-load-timeout branch July 2, 2026 17:49
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