fix: ensure socketio provider idempotent
Ensure idempotent when:
- socketio provider connect -> disconnect -> connect
- register doc with same guid more than once
This branch is running in CodeSandbox. Use the links below to review this PR faster.
Open in CodeSandbox Web Editor | VS Code | VS Code Insiders | Preview
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| affine-docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 17, 2023 4:51am |
| affine-preview | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 17, 2023 4:51am |
| affine-storybook | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 17, 2023 4:51am |
Deploying with
Cloudflare Pages
| Latest commit: |
35348ca
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a1ba0f7b.affine-dev.pages.dev |
| Branch Preview URL: | https://0714-fix-socketio-provider.affine-dev.pages.dev |
☁️ Nx Cloud Report
CI is running/has finished running commands for commit 35348ca8cb50720bbfeee0623bb25e4f7a6266b8. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.
📂 See all runs for this branch
✅ Successfully ran 1 target
Sent with 💌 from NxCloud.
affine-toeverything
Bundle main
diff ------------------- Bundle Size Diff -------------------------
@@ EntryPoint: main @@
## master …etIO-provider +/- ##
===================================================================
< Bundle 5.33 MB 5.53 MB +206 kB(+3.87%)
< Initial JS 2.19 MB 2.33 MB +132 kB(+6.04%)
= Initial CSS 75.4 kB 75.4 kB
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
< Assets 73 84 +11
< Chunks 59 67 +8
< Packages 217 231 +14
< Duplicates 18 22 +4
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Warnings ~~~~~~~~~~~~~~~~~~~~~~~~~~~#
! Deduplicate versions of libraries
! Separate mixed content assets files
! Avoid cache wasting
@@ EntryPoint: pages/_error @@
## master …etIO-provider +/- ##
===================================================================
= Bundle 16.6 kB 16.6 kB
= Initial JS 16.6 kB 16.6 kB
= Initial CSS 0 B 0 B
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
= Assets 2 2
= Chunks 2 2
= Packages 5 5
= Duplicates 0 0
@@ EntryPoint: pages/404 @@
## master …etIO-provider +/- ##
===================================================================
< Bundle 10.4 kB 10.8 kB +409 B(+3.93%)
< Initial JS 10.4 kB 10.8 kB +409 B(+3.93%)
= Initial CSS 0 B 0 B
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
= Assets 2 2
= Chunks 2 2
= Packages 2 2
= Duplicates 0 0
...and more
Codecov Report
Patch coverage has no change and project coverage change: -0.73 :warning:
Comparison is base (
73714c2) 66.95% compared to head (35348ca) 66.23%.
Additional details and impacted files
@@ Coverage Diff @@
## himself65/0629-login #3243 +/- ##
========================================================
- Coverage 66.95% 66.23% -0.73%
========================================================
Files 383 381 -2
Lines 10755 10741 -14
Branches 1196 1195 -1
========================================================
- Hits 7201 7114 -87
- Misses 3276 3346 +70
- Partials 278 281 +3
| Flag | Coverage Δ | |
|---|---|---|
| e2etest | 53.50% <0.00%> (-1.65%) |
:arrow_down: |
| e2etest-macos-latest-x64 | ∅ <ø> (∅) |
|
| e2etest-ubuntu-latest-x64 | 45.08% <0.00%> (+0.03%) |
:arrow_up: |
| e2etest-windows-latest-x64 | ∅ <ø> (∅) |
|
| server-test | 76.48% <ø> (ø) |
|
| unittest | 50.86% <0.00%> (-0.07%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Impacted Files | Coverage Δ | |
|---|---|---|
| ...kages/workspace/src/affine/sync-socket-io/index.ts | 11.95% <0.00%> (-0.20%) |
:arrow_down: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.