Skip to content

Prevent running workflow during planning and when workflow is empty#344

Open
zhongkaifu wants to merge 1 commit into
mainfrom
codex/investigate-workflow-triggering-issue
Open

Prevent running workflow during planning and when workflow is empty#344
zhongkaifu wants to merge 1 commit into
mainfrom
codex/investigate-workflow-triggering-issue

Conversation

@zhongkaifu
Copy link
Copy Markdown
Owner

Motivation

  • Avoid situations where the UI attempts to execute a workflow while the planner is still building it.
  • Provide clearer user feedback when an execution is blocked (either because planning is in progress or because the workflow is empty).
  • Make the front-end more robust so users can't accidentally trigger /api/run/stream while planning is underway.

Description

  • Added a planningInProgress flag in webapp/js/network.js to track when requestPlan is running.
  • Set planningInProgress = true at the start of requestPlan and clear it in a finally block so it is always reset.
  • Updated requestRun to guard against running while planning (planningInProgress) and to refuse execution if the current workflow is empty (isEmptyWorkflow(currentWorkflow)).
  • When execution is blocked, the UI now logs a message and posts a chat message to the user explaining why the run was not started.
  • Modified file: webapp/js/network.js.

Testing

  • No automated tests were executed for this change.
  • Manual verification: basic smoke checks in the browser were intended but not run as part of this PR.

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