Skip to content

Conversation

@benceruleanlu
Copy link
Member

@benceruleanlu benceruleanlu commented Nov 1, 2025

Backport of #6500 onto rh-test.

Summary of changes

  • Add TelemetryEvents.API_CREDIT_TOPUP_SUCCEEDED and provider method
  • Implement topupTrackerStore to persist pending top-ups, reconcile against recent credit_added audit logs, emit telemetry on success, refresh balance, and clear pending
  • Wire reconciliation triggers in purchase flow and usage logs table
  • Minor refactor to customerEventsService to await/return explicitly

Notes

  • The window and pagination issue will be resolved by a follow-up PR to core and cloud.

Validation

Please review backport diffs for any rh-test branch-specific interactions.

┆Issue is synchronized with this Notion page by Unito

…udit events\n\n- Add TelemetryEvents.API_CREDIT_TOPUP_SUCCEEDED and provider method\n- Emit on credit_added events in useCustomerEventsService with in-memory dedupe\n- No local storage, naive based on backend audit log

(cherry picked from commit 0a50e43)
(cherry picked from commit d5750df)
(cherry picked from commit 37d8a53)
(cherry picked from commit fbf2aeb)
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Nov 1, 2025
@github-actions
Copy link

github-actions bot commented Nov 1, 2025

🎭 Playwright Test Results

Some tests failed

⏰ Completed at: 11/01/2025, 05:25:14 AM UTC

📈 Summary

  • Total Tests: 211
  • Passed: -108 ✅
  • Failed: 14 ❌
  • Flaky: 1 ⚠️
  • Skipped: 304 ⏭️

📊 Test Reports by Browser


🎉 Click on the links above to view detailed test results for each browser configuration.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +139 to +141
const reconcileByFetchingEvents = async (): Promise<boolean> => {
const service = useCustomerEventsService()
const response = await service.getMyEvents({ page: 1, limit: 10 })

Choose a reason for hiding this comment

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

P1 Badge Avoid using useCustomerEventsService outside component context

The new reconcileByFetchingEvents action instantiates useCustomerEventsService(), but that composable calls useI18n() internally. useI18n requires an active Vue component instance, which is not present when reconcileByFetchingEvents runs (it is invoked from authActions.fetchBalance() and other event handlers after setup). This will throw getCurrentInstance()/useI18n errors as soon as fetchBalance is called, breaking balance refresh and the top‑up reconciliation flow. Consider moving the service call into a component/composable scope or refactoring the service to avoid useI18n when called from Pinia stores.

Useful? React with 👍 / 👎.

@christian-byrne christian-byrne added the claude-review Add to trigger a PR code review from Claude Code label Nov 1, 2025
@benceruleanlu
Copy link
Member Author

upstream changed, manually backporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-review Add to trigger a PR code review from Claude Code size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants