Trigger issue stop button fix - #410
Merged
Merged
Conversation
their settlement before "Run stopped" (wait_for shim, executor threads, action manager re-raise). Adds regression tests; removes debug prints.
ahmad-ajmal
marked this pull request as ready for review
August 7, 2026 09:34
ahmad-ajmal
added a commit
that referenced
this pull request
Aug 7, 2026
## Sync V1.4.1 → dev Brings dev up to date with the V1.4.1 line (55 commits). The headline changes: ### Living UI platform - **Trigger plane (app → agent communication)**: Living UIs declare triggers in `triggers.json`; fires land in an in-app `agent_requests` queue, pass capability/consent/era gates at the host, and the agent claims, acts, and posts the result back to the app and chat. Includes gate enforcement (derived `capabilities.triggers`, no self-answering hooks), kit helpers (`fireAgentTrigger`/`useAgentRequest`), and `lui trigger`/`lui requests` CLI commands. - **Rename `living-ui-v2` → `living-ui`**: directory, runner module/class, log tags, CI workflow, and all prose — the manifest's `livingUIVersion: 2` protocol field is unchanged. - Verifier hardening: turn budgets, early-end guard, evidence rules (incl. `callLLM` for AI features), `browser_drag`, spec supersession (`~~strikethrough~~` in `## Changes`), throttled-LLM classification. ### Run stop (#410) Cancellation now genuinely reaches in-flight actions and settlement waits for them — no more output landing after "Run stopped." (compat `wait_for` shim, executor thread wait, action-manager re-raise; 5 regression tests). ### UI Dashboard revamp (grid layout, widget sizing, token-usage fixes), mobile chat fixes, tooltips. **Note:** run `npm install` in `app/ui_layer/browser/frontend` after pulling — the dashboard adds `react-grid-layout`. ### Conflict resolution The only conflicted file was `app/living_ui/manager.py`: dev's PR #378 (guard `_save_projects()` call sites) was written against the old two-process Living UI architecture that V1.4.1 has since replaced. Resolution: V1.4.1's architecture wins wholesale, with PR #378's intent ported onto it — persist failures in the watchdog paths now log instead of breaking restart/escalation. The launch-path guards weren't ported because the new action layer already surfaces persist failures as honest action errors. Dropped `project.backend_process` (attribute no longer exists).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The actions taken after pressing stop still result in some actions taking place. This may be a trigger issue, so this PR is about figuring out how to fix that. Additionally, the run stopped system message should be displayed after all actions have been terminated.
This PR will aim to:
UPDATE:
The initial trigger hypothesis wasn't the real problem. The termination process, was handling all queued triggers, but the ones currently executing were still going ahead. This is why it would result in additional actions taken after the "ended turn" in logs.
The race between pressing stop and executing current actions means that there will most likely be one currently executing which can't be terminated in the normal way.
This PR will NOW aim to:
UPDATE TO THE UPDATE: