Skip to content

[P1] Fix cohost lifecycle and add invite-link support #74

Description

@KalebCole

Problem

The CLI already advertises cohost management, but its direct-add path does not complete Partiful's cohost invitation/acceptance lifecycle.

Current implementation:

partiful cohosts add <event-id> --name "Alex Smith"
partiful cohosts add <event-id> --user-id <partiful-user-id>

--name resolves against /getContacts, then the CLI PATCHes cohostIds directly on the Firestore event document. There are no dedicated cohost tests.

Observed failure:

  1. Created an event and added an existing Partiful contact as cohost through the CLI.
  2. CLI and a raw backend read both reported that user's ID in cohostIds.
  3. The recipient received no cohost invitation.
  4. In the recipient's Partiful UI, the event still listed only the creator under Hosted by. The recipient appeared as a regular guest and could only edit their RSVP.
  5. Re-running the command returned No new co-hosts to add, leaving the CLI unable to repair the state.

This is a false-success bug. Writing cohostIds directly is not sufficient, or the CLI is missing another required invitation/acceptance step.

Partiful UI behavior to support

The mobile UI exposes cohost management in two places:

  • Event create/edit screen: Hosted byAdd cohosts
  • Event settings: HostsAdd cohost and Add Cohost Via Link

There are two distinct workflows:

  1. Add a person directly by selecting an existing Partiful contact, searched by name.
  2. Enable/copy a cohost invite link and share it through any channel, such as iMessage.

Phone number lookup should not be assumed. Partiful's contact data currently exposes names and user IDs, not phone numbers.

Proposed CLI shape

Exact naming can follow API discovery, but the capabilities should be clear:

# Existing direct-contact path, fixed to use the canonical Partiful lifecycle
partiful cohosts add <event-id> --name "Alex Smith" --dry-run

# Link lifecycle
partiful cohosts link <event-id> --dry-run
partiful cohosts link <event-id> --enable
partiful cohosts link <event-id> --disable

The Partiful CLI should return the invite URL, not own channel-specific delivery. The Partiful skill can then send it through iMessage or another approved messaging tool.

Acceptance criteria

  • Reverse-engineer the network calls/state changes behind both mobile UI workflows.
  • Replace the raw cohostIds-only write with Partiful's canonical direct-add/invite flow.
  • Direct add resolves an exact Partiful contact name safely.
  • Ambiguous partial-name matches fail closed and show candidates rather than selecting the first match.
  • An unresolved name is a command failure, not a warning followed by apparent success.
  • Re-running direct add can detect and repair a stale cohostIds-only state.
  • Add commands to inspect, enable/create, return, and disable the cohost invite link.
  • --dry-run performs read-only validation and clearly reports intended actions.
  • Output distinguishes invited/pending/accepted states if Partiful exposes them.
  • Add unit/orchestration tests for direct add, ambiguous names, unresolved names, stale state repair, link lifecycle, and no-op behavior.
  • Run a live end-to-end test with a second account: recipient gets the expected invite or link, accepts it, appears under Hosted by, and receives host controls.
  • Update schema/help output for every new or changed command.
  • Update skills/partiful/references/guests-invitations-and-cohosts.md with both workflows and approval rules.
  • Surface cohost management from the Partiful skill's event-management route as well as the guest/invitation route.
  • Update event-management docs/examples for adding cohosts during create/update.

Existing work

This issue extends that work rather than replacing the command family.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions