Repository navigation
fix(gui): do not offer retry for the Grok coupon reset POST - #5103
Conversation
A transport rejection after the redemption POST is dispatched has an unknown outcome: the request may still reach the server and spend the coupon. Classifying it as a retryable network error let the operator re-submit an irreversible redemption with the same operation id. Return the aborted outcome for any post-dispatch rejection so the UI stops posting and forces a re-read of account state.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: lidge-jun/opencodex/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe redemption hook now treats every transport rejection as an ChangesGrok redemption handling
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Automatic draft conversion failed (token cannot change draft status). Please convert this pull request to a draft manually. The required |
리뷰 · 우선순위 74 / 80Grok reset-coupon redeem POST는 한 번 나가면 서버가 쿠폰을 쓸 수 있습니다. 클라이언트가 답을 못 받아도 이미 소비됐을 수 있습니다. 예전 훅은 일반 transport 거부를 이 PR은 dispatch 이후 어떤 rejection이든 호스티드 CI는 test 1–3 그린, docker/macos/test4 일부 pending. types/config 스플릿과 무관. GUI 전용 좁은 수정입니다. 경로 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
Motivation
The Grok reset-coupon redeem POST is irreversible: once dispatched, the route may spend the coupon even if the client never sees the answer. The hook used to classify a generic transport rejection as
network, a retryable failure — so a retry after a dropped response could post a second redemption and spend another coupon. Only an abort signal counted as an unknown outcome.Description
useGrokResetCoupons: any rejection after dispatch now returnscode: "aborted"— outcome unknown, delivery may have succeeded. The dialog holds the operation id, stops posting, and only lets the user re-read the account.wasAbortedhelper is removed: there is no safely retryable transport failure for this route.Tests
bun test tests/grok-reset-coupons.test.tsx— 9 pass; the rejection case now asserts the unknown-outcome path rather than a retryable network error.bun run typecheck— clean.Screenshots
[Coupon dialog after a dropped redemption response: outcome unknown, posting blocked, re-read offered] (screenshot removed; was hosted on the contributor fork)
Summary by CodeRabbit