Repository navigation
Conversation
Keep the last server verdict while a new validation request is in flight, mirror canvas edits into the live DOM so rapid edits are not dropped, and gate saving on the pending verdict instead of the canvas. Render the theme preview only after validation settles and while the visual view is active, keep the source editor mounted across view switches, and warn when the run view shows a saved draft behind unsaved edits.
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
Editing a page in the visual editor could lock up and lose input:
Changes
ui/src/composables/useWorkingDocument.ts,ui/src/views/EditorView.vue,ui/src/components/VisualEditor.vue,ui/src/editor/canvas.ts): input and canvas operations are never blocked by validation; onlysave/publishwait forvalidatingto settle. A failed validation shows an inline banner and keeps the last valid render instead of rolling back the user's content.EditorView.vue): the source editor is hidden withv-showrather than unmounted, so cursor/scroll state and in-flight edits survive a trip to the canvas.useWorkingDocument.ts): once a document is already invalid, further validation requests are muted. The first failure can still raise the global login-expired dialog, so a 401 is never swallowed.RuntimePreview.vue,EditorHeader.vue): a banner explains that the run view shows the last saved draft and offers "保存并重新运行"; the header mirrors未保存 / 已保存draft state.Verification
pnpm --dir ui type-check— pass.working-document,canvas,runtime-preview,editor-view,workspace) — 71 passed.ai-create.spec.tsplaceholder title,chat-live.spec.tsfirst-run streamed questions).pnpm --dir ui build— pass (only the repo's existing chunk-size warning).Notes