Conversation
Add early return when Epay client is missing in controller/topup.go to avoid panic Introduce handleKeywordChange in TopupHistoryModal.jsx to reset page to 1 when keyword updates Wire input onChange to new handler; minor UX improvement to avoid empty results on pagination mismatch
WalkthroughTwo changes: backend handler EpayNotify now always returns after writing "fail" when the Epay client is nil; frontend TopupHistoryModal introduces a handleKeywordChange function to update the keyword and reset pagination to page 1, adjusting the Input onChange flow accordingly. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Client
participant Handler as EpayNotify Handler
participant EpayClient as Epay Client (optional)
Client->>Handler: HTTP notify
alt Epay client configured
Handler->>EpayClient: Process notification
EpayClient-->>Handler: Result
Handler-->>Client: Response (per result)
else Epay client is nil
rect rgba(230, 230, 255, 0.4)
note right of Handler: Changed flow
Handler-->>Client: "fail"
Handler-->>Client: Return immediately
end
end
sequenceDiagram
autonumber
actor User
participant Input as Search Input
participant Modal as TopupHistoryModal State
participant Pager as Pagination
User->>Input: Type keyword
Input->>Modal: onChange(value)
rect rgba(230, 255, 230, 0.4)
note right of Modal: New handler
Modal->>Modal: handleKeywordChange(value)
Modal->>Modal: setKeyword(value)
Modal->>Pager: setCurrentPage(1)
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🔇 Additional comments (3)
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 |
❤ fix(topup): prevent nil-pointer in Epay callback; reset page on search
feat: 支持 Vertex Service Account(Anthropic / Gemini)
…ous#1977) - Security: force token_uri to Google default, preventing SSRF via crafted service account JSON - Dedup: extract shared getVertexServiceAccountAccessToken() to eliminate ~35 lines of duplication between ClaudeTokenProvider and GeminiTokenProvider - Fix: apply model mapping + Vertex model ID normalization in forward_as_responses and forward_as_chat_completions paths - Fix: exclude service_account from AI Studio endpoint selection (Vertex cannot serve generativelanguage.googleapis.com) - Feature: add model restriction/mapping UI for service_account in EditAccountModal - Dedup: extract VERTEX_LOCATION_OPTIONS to shared constants - i18n: replace all hardcoded Chinese strings in Vertex UI with translation keys
Add early return when Epay client is missing in controller/topup.go to avoid panic Introduce handleKeywordChange in TopupHistoryModal.jsx to reset page to 1 when keyword updates Wire input onChange to new handler; minor UX improvement to avoid empty results on pagination mismatch
Summary by CodeRabbit