fix(agent): stabilize design execution - #202
Draft
d8dzmf5mfn wants to merge 3 commits into
Draft
Conversation
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.
Summary
Stabilizes design execution across intent routing, the OpenCode completion bridge, background canvas updates, and terminal failure reporting. Non-requests no longer start a design run, incomplete or tool-using text completions fail safely, generated edits stay bound to the page where their run started, and failed sections now expose their exact diagnostic instead of a generic "Needs attention" state.
Changes
User impact
A failed section now reads as a location plus a cause, for example:
Customer Table — Reason: parent_id=dashboard was not foundUsers no longer have to expand a collapsed row or infer the problem from "Needs attention".
Scope
The standalone retry-context change was removed from this PR because it overlaps with #180 by @adrotech. This PR does not resubmit that work.
Only Rust source and tests are included. No locally built app or release artifact is part of the PR.
Root Cause
The OpenCode adapter trusted partial SSE text while permitting coding tools, and background design commands targeted whichever page happened to be active when they arrived. Classifier failures also defaulted to a new design.
For diagnostics, live progress initially stored the concrete subtask error, but terminal summary handling overwrote it with a generic localized label. Failure cards also defaulted to collapsed after the activity stopped streaming, hiding any detail that survived.
These paths could produce truncated design output, mutate the wrong page, or leave users with no actionable explanation of where and why a section failed.
Related PRs
Type
feat— New featurefix— Bug fixrefactor— Code refactoring (no behavior change)perf— Performance improvementdocs— Documentationtest— Testschore— Build / tooling / dependenciesValidation
cargo test -p op-host-services chat_intent— 59 passed.cargo test -p op-host-desktop— 412 passed, 5 ignored.cargo test -p op-editor-ui --lib— 1,087 passed.cargo test -p op-editor-core --lib— 861 passed.cargo test -p op-i18n --lib— 10 passed.unnecessary_min_or_maxwarning in an unchanged property-panel file.rustfmt --edition 2021 --check <all changed Rust files>— passed.git diff --check— passed.The checkout is an intentionally nested Git worktree, so the repository-wide pre-commit
cargo fmt --allcommand misidentifies an excluded vendored crate's outer workspace. The equivalent per-file Rustfmt check above passes. Full-workspace Clippy also reaches a pre-existing Rust 1.96while_let_loopwarning inop-figma, outside this patch.Checklist