This repository was archived by the owner on Aug 6, 2026. It is now read-only.
feat(loops): Surface billing pauses and gate manual runs - #3779
Merged
Conversation
|
😎 This pull request was merged. |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
packages/ui/src/features/loops/components/LoopDetailView.tsx:86
**Keep Run now single-flight**
The button remains enabled while the asynchronous usage preflight runs, so repeated clicks start concurrent preflights and subsequent run mutations. Track the entire handler as pending to avoid duplicate run attempts and repeated notifications.
Reviews (1): Last reviewed commit: "surface loop billing pauses and gate man..." | Re-trigger Greptile |
2 tasks
There was a problem hiding this comment.
The diff surfaces existing usage-limit gating (assertCloudUsageAvailable/useUsageLimitStore, already used by the task composer) into the loop run-now flow rather than adding new billing logic, the sole reviewer concern (non-single-flight Run now button) is already fixed in the current diff via the runNowPending guard/try-finally, and the author has STRONG familiarity with these exact files/lines plus added parameterized test coverage.
- Author wrote 100% of the modified lines and has 8 merged PRs in these paths (familiarity STRONG).
- 👍 on the PR from greptile-apps[bot].
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 139L, 3F substantive, 235L/4F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1c-medium (235L, 4F, single-area, feat) |
| stamphog 2.0.0b3 | .stamphog/policy.yml @ 3b560b4 · reviewed head 2a26171 |
charlesvien
force-pushed
the
feat/loops-billing-support
branch
from
July 24, 2026 04:15
2a26171 to
af9f944
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When the backend auto-pauses a loop (usage limit reached, or too many failed runs in a row), the app shows a bare "Paused" badge with no explanation. Manual "Run now" also skips the cloud usage preflight every other cloud run path uses, and a blocked fire surfaces as a raw
Run not started: gate_blockedtoast.Companion backend PR records the pause reason on
Loop.disabled_reason.Changes
assertCloudUsageAvailable()like the task composer, and agate_blockedresult opens the usage limit modal instead of a raw toast. Other blocked reasons get readable messages.owner_inactive,owner_changed) and document the newdisabled_reasonvalues.How did you test this?
Added parameterised unit tests for the new display helpers (
loopDisplay.test.ts). Ran the loops feature suite (113 tests) and api-client suite (130 tests), plus typecheck on both packages. No manual app run.Automatic notifications