Phase G of docs/AFFINE.md (ADR-17):
- Invite links: one per workspace (member or guest, optional end date,
optional admin approval) on a new /join page. Requests are approved
(optionally as another role) or declined from workspace settings;
join_request, join_approved and join_declined notifications reach the
inbox, phones and the email digest. Workspace admins decide, else the
organization's admins, else superadmins. Signup honours ?redirect=.
- Workspace switches: allowSharing (off makes every share link answer 404
until it is back on) and urlPreview (chat apps may show private pages'
titles). docwell-web writes title and Open Graph tags for known
link-preview bots, asking docwell-server via DOCWELL_PREVIEW_API_URL;
search engines are left out.
- Page analytics: page_views counts opens per page, person and day from
the existing visit call and share-link reads; editors see totals, a
daily chart and recent viewers in the Info panel. analytics.prune
drops rows after 400 days.
- Unused files: attachments whose id appears in no page's Yjs state,
page icon or comment (older than a day) are listed and deleted from
workspace settings.
- Migration, schema snapshot, OpenAPI, generated clients, translations
in five languages, phone inbox, compose files and user docs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>