Skip to content

W5: "Shared with me" documents (needs a backend route — A11) #54

Open

Description

@Adron

Part of #44 · Lane W5 — documents · Size M · blocked on a backend route (ask A11)

Parity evidence — and a correction

work-consolidation.md records this as "not a gap — the web lacks it too". That is wrong.
The web ships it, server-rendered, which is why an endpoint diff missed it:

  • app/documents/layout.tsx:21-29 → getSharedDocuments(user.id)
  • components/documents/DocumentsWorkspace.tsx:44 → <SharedDocumentsList documents={…} />
  • components/documents/SharedDocumentsList.tsx — a "Shared with me" panel with the owner and
    the viewer's role (Viewer / Editor / Admin).

iOS today

Views/DocumentsView.swift shows only documents the user owns. A document shared to an iOS
user is reachable only if someone hands them a share-link token. Lists already got their equivalent
(GET /api/lists/watching → "Shared with me" section, #40); documents have no equivalent route.

Blocking backend ask (A11)

Add GET /api/documents/shared-with-me (or GET /api/documents?scope=shared) returning the same
shape getSharedDocuments() already produces — { id, title, role, updatedAt, isPublic, owner } —
authorized with getCurrentUserOrSyncToken so Bearer clients can call it.

Tracked as A11 in #66. Do not work around it by walking every document's
collaborator list.

Build this (once the route exists)

  • sharedDocuments() in APIClient+SharedDocuments.swift.
  • A Shared with me section in DocumentsView, kept out of the owned-documents folder
    tree
    (same rule as AppDataStore.watchedLists — the tree nests within the owner's
    hierarchy, so foreign documents must not be inserted into it).
  • Row shows owner handle + role badge; tapping opens the document read-only or editable
    according to role.
  • Editing gates on role (watcher = read-only, collaborator/manager = editable) and the
    offline sync outbox must not queue writes for read-only documents.

Acceptance criteria

  • A document shared to the account appears under "Shared with me" without a share link.
  • Role is respected in the editor; read-only documents cannot enter the sync outbox.
  • Owned-document folder tree is unchanged.
  • Unit tests for the new call + the tree-exclusion rule.

Files: new Services/APIClient+SharedDocuments.swift, Services/AppDataStore.swift,
Views/DocumentsView.swift.

Activity

  1. added
    enhancementNew feature or request
    parityWeb feature-parity work
    backend-askNeeds a change in the interlinedlist backend
    on Sep 7, 2026
  2. Adron commented on Sep 15, 2026

    @Adron
    MemberAuthor

    Still blocked on A11 — re-verified 2026-09-15

    Checked the backend working tree today:

    • No GET /api/documents/shared-with-me route. app/api/documents/shared is shared/[token]
      (share-link resolution), not a collaborator-scoped listing.
    • app/api/documents/route.ts has no scope parameter handling.
    • getSharedDocuments (lib/documents/queries.ts:142) still has exactly one caller,
      app/documents/layout.tsx:22 — server-rendered, unreachable from a Bearer client.

    The build plan in this issue remains correct and can start the moment A11 ships. Leaving open and
    blocked rather than working around it by walking every document's collaborator list, per the
    issue's own instruction. Tracked in #66.

  3. Adron commented on Sep 16, 2026

    @Adron
    MemberAuthor

    Still blocked — no change since the 2026-09-15 check

    Re-verified against ~/Codez/interlinedlist today: still no GET /api/documents/shared-with-me,
    still no ?scope=shared handling in app/api/documents/route.ts, and getSharedDocuments
    (lib/documents/queries.ts:142) still has exactly one caller — app/documents/layout.tsx:22,
    server-rendered and unreachable from a Bearer client.

    The build plan in the description remains correct and can start the day A11 ships. Deliberately not
    working around it by walking every document's collaborator list, per the issue's own instruction.

    Tracked as A11 in #66.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend-askNeeds a change in the interlinedlist backendenhancementNew feature or requestparityWeb feature-parity workws:documentsW5 — documents

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions