Skip to content

fix: make stop action immediate and reliable#144

Open
JOORVIS wants to merge 3 commits intomainfrom
feature/issue-94-stop-action-immediate-reliable
Open

fix: make stop action immediate and reliable#144
JOORVIS wants to merge 3 commits intomainfrom
feature/issue-94-stop-action-immediate-reliable

Conversation

@JOORVIS
Copy link
Collaborator

@JOORVIS JOORVIS commented Feb 23, 2026

Summary

  • Abort in-flight run and poll requests in the chat editor when users click Stop so UI cancellation is immediate and late chunks are ignored.
  • Trigger best-effort runtime container termination from the cancel endpoint and route it through WorkspaceToolingServiceInterface to preserve architecture boundaries.
  • Harden backend cancellation handling and add frontend integration tests for stop-during-polling and stop-before-session-id scenarios.

Test plan

  • mise run tests:frontend
  • mise run tests
  • mise run npm exec -- eslint src/ChatBasedContentEditor/Presentation/Resources/assets/controllers/chat_based_content_editor_controller.ts tests/frontend/integration/ChatBasedContentEditor/chat_editor_controller.test.ts
  • mise run quality (fails in this workspace due untracked .productbuilder-runtime files being linted; repo changes themselves pass targeted lint/tests above)

Closes #94

Abort in-flight run/poll requests in the editor UI and trigger best-effort runtime container termination on cancel so Stop takes effect immediately and ignores late output.
@manuelkiessling
Copy link
Member

looks like quality checks are failing.

Mark the runtime cancellation check as impure so PHPStan does not collapse repeated checks and incorrectly fail the quality pipeline for the stop-action fix.
@manuelkiessling
Copy link
Member

Add technical documentation.

Clarify the two-phase cancellation flow so Stop semantics are explicit and operationally reliable, including immediate UI hard-stop handling and backend interruption safeguards.
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.

Stop action does not work properly

2 participants