Skip to content

fix(events): preserve requested create visibility - #230

Open
KalebCole wants to merge 1 commit into
mainfrom
fix/private-event-visibility
Open

KalebCole wants to merge 1 commit into
mainfrom
fix/private-event-visibility

Conversation

@KalebCole

Copy link
Copy Markdown
Owner

Summary

  • Preserve explicit private/public visibility when creating an event.
  • Cover the private default in dry-run and submission request assertions.

Verification

  • go test ./...
  • go test -race ./...
  • go vet ./...
  • go build ./...

@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 38cd13dd-4a8a-4ca3-86ff-0ba3821a2cbb


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1

🚀 View preview at
https://KalebCole.github.io/partiful-cli/pr-preview/pr-230/

Built to branch gh-pages at 2026-09-15 20:23 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ab716d0b7c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

ShowActivityTimestamps: true,
DisplayInviteButton: true,
Visibility: "public",
Visibility: input.Visibility,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep the protocol visibility field fixed to public

For the default input and for --visibility private, this now serializes "visibility":"private". The reviewed create-event schema constrains that transport field to the constant "public" (spec/partiful.openapi.json:2325-2328), while the product contract specifies that private/public behavior is controlled separately by omitting or sending isPublic: true (docs/CLI-PRODUCT-CONTRACT.md:513). Consequently, default private event creations no longer match the reviewed remote request contract and can be rejected or handled differently by the callable endpoint.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review matches the code on current main. buildCreateEventDraft still sets the transport visibility field to the constant "public", and the product choice is isPublic: --visibility public sends isPublic: true, while private omits isPublic. That is the reviewed create contract in docs/CLI-PRODUCT-CONTRACT.md (public sends isPublic: true; private omits it; the separate first-party visibility field stays "public").

Sending input.Visibility would put "private" on that transport field and no longer match the reviewed request. Main already preserves the requested product visibility the way the contract describes, so this branch should not be updated onto main. The events-get readback gap (raw visibility is always "public", and capacity is maxCapacity rather than guestLimit) is the separate change in #242.

Copy link
Copy Markdown
Owner Author

Triage bot: held. This has merge conflicts with main, and it changes the default create visibility from public to private, a public behavior change while #211 (visibility lifecycle) is still research. Needs: a rebase on main and Kaleb's call on the default.

@KalebCole KalebCole added bug Something isn't working held Waiting on Kaleb's decision. Do not merge. labels Nov 14, 2026 — with Cursor

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working held Waiting on Kaleb's decision. Do not merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant