Repository navigation
feat(editor,editormcp): add viewport sketch layer, reading card, and scene_edit hold gate - #1214
Merged
Merged
Conversation
houko
force-pushed
the
feat/editor-viewport-sketch-agent-1025
branch
from
November 26, 2026 03:20
df4e0ae to
d0fc00d
Compare
houko
force-pushed
the
feat/editor-viewport-sketch-agent-1025
branch
3 times, most recently
from
November 26, 2026 11:16
2db66f6 to
679ec47
Compare
houko
force-pushed
the
feat/editor-viewport-sketch-agent-1025
branch
from
November 26, 2026 12:05
679ec47 to
9413d1e
Compare
houko
force-pushed
the
feat/editor-viewport-sketch-agent-1025
branch
from
November 26, 2026 12:21
9413d1e to
7ed11bf
Compare
houko
force-pushed
the
feat/editor-viewport-sketch-agent-1025
branch
from
November 26, 2026 12:59
7ed11bf to
f4aeb89
Compare
houko
force-pushed
the
feat/editor-viewport-sketch-agent-1025
branch
2 times, most recently
from
November 26, 2026 18:00
8bab98b to
e6c6a02
Compare
…scene_edit hold gate Add a session-only 2D viewport sketch layer in scene coordinates (Pen, Arrow, Box, Text) with sequential numbered badges, optional labels, floating sketch bar, Scene Tree row, keyboard scope (ScopeSketch) without adding extra buttons to the compact 2D editor-toolbar, structured + PNG agent request payload, MCP tools (sketch_read, sketch_reading), a scene_edit confirmation hold gate, and post-edit review Sketch overlay with Keep/Revert behavior. Fixes #1025
…, panel close, Spec theme, and tests
…w guards, label spaces, and modal/drag safety
…sketch_read and sketch_reading
…ngs, FirstRun, and OpenAgentTask
houko
force-pushed
the
feat/editor-viewport-sketch-agent-1025
branch
from
November 26, 2026 18:00
e6c6a02 to
833512a
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.
Fixes #1025
Summary
Implements the session-only 2D viewport sketch layer for agent collaboration (
docs/design/editor/Sketch.dc.html, styled strictly withdocs/design/editor/Spec.dc.htmltokens):packages/game/editor/sketch.go,sketch_png.go,sketch_ui.go):CanvasToWorld/WorldToCanvas): Pen (polyline), Arrow (start → end), Box (rect), and Text (point + label).1,2,3, …) and optional text labels (e.g."3 spikes","platform, back and forth","locked until the lever").Editor.sketchsynced persceneTab) with an isolated mark undo stack — never modifiesSceneDoc, never written into*.scene.yaml, never pollutes scene undoHistory."N marks not saved", Clear, and Done;Escexits sketch mode while keeping marks until sent, cleared, or kept; Scene TreeSKETCH LAYERrow; live status bar scene coordinates and active sketch tool.ScopeSketchkeyboard scope (Dtoggles Sketch fromScopeViewport2D;P/A/B/Tswitch tools;Iadds a mark at the cursor;Htoggles visibility;⌘Zundoes last mark; plusView > Sketchmenu and registered shortcuts for every sketch action) — keeping the 2Deditor-toolbarcompact with zero added buttons.SendSketch/OnSendSketch):"Sketch · N marks"context chip (toggling a"Sent with this request"scene-coordinate preview).RenderSketchViewportPNG).scene_editconfirmation hold gate (packages/game/editor/editormcp/sketch.go):sketch_readandsketch_readingMCP tools (updated tool list conformance tests inserver_test.go,proxy_test.go,example_test.go).SketchHoldActive()) when a sketch is sent;scene_editand other mutating scene MCP tools (tile_paint,tile_autotile,tile_erase,object_paste_yaml,object_duplicate,object_group,object_move_under,object_set_field) refuse cleanly with a structured*EditErroruntil the user clicks Go ahead (ApproveSketchReading) or replies in words (ReplyToSketchReading).CorrectSketchMark, or clicking a numbered reading item) reopens sketch mode with that exact mark selected while keeping the hold active.TileReview) provides a Sketch overlay toggle laying the faint dotted sketch over the result.docs/en/editor.md,docs/zh/editor.md,docs/en/mcp.md,docs/zh/mcp.mdwith EN/ZH parity.changelog.d/editor-viewport-sketch-agent.mdand.agents/notes/implemented/feature/2026-11-26-editor-viewport-sketch-agent.md.Verification
env -u GOROOT go tool nsgo check(default host target &-target ios) on./editor,./editor/editormcp,./editor/editorcmd— all passed.TMPDIR=/tmp env -u GOROOT go tool nsgo test ./editor(sketch zoom accuracy, keyboard path, reading card, hold gate, Correct a mark, review overlay Keep/Revert, plus toolbar compactness, menu bar, locale completeness, file browser tabs, lighting parallax, shortcuts, overlays, tile review, and Spec theme tests — 33/33 passed).TMPDIR=/tmp env -u GOROOT go tool nsgo test ./editor/editormcp(includingTestSketchMCPReadReadingHoldGateAndKeepRevertand tool list tests — 39/39 passed).TMPDIR=/tmp env -u GOROOT go tool nsgo test -target macos -screenshots tmp-sketch-shots -run '^TestSketchMacOSScreenshots$' ./editor/editorcmd(sketch-active.png,sketch-reading.png,sketch-review.png), visually inspected besideSketch.dc.htmlandSpec.dc.html, and temp PNGs removed before commit.bun run verify-notesandenv -u GOROOT go run ./tools/changelog check— both passed.