Skip to content

Fix typing indicator expiration with client clock skew - #6084

Merged
mgamis-msft merged 1 commit into
mainfrom
mgamis/fix-latent-clock-skew
Oct 7, 2026
Merged

mgamis-msft merged 1 commit into
mainfrom
mgamis/fix-latent-clock-skew

Conversation

@mgamis-msft

@mgamis-msft mgamis-msft commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

What

Typing indicators were incorrectly filtered as stale when the event timestamp differed from the receiving client’s clock. This fix replaces the SDK-provided receivedOn timestamp with the local receipt time before storing the event. Indicators now remain visible for the intended duration regardless of clock skew or delivery delay. A regression test verifies that events with stale timestamps are retained and expire normally.

Why

https://skype.visualstudio.com/OneWork/_workitems/edit/4784241 (this bug is happening in one particular device as described by TDL because the receiving client device clock is skewed more than 8 seconds resulting in client not able to see typing indicators)
https://portal.microsofticm.com/imp/v5/incidents/details/21000001135358/summary

How Tested

To replicate the scenario of the bug, I introduced a clock skey on the Windows receiving machine:

  1. Synchronize the clock first: Settings → Time & language → Date & time → Sync now.
  2. Turn off Set time automatically.
  3. Open PowerShell as Administrator and run Set-Date -Date (Get-Date).AddSeconds(45)
    4 Reloaded the receiving Local chat sample.
  4. Keep the sender’s clock on another device synchronized and have that user type

From receiver's perspective
Before
image

After
image

Process & policy checklist

  • I have updated the project documentation to reflect my changes if necessary.
  • I have read the CONTRIBUTING documentation.

Is this a breaking change?

  • This change causes current functionality to break.

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

@azure/communication-react jest test coverage for stable.

Lines Statements Functions Branches
Base 29739 / 47381
62.76%
29739 / 47381
62.76%
810 / 1491
54.32%
2394 / 3842
62.31%
Current 29796 / 47567
62.64%
29796 / 47567
62.64%
816 / 1501
54.36%
2437 / 3887
62.69%
Diff 57 / 186
-0.12%
57 / 186
-0.12%
6 / 10
0.04%
43 / 45
0.38%

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

@azure/communication-react jest test coverage for beta.

Lines Statements Functions Branches
Base 58580 / 95109
61.59%
58580 / 95109
61.59%
1180 / 2709
43.55%
3417 / 5799
58.92%
Current 58695 / 95334
61.56%
58695 / 95334
61.56%
1186 / 2719
43.61%
3412 / 5830
58.52%
Diff 115 / 225
-0.03%
115 / 225
-0.03%
6 / 10
0.06%
-5 / 31
-0.4%

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

📦 Chat bundle size

Bundle Base Size (bytes) Current Size (bytes) Change Delta (bytes)
build.bundle.js 1793916 1782394 ⬇️ decreased -11522
398.bundle.js 375829 375829 ➖ unchanged 0
450.bundle.js 4454 4454 ➖ unchanged 0
82.bundle.js 28161 28139 ⬇️ decreased -22
91.bundle.js 4102 4102 ➖ unchanged 0

Total change: -11.3 KB ⬇️

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

📦 CallWithChat bundle size

Bundle Base Size (bytes) Current Size (bytes) Change Delta (bytes)
build.bundle.js 7758336 9229390 ⚠️ increased 1471054
450.bundle.js 4470 4470 ➖ unchanged 0
580.bundle.js 12407938 12407938 ➖ unchanged 0
727.bundle.js 372564 372564 ➖ unchanged 0
82.bundle.js 28177 28155 ⬇️ decreased -22
91.bundle.js 4118 4118 ➖ unchanged 0

Total change: +1436.6 KB ⚠️

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

📦 Calling bundle size

Bundle Base Size (bytes) Current Size (bytes) Change Delta (bytes)
build.bundle.js 6767681 8250147 ⚠️ increased 1482466
580.bundle.js 12407925 12407925 ➖ unchanged 0

Total change: +1447.7 KB ⚠️

@mgamis-msft
mgamis-msft enabled auto-merge (squash) October 7, 2026 15:44
@mgamis-msft
mgamis-msft merged commit 165ece0 into main Oct 7, 2026
88 of 90 checks passed
@mgamis-msft
mgamis-msft deleted the mgamis/fix-latent-clock-skew branch October 7, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants