Conversation
…sionRestore Replace throwing stubs with real inject-based implementations for useAwareness, useEditor, useYText, and useCurrentUser. Provide readOnlyCompartment from Canvas.vue so useEditor can toggle read-only state via the same Compartment that EditorCodeMirror uses. Wire VersionPreviewModal to call useVersionRestore().restoreVersion() instead of raw window.__cmView.dispatch(), gaining concurrent editor detection, read-only locking, awareness broadcasting, and atomic Y.js transactions with origin tagging. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for rsm-studio-frontend canceled.
|
✅ Deploy Preview for rsm-studio-site canceled.
|
useVersionRestore called useYText/useAwareness/useEditor at setup time, which threw when injected shallowRefs were null (editor not yet ready). This crashed VersionPreviewModal on mount, causing 10 E2E failures. Now uses lazy inject: inject() at setup (Vue requirement), .value access deferred to restoreVersion(). Modal mounts safely; restore only needs the editor when actually triggered. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Raw fetch('/api/...') hit Vite's SPA fallback in CI/Docker, returning
index.html instead of version content. Now uses the injected axios api
client (same as VersionPreviewModal) which has the correct baseURL.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Needs human reviewWhat changed: Version restore now goes through Review checklist:
What to look for:
|
Needs human reviewWhat changed: Version restore now goes through Review checklist:
What to look for:
|
Preview DeployFrontend: https://pr-368--rsm-studio-frontend.netlify.app Test user: This preview will be destroyed when the PR is closed. |
Needs human reviewWhat changed: Version restore now goes through Y.js transactions via Review checklist:
What to look for:
|
Summary
useAwareness,useEditor,useYText, anduseCurrentUsercomposables — previously stubs that threw errors, now real inject-based implementationsreadOnlyCompartmentfrom Canvas.vue → EditorCodeMirror.vue souseEditorcan toggle read-only via the same CompartmentVersionPreviewModal.vueto calluseVersionRestore().restoreVersion()instead of rawwindow.__cmView.dispatch(), gaining concurrent editor detection, read-only locking, awareness broadcasting, and atomic Y.js transactionsTest plan
🤖 Generated with Claude Code