Skip to content

[P2] Comments and activity feed #20

Open

Description

@KalebCole

Priority: P2 (Medium)

Post comments, including image comments, and read event activity.

Use cases

  • Post text or images to an event discussion
  • Reply to an existing comment
  • Read comments and RSVP activity
  • Use image comments from agent workflows without opening the Partiful web app

Proposed commands

# Read activity/comments
partiful activity <eventId>
partiful activity <eventId> --limit 20

# Post text
partiful comment <eventId> "Excited for tomorrow!"

# Post one or more images, with optional text
partiful comment <eventId> --image ./photo.jpg
partiful comment <eventId> "Setup is ready" --image ./photo.jpg
partiful comment <eventId> --image ./one.jpg --image ./two.png

# Reply
partiful comment <eventId> --reply <commentId> "Me too!"

Command naming should be reconciled with the repo's plural command groups during implementation. A comments list/create/delete group may fit better than the singular examples above.

Initial API investigation (2026-08-04)

Verified against the current Partiful web bundle and the authenticated API.

Callable endpoints

  • getEventComments with { eventId }
  • createComment with { id?, eventId, message?, image?, media?, replyTo?, timezone, mentions? }
  • deleteComment with { eventId, commentId }
  • updateCommentReaction with { eventId, commentId, reaction }

getEventComments succeeded against real events. Its response is { comments: [...] }. Observed comment fields include:

id, message, timezone, createdAt, publicShortUrl, eventId,
userId, guestId?, replyTo?, image?, photoIds?, reactionMap?

The sampled account had 10 readable comments across 29 events. Two comments referenced uploaded photos through photoIds, including one with five photos. This confirms that comments support multiple uploaded images. Replies use a typed replyTo object; observed type: rsvp.

Image upload flow

  1. Upload each file with multipart POST /uploadPhoto using query params:
    • uploadType=event_photo
    • eventId=<eventId>
  2. Read uploadData from the response.
  3. Convert each upload to a comment media entry:
{
  "source": "upload",
  "type": "image",
  "url": "<uploadData.url>",
  "upload": "<the full uploadData object>"
}
  1. Call createComment with the resulting media array and optional message.

Current web-client image constraints:

  • MIME types: JPEG, GIF, PNG, HEIC, HEIF
  • Maximum image size: 30 MB per file
  • Comment text: 400 characters
  • Event setting allowGuestPhotoUpload controls guest uploads; hosts/admins have separate permission paths

The same activity editor also supports videos, but video upload uses a different signed-upload flow. Video comments are out of scope for the first image-comment implementation.

Existing code to reuse

  • src/lib/upload.ts already handles multipart /uploadPhoto requests and local/URL image inputs.
  • src/lib/http.ts already handles callable auth and envelopes.
  • src/lib/api/endpoints.ts is the place for typed request/response contracts.

The existing upload helper currently targets event_poster. It should accept an upload context/type so image comments can use event_photo without duplicating multipart logic.

Implementation notes

  • Add typed contracts for getEventComments, createComment, and deleteComment.
  • Generalize the image uploader for event_photo plus eventId.
  • Generate the media wrapper exactly as the web client does.
  • Support image-only and text-plus-image comments.
  • Keep default output JSON-first and do not expose Partiful user IDs in human-readable output.
  • Use --dry-run to show files, sizes, MIME types, and the intended comment payload without uploading or posting.
  • Surface event permission errors cleanly. Do not pre-assume hosts are blocked when allowGuestPhotoUpload is false.
  • Add unit tests for payload construction, MIME/size validation, repeated --image, and API error mapping.
  • Verify with one real hosted-event image comment, read it back through getEventComments, then delete it through deleteComment.

Acceptance criteria

  • View activity feed
  • List event comments as structured JSON
  • Post a text comment
  • Post an image-only comment from a local file
  • Post text plus one or more images
  • Reply to a comment
  • Delete a comment created by the authenticated user/host
  • See RSVP activity in feed
  • Reject unsupported MIME types and images over 30 MB before upload
  • --dry-run performs no upload or comment mutation
  • Unit tests cover payload and media construction
  • One real image-comment E2E passes and cleanup is verified

Contract-to-release lifecycle (2026 mobile callable refresh)

Updated evidence starting point

Issue #206 verified getEventComments as a live {eventId} callable and inventories create/delete/reaction operations. Populated comment, media, ordering, pagination, and realtime semantics still need controlled evidence.

Issue #206 and its research branch are evidence inputs, not authority. Operation names alone do not establish request schemas, authorization, response semantics, persistence, or safe mutation behavior.

Delivery lifecycle

  1. Capture current first-party request, response, authorization, pagination, failure, and consumed-field evidence. Use read-only probes first and controlled self-owned fixtures for writes.
  2. Audit the current spec/partiful.openapi.json and spec/partiful.api-evidence.json. Propose the smallest remote-contract revision needed, or record a reviewed no-change decision when the existing transport contract is sufficient.
  3. Obtain owner approval for the remote contract before implementation treats new evidence as authoritative.
  4. Update docs/CLI-PRODUCT-CONTRACT.md, the typed application operation, public command catalog, partiful schema, help, output projection, empty states, structured failures, and safety metadata together.
  5. Implement the required internal/remote transport and one typed application operation that the CLI uses directly and a future MCP adapter can reuse. Do not expose raw callable, Firestore, or shell escape hatches.
  6. Add fake-transport contract tests, input and projection tests, privacy regressions, permission/error cases, pagination bounds, and CLI/MCP semantic parity when MCP is available.
  7. Run controlled end-to-end verification. Every mutation needs dry-run, exact authorization and precondition checks, at-most-once dispatch, independent readback, and fixture cleanup.
  8. Update README and the Partiful skill, then run go mod verify, go test ./..., go test -race ./..., go vet ./..., go build ./..., the PII guard, and ./scripts/verify-native-release.sh.

Dependency updates

Additional acceptance gates

  • Operation-specific evidence is sanitized, reproducible, and classified by source.
  • OpenAPI and evidence-ledger treatment is owner-approved before implementation lands.
  • CLI product contract, schema, help, safety metadata, and JSON output agree.
  • Empty, malformed, unauthenticated, unauthorized, not-found, and protocol-drift cases are explicit.
  • Private identifiers and backend bodies do not enter normal output, errors, diagnostics, fixtures, or MCP context.
  • Controlled live verification exercises the actual transport and independent readback.
  • Full Go, race, vet, build, privacy, contract, and native release gates pass.

Activity

  1. added
    wayfinder:task
    enhancement
    on Sep 6, 2026
  2. KalebCole commented on Nov 14, 2026

    @KalebCole
    OwnerAuthor

    Triage bot: held for Kaleb. Every new command waits for his review for now (draft VISION (#256)), and a command ships only for an operation defined in spec/partiful.openapi.json, with Go tests and reviewed schema goldens. Image comments would need a custom image upload, which is out of scope, so text comments and activity reads only. Needs: Kaleb's go-ahead, then the activity read and comment post operations reviewed into the spec.

  3. added
    held
    on Nov 14, 2026
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

    enhancementheldwayfinder:task

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions