fix(web): stop the "requests are slow" warning from firing on every provider update - #5570
Conversation
Provider updates run a package install on the server and only respond once it finishes, so they routinely blew past the flat 15s slow-request threshold and fired a "Some requests are slow" toast on every update. Give known long-running methods (updateProvider, refreshProviders, updateServer) a 120s threshold instead. Also pass the bare WS method alongside the display tag so the untracked/long-running lookups match: the caller was passing "method · environmentId", which meant the existing previewAutomation.connect exemption never matched in practice. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
commented
Aug 7, 2026
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
commented
Aug 7, 2026
ApprovabilityVerdict: Approved 4a4683c This is a straightforward bug fix that increases the slow-request warning threshold for known long-running operations (provider updates). The changes are self-contained to the warning system, include unit tests, and don't affect core functionality. You can customize Macroscope's approvability policy. Learn more. |
Updating a provider (Claude Code, etc) almost always pops a "Some requests are slow" warning. Nothing is actually wrong: the update shells out to a package install on the server and only responds once it finishes, which takes well over the flat 15s threshold the slow-request tracker uses for every RPC. The provider update flow already shows its own progress toast, so this warning is pure noise on top of it.
Known long-running methods (
updateProvider,refreshProviders,updateServer) now get a 120s threshold instead. The global 15s stays put so the warning still means something for normal requests.While in there:
trackRpcRequestSentwas being called with"method · environmentId"as its only identifier, so the existingpreviewAutomation.connectexemption never actually matched in production (only in tests, which passed the bare method). It now takes the method and the display tag separately.Made with Claude Opus 5 (1M context) in T3 Code.
Note
Low Risk
Client-side timing and toast behavior only; no changes to RPC handling, auth, or server logic.
Overview
Fixes false "Some requests are slow" toasts during provider updates and similar server work that routinely exceeds 15s while install/shell commands run (the UI already shows progress for those flows).
The slow-ack tracker now uses a 120s threshold for
server.updateProvider,server.refreshProviders, andserver.updateServer, while other unary RPCs stay at 15s. Each tracked request stores its ownthresholdMs, and the warning copy uses the smallest threshold in the batch when several slow requests are shown together.trackRpcRequestSentnow takes the bare WS method (for skip rules and timing) and an optional display tag (toast label). The connection observer passesmethodplus`${method} · ${environmentId}`, so exemptions likepreviewAutomation.connectmatch in production—they previously failed because only the combined tag was passed.Reviewed by Cursor Bugbot for commit 4a4683c. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix slow RPC warning from firing on every provider update
longRunningRpcAckMethodsinrequestLatencyState.tscontainingserverUpdateProvider,serverRefreshProviders, andserverUpdateServer, which now use a 120s threshold (LONG_RUNNING_RPC_ACK_THRESHOLD_MS) instead of the default slow-ack threshold.trackRpcRequestSentsignature into separatemethodandtagarguments so tracking and threshold decisions use the raw RPC method, while the display tag remains human-friendly.untrackedRpcAckTagstountrackedRpcAckMethodsand gates tracking on method name rather than display tag.describeSlowRequeststo report the minimum threshold across all requests in a batch rather than always using the first request's value.Macroscope summarized 4a4683c.