console icon indicating copy to clipboard operation
console copied to clipboard

Fix: cross-region realtime ping for onboarding

Open Meldiron opened this issue 3 months ago • 2 comments

What does this PR do?

This:

CleanShot 2025-10-31 at 17 18 14@2x

Works in Frankfurt, but doesnt work in SFO region.

This PR fixes it.

Test Plan

Manual QA with multiregion instance

Related PRs and Issues

https://x.com/bandinopla/status/1984285463826600142

Have you read the Contributing Guidelines on issues?

Yes

Summary by CodeRabbit

  • Improvements
    • Enhanced real-time event synchronization across all platform creation workflows (Android, Apple, Flutter, React Native, Web) to listen to additional channels for more reliable project connectivity and updates.

Meldiron avatar Oct 31 '25 16:10 Meldiron

Console

Project ID: 688b7bf400350cbd60e9

Sites (1)
Site Status Logs Preview QR
 console-stage
688b7cf6003b1842c9dc
Ready Ready View Logs Preview URL QR Code

[!TIP] You can use Avatars API to generate QR code for any text or URLs.

appwrite[bot] avatar Oct 31 '25 16:10 appwrite[bot]

Walkthrough

This pull request updates realtime channel subscriptions across five Svelte components within the platforms directory. Each file's onMount subscription is modified to listen to multiple channels by changing the second parameter of realtime.forConsole from a single string 'console' to an array ['console', 'project']. The ping event detection logic, connection handling, dependency invalidation, and cleanup mechanisms remain functionally identical in all files.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify that the ['console', 'project'] channel array is the appropriate set for all these platform-specific components
  • Confirm the change is applied consistently across all five files with no variations or missed files
  • Check that the callback handler logic does not require modifications to process events from multiple channels

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "Fix: cross-region realtime ping for onboarding" directly and accurately describes the main change in the changeset. The modifications across five platform-specific onboarding files (Android, Apple, Flutter, React Native, and Web) all follow the same pattern: updating the realtime subscription to listen to multiple channels ['console', 'project'] instead of a single 'console' channel. This change aligns precisely with the stated purpose of fixing a cross-region realtime ping issue that was affecting the onboarding process. The title is concise, specific, and clearly communicates the primary intent without being vague or overly broad.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment
  • [ ] Commit unit tests in branch fix-cross-region-ping

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Oct 31 '25 16:10 coderabbitai[bot]