Skip to content

Add non-streaming fallback and unified plan-result handling for workflow planning#343

Open
zhongkaifu wants to merge 2 commits intomainfrom
codex/fix-workflow-construction-bug
Open

Add non-streaming fallback and unified plan-result handling for workflow planning#343
zhongkaifu wants to merge 2 commits intomainfrom
codex/fix-workflow-construction-bug

Conversation

@zhongkaifu
Copy link
Copy Markdown
Owner

Motivation

  • The front-end could fail to start building a workflow when the streaming planning endpoint is unavailable or errors; the UI lacked a consistent fallback and unified handling of plan results.
  • Ensure the UI always updates canvas/editor/status and surfaces logs/suggestions even when SSE streaming fails.
  • Improve resilience by falling back to the non-streaming POST /api/plan endpoint.

Description

  • Implemented a shared result handler applyPlanOutcome to centralize UI updates (update editor, canvas, status, run button state and chat messages).
  • Added requestPlanFallback which calls the non-streaming POST /api/plan endpoint, renders returned logs, and forwards results into applyPlanOutcome.
  • Updated requestPlan to keep using the streaming endpoint but catch stream errors and automatically call the fallback path; streaming and fallback now produce consistent UI state and messages.
  • All changes are in webapp/js/network.js (new functions: applyPlanOutcome, requestPlanFallback; refactor: requestPlan).

Testing

  • Automated tests: none were run for this change.
  • (No CI/test output was produced during this rollout.)

Codex Task

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant