A nested workflow's file, edited unsaved, previews in the views showing it - #65
Merged
Merged
Conversation
…ng it Navigating in place, an editor can show a nested workflow defined in another file. Most of editing such a view already held: undo and redo save whatever file they change, and a save or an on-disk change refreshes every editor, which since in-place navigation reloads the view shown. Only live preview did not reach it -- it fired for an editor's own document alone -- so typing in the nested file's text editor changed nothing until a save. Now every editor showing that file is previewed with that file's text. The chat's turn context also says the diagram's tools act on the view's file, which is what the user sees. The proposal's section on editing nested views is corrected: an earlier draft said undo left such a file unsaved. Phase 3 of docs/proposals/single-editor-hierarchy.md. Claude-Session: https://claude.ai/code/session_015VK7fH1c4aKbexnq2QcuKU
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.
Phase 3 of
docs/proposals/single-editor-hierarchy.md(after #64).Navigating in place, an editor can show a nested workflow defined in another file. Checking what editing such a view needs showed that most of it already held:
ReversibleWorkspaceEditCommand.persist), so a nested file is never left dirty by the diagram. The proposal's earlier claim that it was left unsaved was wrong; that section is corrected.What was missing: live preview. It fired only for an editor's own document, so typing in a nested file's text editor changed nothing in the view showing it until you saved.
previewInViewsShowingnow refreshes every editor whose shown file is the edited one, with that file's text.dispatchModelRefreshtakescontentUriso it keeps content that belongs to the shown file, and still reloads from disk otherwise.Chat: the turn context now also says the diagram's tools act on the view's file. The proposal's GLSP-MCP "root/view split" is settled that way: the tools act on what the user sees, and the agent is told which file that is.
Tests: live preview of the shown file, no preview for an editor not showing it, an on-disk change reloading the nested view at its trail, and the chat text. All workspaces pass, with neutrality 5/5 and typecheck 5/5.
https://claude.ai/code/session_015VK7fH1c4aKbexnq2QcuKU