Skip to content

feat: add delegated contact API - #343

Open
salmonumbrella wants to merge 5 commits into
maathimself:mainfrom
salmonumbrella:feat/delegated-contact-api
Open

feat: add delegated contact API#343
salmonumbrella wants to merge 5 commits into
maathimself:mainfrom
salmonumbrella:feat/delegated-contact-api

Conversation

@salmonumbrella

@salmonumbrella salmonumbrella commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds thread-stable delegated-contact persistence and a bulk backend API, including ownership validation, immutable contact snapshots, lifecycle cleanup, read-surface enrichment, and IMAP/database compensation.

This is PR 5 of the cumulative command-system roadmap. Please review the last commit only: 2434925.

Closes #342.

Changes

  • add migration 0040_gtd_delegations.sql with user/account/thread ownership and contact snapshots
  • add POST /api/gtd/delegations with deduplicated 1–100 message batches and structured partial results
  • serialize per-thread COPY operations, await shared folder syncs, and compensate only exact request-owned UIDs
  • reconcile metadata after manual, automatic, and external Delegated-label removal without deleting surviving assignments
  • expose delegation metadata through GTD sections, message lists, single-message/thread resolution, and search
  • preserve snapshots after contact deletion and reset delegation age only when the selected contact changes

Testing

  • npm run lint (backend, zero warnings)
  • Node 22: 51 files / 1,014 backend tests passed
  • focused final review suites: 212 tests passed
  • isolated Compose candidate build and health check
  • fresh PostgreSQL migration schema verification
  • authenticated endpoint smoke tests for validation and sanitized not_found bulk results

Contributor License Agreement

By submitting this pull request I confirm that:

  • I have read and agree to the Contributor License Agreement.
  • My contribution is my own original work (or I have identified any
    third-party material and confirmed it is compatible with the CLA).
  • I have the right to submit this contribution under the terms of the CLA.

@salmonumbrella
salmonumbrella force-pushed the feat/delegated-contact-api branch from 2434925 to c136ea5 Compare August 1, 2026 02:51
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.

Add delegated-contact persistence and API

1 participant