Skip to content

fix: address usage limits and merge settlement regressions - #9784

Merged
maria-rcks merged 3 commits into
pingdotgg:mainfrom
maria-rcks:t3code/review-recent-merged-prs
Sep 4, 2026
Merged

fix: address usage limits and merge settlement regressions#9784
maria-rcks merged 3 commits into
pingdotgg:mainfrom
maria-rcks:t3code/review-recent-merged-prs

Conversation

@maria-rcks

@maria-rcks maria-rcks commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

fixes four regressions from #9507 and #9332: claude capability loss when usage requests stall, duplicate config streams, limits refresh skipping remote environments, and queued prs settling threads before merging. usage has a separate deadline, client subscription options match and authoritative source events replay to late subscribers, refresh reaches connected environments without waiting for an HTTP session lookup, and settlement requires host-confirmed merged state.

verified with 128 focused tests (including populated source replay, removal, capability downgrade, and buffer-gap recovery), server/web/client-runtime typechecks, targeted lint, and runtime probes. real hosted-browser refresh succeeded with no primary environment at desktop and phone widths; the first click also succeeded with the session endpoint forced to fail. the sandbox has no quota-reporting provider, so screenshots show the inspected controls, while matching RPC success responses verify refresh execution.

hosted limits refresh at desktop width

hosted limits refresh at phone width

model: gpt-5.6-sol; harness: codex.


Note

Medium Risk
Merge event timing changes PR/thread settlement behavior, and client-server config subscription opt-ins affect what usage-limit data is delivered; changes are targeted regression fixes with new tests.

Overview
Fixes regressions around usage limits, Claude capability probing, and PR merge settlement.

Clients now opt into usageLimitSources on the RPC config subscription (web and mobile connection runtimes), matching how environmentThemes is handled so subscriptions dedupe correctly and server config includes limit-source data.

probeClaudeCapabilities returns account and slash commands after initialization even when the optional usage call stalls or times out; usage gets its own shorter deadline and is omitted on failure instead of failing the whole probe.

PullRequestService publishes merge events only after an uncached host summary confirms state === "merged", so queued merges or confirmation errors no longer settle threads early; failures are logged and skipped.

On the Usage page, Limits refresh re-probes providers on every connected environment with a loaded server config, not only the primary environment.

Reviewed by Cursor Bugbot for commit a38cd0d. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix usage-limit source updates and merge settlement confirmation regressions

  • Adds an optional usage-limit-source subscription flag to RpcSessionOptions in session.ts; the session records the latest source update for replay and discards it when a snapshot drops the capability. Mobile and web client connection layers opt in.
  • Updates the refresh handler in UsagePage.tsx to refresh providers for every connected, configured environment instead of only the primary environment.
  • Changes PullRequestService.runActionAndInvalidate in PullRequestService.ts to request an uncached change-request summary after a merge action and publish the merge event only when the host confirms a merged state.
  • Separates initialization from the optional usage request in probeClaudeCapabilities in ClaudeProvider.ts so account data and slash commands survive a usage timeout; the usage request is aborted on timeout or rejection.
  • Behavioral Change: merge subscribers no longer receive a merge event for queued, auto-merge, or unconfirmed actions; confirmation errors are logged and suppressed. The UsagePage refresh now fans out to all connected environments rather than one.

Macroscope summarized 6908eb0.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Sep 4, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9589d3b. Configure here.

Comment thread apps/web/src/components/usage/UsagePage.tsx Outdated
@macroscopeapp

macroscopeapp Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR combines merge-settlement and provider-probe behavior changes with production wiring that enables usage-limit source streaming by default for web and mobile connections. Because the change affects live quota data flow across connected environments and alters observable settlement behavior, its runtime scope merits human review.

You can add or adjust custom eligibility rules. Learn more.

@maria-rcks
maria-rcks merged commit 98a29cb into pingdotgg:main Sep 4, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant