Snap editor records one Undo step per keystroke and per slider tick
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start with the change() and undo() logic in ImageWorkspaceEditing.swift (around lines 103-118 and 110), then the updateSelected calls for the caption and sliders in SnapEditorView.swift (lines 94, 103, 109). Compare with the canvas drag commit in ImageWorkspaceCanvas.swift (lines 212-213). Done means the acceptance cases pass under --check-image-workspace: 150 keystrokes make one undo step, and undo order is text, mark, then crop.
由索引模型根据 Issue 内容生成。
描述
Outcome: typing a caption or dragging Text size or Line width makes one Undo step, so earlier crops and marks stay undoable.
Evidence (main edc15df)
- The text binding and the sliders call
updateSelectedon every change (SnapEditorView.swift:94, :103, :109). change()pushes every edit and trims to 100 entries (ImageWorkspaceEditing.swift:103-118). A caption of about 100 characters therefore drops the crop from history.undo()clears the selection (:110), which closes the inspector.- Canvas drags already commit once (ImageWorkspaceCanvas.swift:212-213).
- docs/snap.md:22 promises Undo for crop, text and marks.
Change
- Add a coalescing key (mark id plus property). Consecutive edits with the same key replace the top entry.
select,undoandredoreset the key.- After undo or redo, reselect the mark if it still exists.
Acceptance
In --check-image-workspace:
- 150 keystrokes make one step.
- Undo order is text, then the mark, then the crop.
- Redo restores.
- A fontSize run is one step.
- A selection change or an unkeyed edit splits runs.
- An edit after undo starts a new step.
Value before scope
- Outcome: Undo works on the capture-to-deck path. Evidence: the traced stack.
- Simpler route: none.
- Owner: ImageWorkspaceEditing.
- Complexity: one key.
- Verified by: source checks.
Grammar: Quality.
Refs #154
Build-ready record from the overnight lead session of 15 Oct 2026, verified against main edc15df by an independent skeptic per item. Implementation follows on a claude/* branch; this issue closes only after native acceptance.
- 主要语言
- Swift
- 星标
- 0
- 派生
- 1
- 平均合并
- 18 小时 19 分钟
- 30 天内合并 PR
- 114
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Ship-Work/workbench 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
documentation good first issue help wanted
难度 2/5 半天 新手友好度 74/100
Ship-Work/workbench#29 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 72/100
维护者通常 1 天内回复
查看 Ship-Work/workbench 的全部 Issue
相似的 Issue
-
area: agents area: layout S3: minor
难度 2/5 1-3 小时 新手友好度 62/100
manaflow-ai/cmux#34277 · 1 条评论 ·
维护者通常 1 天内回复
-
priority: medium
难度 2/5 1-3 小时 新手友好度 79/100
thunderbird/thunderbird-ios#599 ·
维护者通常 1 天内回复
-
bug core p3
难度 2/5 1-3 小时 新手友好度 72/100
RunanywhereAI/runanywhere-sdks#1258 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
altic-dev/FluidVoice#1284 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复