Skip to content

OBJ-95 — Share dialog - #46

Merged
objectgyan merged 1 commit into
mainfrom
objectgyan/obj-95-m86-share-dialog-consumes-m9b
May 17, 2026
Merged

objectgyan merged 1 commit into
mainfrom
objectgyan/obj-95-m86-share-dialog-consumes-m9b

Conversation

@objectgyan

Copy link
Copy Markdown
Owner

Summary

  • Add ShareDialog component: invite by user ID with role select (viewer/commenter/editor), generate tokenized 24h links, list active grants/tokens, revoke each
  • Add share API functions to ui/src/api.ts (fetchShares, grantShare, revokeShare, createShareToken, revokeShareToken)
  • Add Share button to DocumentPage.tsx that opens the dialog
  • Playwright tests: invite→assert in list→revoke→assert removed; token URL displayed→revoke→removed

Test plan

  • pnpm lint — exit 0
  • pnpm typecheck — exit 0
  • pnpm build — exit 0
  • 4/4 Playwright tests pass (share-dialog.spec.ts)
  • scripts/validate-obj-95.ps1 — exit 0
  • DB: document_shares row created with role=editor, removed after revoke
  • DB: share_tokens is_revoked=true after token revoke
  • GET /api/shared/{token} returns 200 for valid token, 410 for revoked

@linear-code

linear-code Bot commented May 17, 2026 •

Copy link
Copy Markdown
OBJ-95 M8.6 — Share dialog (consumes M9b)

Milestone: M8 · Wave: 3 (depends on M9b)

Summary

Share dialog UI: invite a user by ID/email with a role (viewer/commenter/editor) or generate a tokenized share link with expiry. Consumes M9b endpoints.

Acceptance

  • Invite form posts to share endpoint
  • Link generator shows the URL + expiry
  • Revoke action works

Validation

  • DB check: after invite from UI, document_shares row reflects role + grantee
  • Live API check: Playwright UI test invites a user, asserts share appears in list, revokes, asserts removal
  • Script: scripts/validate-obj-NNN.ps1

Branch / PR

Branch from main; target main. No trailers/footer.

Review in Linear

@objectgyan
objectgyan merged commit db5a1a0 into main May 17, 2026
3 of 5 checks passed
objectgyan added a commit that referenced this pull request May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant