Repository navigation
[fix] canvas: only finish deliveries this session watched start - #417
Merged
Merged
Conversation
Review findings: editing a generated text node clears its backend asset on every keystroke, which made the node look like it was still waiting for its result and covered the editor with the busy overlay. Undo or a version switch also made an old job's result count as "arriving". A node now waits only while it still shows an older backend asset, and only for jobs this session saw running. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Requiring a displayed backend asset excluded locally edited text, but also excluded a first generation into an empty node, which again flashed an empty frame between the job finishing and the result loading. An empty node (no media, no text) now waits too; a node with local text still does not. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
修复 #416 合并后在 review 中发现的回归:编辑已生成的文本节点时,节点会被误判为"收尾中",编辑器被忙碌遮罩盖住。
问题。 #416 的判断条件是"后端已交付的结果素材 ≠ 画布节点当前的
backendAssetId",对snapshot.jobs里所有历史任务都生效,这带来两个问题:update-node每次输入都会清空backendAssetId(model.ts)。节点因此一直被判定为"收尾中":GeneratingOverlay的模糊遮罩盖住编辑器;prepareGeneration和替换素材都被拦下;改动。
jobActivities:只有节点当前确实显示着另一份后端素材时(backendAssetId不为空且不等于交付的素材),才算在等新结果。节点没有后端素材(新建,或本地编辑过的文本)时不算。useWorkspaceRuntime:只对本会话中观察到处于运行状态的任务启用"交付中"判断。历史任务、撤销或切换版本得到的结果都不会触发;如果画布刷新失败,可能卡住的也只有刚完成的那个任务。backendAssetId后节点不处于活动状态;空节点首次生成时处于finishing。Linked issue
Labels
Test plan
本地基于
main(0b83f97f,已包含 #416),Node.js 24。node --test tests/*.test.tstsc --noEmitpython -m pre_commit run --from-ref upstream/main --to-ref HEADEvidence that it works
在本地部署上用无头 Chromium 验证(每 50ms 记录节点
<img>和忙碌遮罩):首次生成:遮罩一直保持到图片出现(1.74 s),中间没有空框。第 1 个提交时这里有 0.11 s 的空框。
重新生成:遮罩一直保持到新图出现(2.0 s),没有旧图闪回。
文本节点:在同一次会话里生成后(4 s),双击编辑并输入 5 个字符,期间遮罩一次都没有出现。
以上为无头浏览器的逐帧记录,未附截图。
Provider verification
Bilingual UI
🤖 Generated with Claude Code