fix(adapters): whatsapp typing + slack/gchat 4.30 fixes (vercel/chat#320,523,553,573)#141
Conversation
|
Warning Review limit reached
More reviews will be available in 30 minutes and 49 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the 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 credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. 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, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (11)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces several updates across different chat adapters. In the Google Chat adapter, redundant mailto and tel autolinks are collapsed to plain text when the label matches the address. In the Slack adapter, reaction handlers now resolve and display real user names instead of raw IDs, file upload IDs are serialized using camelCase (uploadedFileIds), and the bot token is consistently passed on all stream appends and stops to prevent authentication issues. In the WhatsApp adapter, the default Graph API version is bumped to v25.0, and support for typing indicators is implemented by resolving the latest inbound message ID. Comprehensive tests have been added or updated to validate these changes. I have no feedback to provide as there are no review comments.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 78590400fa
ℹ️ 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".
| return raw | ||
| base = raw if isinstance(raw, dict) else {} | ||
| return {**base, "uploaded_file_ids": uploaded_file_ids} | ||
| return {**base, "uploadedFileIds": uploaded_file_ids} |
There was a problem hiding this comment.
Preserve uploaded_file_ids for file uploads
For Slack posts that include files, this now returns only uploadedFileIds, removing the previously documented raw["uploaded_file_ids"] surface used for delivery-confirmation gating. Since this commit does not include a breaking-version migration, existing Python consumers that read the snake_case key will treat successful uploads as missing confirmations; add the camelCase key as an alias rather than replacing the old one.
Useful? React with 👍 / 👎.
Port of upstream ffc43fc: - start_typing resolves the latest inbound message ID from the ThreadHistoryCache and posts a typing_indicator payload (which also marks the referenced message as read); no-ops with a warning when no inbound message context exists - Graph API default version bumped v21.0 -> v25.0 - _graph_api_request and the typing-indicator failure path raise AdapterError instead of RuntimeError/plain Error - new WhatsAppTypingIndicatorResponse TypedDict https://claude.ai/code/session_013zwTcMek5rNqBTQvs2oF64
…ercel/chat#553) Port of upstream 177735a: when a link node's visible label equals its URL minus a mailto:/tel: scheme (e.g. an autolinked email address), from_ast emits the bare value as plain text instead of the verbose <url|text> form. Labels differing from the address keep <url|text>. The collapse sits between the linkText==url shortcut and this port's documented divergent branches (empty-label bare-URL emit and the text-(url) fallback for unsafe labels/URLs), matching upstream's check order; when it fires the output is plain text, so it never produces the malformed forms those divergences guard against. Our subset parser does not autolink bare emails/URLs (Known Limitations), so the ported collapse tests build the autolink-shaped node via the explicit markdown form, plus a Python-only round-trip test through the divergent <url|text> to_ast path. https://claude.ai/code/session_013zwTcMek5rNqBTQvs2oF64
Port of upstream b63c042: reaction events now resolve event.user.user_name / full_name / is_bot from the cached _lookup_user() (users.info) path instead of echoing the raw Slack user ID, falling back to the user ID (and is_bot=False) when lookup fails. Also completes the dispatch-key test's mock client/state contract (users_info + async state methods), mirroring the upstream test update - a bare AsyncMock's auto-children made users.info results async and leaked an orphaned coroutine through the new lookup. https://claude.ai/code/session_013zwTcMek5rNqBTQvs2oF64
Port of upstream 999d268: SlackAdapter.stream() now passes the resolved bot token on every streamer.append() (markdown deltas and structured chunks) and on streamer.stop(), instead of only on the first append. Fixes not_authed from chat.startStream/chat.stopStream when a stream reaches stop() before a token-bearing append has flushed (e.g. fully buffered markdown). Composes with the existing multi-workspace plumbing: token is resolved once at stream entry via _get_token() (request-context installation token -> per-request resolved default -> static cache), then threaded through all streamer calls; a Python-only regression test locks the request-context token flowing through append and stop. https://claude.ai/code/session_013zwTcMek5rNqBTQvs2oF64
… chat@4.30.0 Our Python-only "file-ids" surface (Slack-confirmed upload IDs exposed on RawMessage.raw so consumers can gate on actual delivery) was adopted upstream in chat@4.30.0, which emits the synthetic key as camelCase `uploadedFileIds`. We were emitting snake_case `uploaded_file_ids`, leaving a divergence at the serialization boundary. Rename the emitted dict key to `uploadedFileIds` so consumers reading the raw payload match the upstream/TS surface. The local variable stays snake_case (`uploaded_file_ids`) per the "snake_case internal, camelCase at boundary" rule; only the key merged into `raw` changes. Behavior is otherwise identical (None -> raw unchanged; empty list preserved as the zero-attachments signal). Updates the three Python-only tests that asserted the old key name (test_slack_api file-upload tests and the test_thread_faithful raw- propagation test, which uses Slack's surface as its example payload). https://claude.ai/code/session_013zwTcMek5rNqBTQvs2oF64
7859040 to
c113931
Compare
0.4.30 wave. Cherry-picks 5 fixes onto current main (8a6cfb4,2a2aec0,0786f3d,c6f2ebf,b9b516e): WhatsApp typing indicator + Graph v25.0, Slack reaction display-names/stream-stop-token/uploadedFileIds, gchat email-autolink collapse. NOTE: 3 Slack fixes edit slack/adapter.py — must rebase onto the post-#slack-refactor layout before merge (land slack PR first). No version bump. Independent review needed.