feat: local-first editor#615
Draft
NagariaHussain wants to merge 6 commits into
Draft
Conversation
Introduce draftWorkspace Pinia store that owns optimistic tree, page draft state, and a per-mutation queue backed by the existing CR RPCs. Sidebar create/rename/delete/reorder, content save, and metadata edits all flow through the store with immediate local feedback; submit/merge are gated on pending/failed mutations. See specs/local_first_editor_migration_step_1.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Move "View changes" and "Archive" into a three-dot dropdown so the header only surfaces the primary actions (Merge, Submit for Review). Soften the Draft state banner from blue to gray. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drop the spinning icon and reuse the frappe-ui Badge for the sync state pill. Less visual noise next to the header actions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add three Playwright specs against the local-first draft workspace: delayed create_cr_page, failed update_cr_page, and delayed reorder. A new mock helper wraps page.route() to inject latency and 500s on specific Frappe methods, and SpaceDetails exposes the draft store on window for deterministic optimistic-action testing. Fix a real bug surfaced while writing these: the sidebar's root_node fallback to space.doc.root_group passes a Frappe document name where the store expects a doc_key, silently no-oping the optimistic insert when the dialog opens before hydration completes. Drop the wrong fallback and let createNode default to rootKey when empty. Cleanup: remove leftover console.log calls from ordering and public-pages specs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The .or() locator tripped Playwright strict-mode when both the toolbar "New Page" button and the empty-state "Create First Page" button are visible simultaneously, which is the normal state on an empty space since the local-first migration. Add .first() so either match passes. Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Frontend draft workspace store that makes sidebar edits, reorder, and content saves feel local-first while still persisting through the existing CR RPCs. Spec:
specs/local_first_editor_migration_step_1.md.🤖 Generated with Claude Code