feat: editor remote read + compose/edit — closes #62 (part 3) #71
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/v7-editor-remote-edit"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Final part of #62 — completes the editor side and the v7 round-trip.
What it does
The editor's instance now acts as a client of the host project:
GET /api/remote-projects/:id/entries— signed-fetches the host'sGET /ap/projects/:id(part 1) and returns its entries with their AP ids.POST .../entries— delivers a signedCreate(Note,context= the host project URL) to the host owner's inbox.PUT .../entries— delivers a signedUpdatetargeting an entry's AP id.RemoteProjectDetailPage— read the host's entries, compose new ones, edit existing ones; "Shared with me" items link into it.End-to-end: invited editor → reads host entries → creates/edits → host applies non-conflicting writes automatically and queues conflicts for the owner (#11). Create and update across instances — the milestone's "done when."
🔒 SSRF guard (flagged by the commit security review)
host_project_url/host_actor_urlcome from a remote actor'sInvite, andisSafeUrlonly checks the scheme — a crafted Invite could point the server's fetch at an internal address. So every egress (the collection fetch, the owner-actor fetch, and the inbox it advertises) is now restricted to origins that are enabledfederated_instances— an admin-curated allowlist, symmetric with #9 (the host requires the editor's instance to be federated). Non-federated host →403.Verification (dev server)
remoteEditorEndpoints.test.ts— 6 tests: unknown invitation →404; federated-but-unreachable host →502(auth + SSRF guard passed, network attempted); empty create →400; unresolvable inbox →502; update missingentry_ap_id→400; non-federated host →403. apitscclean; app build clean.The cross-instance fetch/delivery itself runs over real HTTP, so the live round-trip is validated with two instances; the host side it targets is the same code the host-side tests exercise.
Closes #62. With #9/#10/#11/#12/#61 already merged, this completes the v7.0.0 milestone.
🤖 Generated with Claude Code