Code Review Bench PR #25189 - Updated activitypub Bluesky sharing enablement flow#11
Code Review Bench PR #25189 - Updated activitypub Bluesky sharing enablement flow#11ketkarameya wants to merge 6 commits intobase_pr_25189_20260125_9314from
Conversation
ref TryGhost/ActivityPub#1377 We updated the backend implementation of the Bluesky sharing enablement process to include a confirmation step in which the client would prompt the backend to check what handle has been assigned to the Bluesky account generated by Bridgy Fed - This circumvents the need to for us to compute the handle manually and potentially getting it wrong if we compute it in a different way to Bridgy Fed
Code Review
|
| Auto-apply | Compact |
|
|
Was this helpful? React with 👍 / 👎 | Gitar
| } | ||
| }; | ||
|
|
||
| const confirmHandle = useCallback(() => { |
There was a problem hiding this comment.
⚠️ Bug: Unhandled promise rejection in confirmHandle callback
The confirmHandle callback calls confirmBlueskyHandleMutation.mutateAsync().then(...) without a .catch() handler. mutateAsync returns a promise that rejects on error. While the mutation's onError handles 429 status codes, the promise rejection itself is not caught, meaning:
- Any non-429 error (network failure, 500 server error, etc.) causes an unhandled promise rejection
- This happens repeatedly since
confirmHandleis called from asetInterval— each poll that fails will generate an unhandled rejection - In strict mode or some environments, unhandled rejections can crash the application
Either add a .catch() to swallow/log errors (since the retry logic handles failure via exhaustion), or use mutate() instead of mutateAsync() since there's no need for the returned promise — the mutation's onSuccess/onError callbacks already handle both cases.
Was this helpful? React with 👍 / 👎
| const confirmHandle = useCallback(() => { | |
| const confirmHandle = useCallback(() => { | |
| confirmBlueskyHandleMutation.mutate(); | |
| // eslint-disable-next-line react-hooks/exhaustive-deps | |
| }, []); // Empty deps - mutations are stable in practice |
- Apply suggested fix
Benchmark PR for Gitar evaluation
Original PR: agentic-review-benchmarks#10
Updates the ActivityPub integration for Bluesky sharing enablement.
Summary by Gitar
>to>=and moved increment after validation inuseConfirmBlueskyHandleMutationForUserto respectMAX_CONFIRMATION_RETRIESexactly/activitypub/v1/*to/activitypub/v2/*, bumped package to 2.0.0retryCountRef.current > 0to prevent success toast from displaying on page revisitsThis will update automatically on new commits.