fix: extend realtime sync mutation coverage#724
Conversation
Union-merged figma.SyncSources calls from staging into issues/handler.go Create and Update handlers, preserving the op return value from insertOperation needed by syncapi.PublishOperations. Regenerated packages/sdk/src/generated.ts from the auto-merged openapi.yaml. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Controller disposition for current head Evidence:
Required before merge: port only the realtime mutation coverage delta onto current |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 748842ca3b
ℹ️ 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".
| } | ||
| problem.JSON(w, 200, bulkReadResponse{Success: true, UpdatedCount: cmd.RowsAffected(), UnreadCount: count}) | ||
| response := bulkReadResponse{Success: true, UpdatedCount: cmd.RowsAffected(), UnreadCount: count} | ||
| op, err := syncapi.InsertOperation(r.Context(), tx, p.WorkspaceID, "notification", p.UserID, "bulk_read", response, p.UserID) |
There was a problem hiding this comment.
Keep notification sync events user-scoped
When a user marks notifications read, this inserts a notification operation under p.WorkspaceID and later publishes it on the workspace channel; since SubscribeOperations subscribes by workspace, every member connected to that workspace receives this user's notification action and unreadCount payload. Notification rows are otherwise filtered by user_id, so these sync operations should be routed/filterable per user (or not published to the shared workspace stream) to avoid leaking per-user inbox state.
Useful? React with 👍 / 👎.
Summary
Verification
Refs #560