feat(canvas): add targeted design revisions - #709
Draft
beruro wants to merge 3 commits into
Draft
Conversation
beruro
marked this pull request as ready for review
August 6, 2026 10:40
beruro
marked this pull request as draft
August 10, 2026 03:35
beruro
force-pushed
the
junyu/canvas-design-revisions
branch
from
August 10, 2026 04:30
232ff9c to
74805f7
Compare
beruro
force-pushed
the
junyu/canvas-design-revisions
branch
from
August 10, 2026 05:24
74805f7 to
4ea58aa
Compare
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.
Problem
Canvas follow-up edits currently require the agent to regenerate and resend the full Canvas source before useful progress appears. Even small copy changes can therefore take minutes, the UI does not preserve a clear logical relationship between the original Canvas and its revision, and narrow chat rows can overflow while revision activity is rendered.
Solution
Add a complete targeted Canvas revision lifecycle:
InputArea;revise_inline_canvaswith a required same-sessiontarget_event_id;The latest
developconflict resolution preserves the current always-available mode control in the normal composer while hiding mode/model controls only in the contextual compact Canvas composer.Potential risks
This spans the Rust tool contract, persisted event projection, streaming state, DOM selection, and shared composer presentation. Revision ancestry is bounded to 32 events; malformed or stale patches retain the last valid Canvas rather than applying partial content. Agent-step metadata is bounded to six labels of 80 characters; malformed metadata is rejected for new calls and omitted defensively for legacy replay. No schema migration or persistence-format rewrite is introduced, so rollback is a normal revert of the three feature commits.
The remaining review gap is rendered desktop verification: the isolated browser cannot initialize the required Tauri sidecar, so a current Tauri recording covering selection, compact submission, streaming progress, completion navigation, failure, and cancellation is still required. The PR remains Draft for that reason.
Audit
ResizeObserver, andrequestAnimationFrame; cleanup removes listeners, disconnects the observer, and cancels the frame.Verification
Completed on the published head
4ea58aa0e, rebased ontodevelopat9a2d6f6cf:test_files=(${(f)"$(git diff --name-only origin/develop...HEAD | rg '(test|spec)\\.(ts|tsx)$')"}); PATH=../../../node_modules/.bin:$PATH vitest run "${test_files[@]}"— passed, 24 files / 117 tests.cargo test -p core_types tool_names --lib— passed, 2/2 tests.cargo test -p agent_core ui_metadata --lib— passed, 13/13 tests.PATH=../../../node_modules/.bin:$PATH tsc --noEmit— passed after the current-base rebase.git diff --checkand conflict-marker scan — passed.Not completed:
developbaseline fix in fix(history): satisfy imported window clippy #752.