Skip to content

feat(editor): activate git-backed live editing in ProjectEditor (wire dormant ProjectRepoAdapter) #96

Description

@pparage

Problem

The full git-backed editing stack is built and unit-tested but not wired into the editor. ProjectRepoAdapter (src/services/projectRepo/adapter.ts) + useProjectRepo (src/composables/useProjectRepo.ts) implement draft-branch autosave, .lock + SharedWorker heartbeat, orphaned-draft recovery, and promote-to-main with PR fallback — all dormant.

ProjectEditor.vue imports only useProjectGitSync (one-shot manual save). Its debounced autosave writes only to localStorage (src/views/ProjectEditor.vue:459-512; see the "if/when backed by a ProjectRepoAdapter" comments at ~461 and ~925). acquireLock / heartbeat / checkLockOwnership have no live callers (only the interface + composable reference them).

Work (sub-tasks)

  • Instantiate useProjectRepo; acquire lock on mount / release on unmount (adapter.ts:211-234) — M
  • Route the debounced autosave through adapter.autosave() (build ProjectState via buildProjectState() in src/overlay/projectState.ts) — M
  • Orphaned-draft modal for multi-tab collision — consume onOrphanedDraft / status === 'lock-lost' (adapter.ts:245-264) — L
  • Lock-status badge in the editor header — S
  • PR-URL fallback modal on save conflict (today it is only a toast — ProjectEditor.vue:515-547) — overlaps feat(deploy): dirty-state gate + save-and-deploy with PR-URL fallback modal #63M
  • Dirty-state gate (isDirty) — overlaps feat(deploy): dirty-state gate + save-and-deploy with PR-URL fallback modal #63S
  • overlay.json editing: load state.overlay from the adapter into the existing VariablesTab (currently reads empty project.overlay) — S

Dependencies

Relations

Metadata

Metadata

Assignees

No one assigned

    Labels

    featNew feature or requesttrack_axis-02Operational end-user interfaces

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions