Skip to content

Conversation

@abelonogov-ld
Copy link
Contributor

@abelonogov-ld abelonogov-ld commented Nov 13, 2025

  • Fix lossing last touchPoint
  • Adjust throttling constants

Note

Adjusts touch move throttling and long-path flushing to avoid dropping the last touch point; updates TestApp to production config.

  • Replay/Touch handling:
    • Update TouchConstants: replace touchMoveMaxDuration with touchMoveThrottle and touchPathDuration in Sources/LaunchDarklyObservability/UIInteractions/TouchIntepreter.swift.
    • On .moved:
      • Flush touchPath when track duration exceeds touchPathDuration; append last point, emit .touchPath, reset track start/point, and continue.
      • Throttle move points by touchMoveThrottle based on the last point timestamp.
      • Continue appending points only when exceeding tap-distance threshold; update end/target.
    • flushMovements(...): after emitting .touchPath, reset track start using the last point to retain continuity and prevent losing the last point.
  • TestApp:
    • Switch to production mobileKey and serviceName in TestApp/Sources/AppDelegate.swift; comment out staging config.

Written by Cursor Bugbot for commit 7c767b7. This will update automatically on new commits. Configure here.

guard duration >= TouchConstants.touchMoveThrottle else {
return
}
}
Copy link

Choose a reason for hiding this comment

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

Bug: Inconsistent Throttle Timing Post-Flush

After flushing touch points when track duration exceeds touchPathDuration, the throttle check is skipped for subsequent points because track.points is empty. The previous implementation used track.start as a fallback timestamp when no points existed, ensuring consistent throttling. Without this fallback, points immediately following a flush bypass time-based throttling and rely only on distance checks, potentially capturing points more frequently than touchMoveThrottle allows.

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I want that more frequently

@abelonogov-ld abelonogov-ld changed the title Fix: touch throttle fix: touch throttle Nov 13, 2025
@abelonogov-ld abelonogov-ld merged commit 6d1cd15 into main Nov 14, 2025
5 checks passed
@abelonogov-ld abelonogov-ld deleted the andrey/fix-touch-throttle branch November 14, 2025 00:48
abelonogov-ld added a commit that referenced this pull request Nov 14, 2025
abelonogov-ld added a commit that referenced this pull request Nov 14, 2025
abelonogov-ld pushed a commit that referenced this pull request Nov 15, 2025
🤖 I have created a release *beep* *boop*
---


##
[0.10.0](0.9.2...0.10.0)
(2025-11-15)


### Features

* ignore masking
([#80](#80))
([1372064](1372064))
* options refactor
([#75](#75))
([b442cbc](b442cbc))
* refactor instrumentation options
([#77](#77))
([ebc2e24](ebc2e24))


### Bug Fixes

* touch throttle
([#81](#81))
([6d1cd15](6d1cd15))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> Bumps SDK to 0.10.0 and updates the changelog with new features and a
bug fix.
> 
> - **Release**: bump version to `0.10.0`
>   - Update `.` version in `.release-please-manifest.json`
> - Update `sdkVersion` in
`Sources/LaunchDarklyObservability/Version.swift`
> - **Docs**: refresh `CHANGELOG.md` with features (ignore masking,
options refactor, instrumentation options refactor) and a bug fix (touch
throttle)
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
1bf72a3. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants