docs: Billing system overview for external billing migration#2649
docs: Billing system overview for external billing migration#2649
Conversation
…lanning. Generated with [Indent](https://indent.com) Co-Authored-By: Indent <noreply@indent.com>
|
No issues found. Resolved (1 issue)
This PR adds a comprehensive documentation file (
No CI checks have been reported for this PR.
|
Generated with [Indent](https://indent.com) Co-Authored-By: Indent <noreply@indent.com>
ShubhamDeshmuk-h
left a comment
There was a problem hiding this comment.
This is strong, high-quality documentation overall, but a few important areas need to be addressed before merging to ensure production readiness and avoid gaps during migration.
- Missing Failure & Edge Case Handling
The document currently assumes a happy path only. Please include handling for key edge cases such as:
User closes the browser without completing payment
Payment failure scenarios
Expired SSO URLs
Network failures during fetchIdentity()
Multiple tabs or repeated upgrade clicks
Without these, the migration flow may lead to inconsistent billing states or unresolved UI flows.
- Weak Definition of Foreground Detection
The document mentions:
"App foreground listener — New code needed"
However, there are no implementation details. This is a critical part of the new flow and needs to be clearly defined.
Please include:
Which Electron APIs will be used (e.g., app.on('browser-window-focus'), visibilitychange)
Debounce or throttling strategy to avoid excessive calls
Safeguards to prevent duplicate fetchIdentity() calls
3. Missing Security Considerations
Since billing involves sensitive flows, a security section is required. Currently, there is no mention of:
SSO token expiration and validity window
Risks of SSO URL leakage (logs, sharing, etc.)
Trust assumptions when redirecting users to an external browser
Adding this will ensure the migration is aligned with secure practices.
Addressing these points will make the document significantly more robust.
Summary
docs/billing-system-overview.md) cataloging all billing-related code in the applicationTest plan
Generated with Indent - session link