Skip to content

docs(events): document notification/app-state payload sealing (whatsapp-rust#1003) - #398

Merged
jlucaso1 merged 1 commit into
mainfrom
claude/nifty-bohr-fgwo8h
Jul 7, 2026
Merged

docs(events): document notification/app-state payload sealing (whatsapp-rust#1003)#398
jlucaso1 merged 1 commit into
mainfrom
claude/nifty-bohr-fgwo8h

Conversation

@jlucaso1

@jlucaso1 jlucaso1 commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

What

Updates concepts/events.mdx for oxidezap/whatsapp-rust#1003, the second tranche of the pre-1.0 event-payload API freeze (after ServerAck in #1002, documented in #397).

Why

whatsapp-rust#1003 seals 22 more event payload structs with #[non_exhaustive] + #[derive(bon::Builder)]:

  • App-state sync mutations (12): ContactUpdate, PinUpdate, MuteUpdate, ArchiveUpdate, StarUpdate, MarkChatAsReadUpdate, DeleteChatUpdate, ClearChatUpdate, UserStatusMuteUpdate, DeleteMessageForMeUpdate, LabelEditUpdate, LabelAssociationUpdate.
  • Notification / contact / presence / group (10): ChatPresenceUpdate, PresenceUpdate, PictureUpdate, UserAboutUpdate, ContactUpdated, ContactNumberChanged, ContactSyncRequested, GroupUpdate, PushNameUpdate, SelfPushNameUpdated.

The docs' payload-stability notes and every one of these structs' code blocks still showed the pre-#1003 "not sealed" shape (#[derive(Debug, Clone, Serialize)] with no #[non_exhaustive]), so they were out of date.

Changes

concepts/events.mdx:

  • Reworded the general payload-stability <Note> under the Event enum to name every struct sealed so far (not just ServerAck), and to note that message/newsletter and pairing payloads remain unsealed for now.
  • Updated the ServerAck-specific note's tense (is the firstwas the first) now that other payloads have followed.
  • Added #[non_exhaustive] and the bon::Builder derive to all 22 affected struct code blocks.

No consumer-facing example in this doc constructs a payload directly (they all bind the whole Event variant and read fields, e.g. Event::Presence(update) => { update.unavailable }), so no example code needed changes — construction via Type::builder()…build() is internal to the client.

No changelog entry added, per instructions that changelog entries are human-authored.

Ref: oxidezap/whatsapp-rust#1003


Generated by Claude Code


Summary by cubic

Update concepts/events.mdx to document event payload sealing from oxidezap/whatsapp-rust#1003. Add #[non_exhaustive] and bon::Builder to 22 notification, presence, contact, group, and app‑state mutation structs, and update stability notes; examples unchanged.

Written for commit 7302128. Summary will update on new commits.

…pp-rust#1003)

Updates concepts/events.mdx for oxidezap/whatsapp-rust#1003, which
extends the pre-1.0 event-payload seal (#[non_exhaustive] + bon::Builder,
started on ServerAck in #1002) to the 22 notification, presence,
contact, group, and app-state-sync mutation payload structs.

- Reworded the general payload-stability note to list every struct
  sealed so far instead of only calling out ServerAck.
- Added #[non_exhaustive] and the bon::Builder derive to all 22
  affected struct code blocks (SelfPushNameUpdated, ChatPresenceUpdate,
  PresenceUpdate, PictureUpdate, UserAboutUpdate, ContactUpdated,
  ContactNumberChanged, ContactSyncRequested, GroupUpdate,
  PushNameUpdate, ContactUpdate, PinUpdate, MuteUpdate, ArchiveUpdate,
  StarUpdate, MarkChatAsReadUpdate, DeleteChatUpdate, ClearChatUpdate,
  UserStatusMuteUpdate, DeleteMessageForMeUpdate, LabelEditUpdate,
  LabelAssociationUpdate).

Construction sites move to `Type::builder()...build()`, but this is
internal to the client (it dispatches these events) — no consumer-facing
example in this doc constructs a payload, so only the struct
definitions and the stability notes needed updating.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jlucaso1, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 52c30c90-743e-4df3-baa1-9ffdd1bc0dbe

📥 Commits

Reviewing files that changed from the base of the PR and between ffff4ec and 7302128.

📒 Files selected for processing (1)
  • concepts/events.mdx

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.

@mintlify

mintlify Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
whatsapp-rust 🟢 Ready View Preview Jul 7, 2026, 6:50 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@greptile-apps

greptile-apps Bot commented Jul 7, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates concepts/events.mdx to reflect the sealing of 22 additional event payload structs with #[non_exhaustive] and #[derive(bon::Builder)] as introduced in whatsapp-rust#1003 — the second tranche of the pre-1.0 API freeze.

  • Updated the general payload-stability <Note> to enumerate all 22 newly-sealed structs by name and clarify which payloads remain unsealed (message/newsletter and pairing events).
  • Changed the ServerAck-specific note from "is the first" to "was the first" now that others have followed, and added #[non_exhaustive] + bon::Builder derive lines to all 22 affected struct code blocks.

Confidence Score: 5/5

Documentation-only change updating 22 struct code blocks; all changes are accurate and consistent with the referenced upstream Rust PR.

All 22 struct code blocks in scope are updated, the payload-stability note correctly enumerates every sealed struct, and the tense fix on the ServerAck note is accurate. No consumer-facing examples construct payloads directly, so no example code required adjustment. The change is self-contained to one MDX file with no logic paths or runtime behavior.

No files require special attention.

Important Files Changed

Filename Overview
concepts/events.mdx All 22 struct code blocks updated consistently with #[non_exhaustive] + bon::Builder; payload-stability note and ServerAck tense are correctly revised; no prose or code regressions found.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Event Payload Struct] --> B{Sealed?}
    B -- No --> C[Pre-1.0 Unsealed Shape]
    B -- Yes --> D[Sealed with non_exhaustive + bon::Builder]

    C --> E{Category}
    E -- Message/Newsletter Events --> F[Still Unsealed - Future tranche]
    E -- Pairing Events --> F

    D --> G{Sealed Tranche}
    G -- PR 397 whatsapp-rust 1002 --> H[ServerAck]
    G -- This PR whatsapp-rust 1003 --> I[Notification/Presence/Contact/Group - 10 structs]
    G -- This PR whatsapp-rust 1003 --> J[App-State-Sync Mutations - 12 structs]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[Event Payload Struct] --> B{Sealed?}
    B -- No --> C[Pre-1.0 Unsealed Shape]
    B -- Yes --> D[Sealed with non_exhaustive + bon::Builder]

    C --> E{Category}
    E -- Message/Newsletter Events --> F[Still Unsealed - Future tranche]
    E -- Pairing Events --> F

    D --> G{Sealed Tranche}
    G -- PR 397 whatsapp-rust 1002 --> H[ServerAck]
    G -- This PR whatsapp-rust 1003 --> I[Notification/Presence/Contact/Group - 10 structs]
    G -- This PR whatsapp-rust 1003 --> J[App-State-Sync Mutations - 12 structs]
Loading

Reviews (1): Last reviewed commit: "docs(events): document notification/app-..." | Re-trigger Greptile

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Documentation-only update to reflect event payload sealing for 22 structs; no source code, logic, or configuration changes.

Re-trigger cubic

@jlucaso1
jlucaso1 merged commit 76d12e9 into main Jul 7, 2026
4 checks passed
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.

2 participants