Skip to content

Pebblekit buffering improvements#130

Closed
matejdro wants to merge 2 commits intocoredevices:masterfrom
matejdro:pebblekit-improvements
Closed

Pebblekit buffering improvements#130
matejdro wants to merge 2 commits intocoredevices:masterfrom
matejdro:pebblekit-improvements

Conversation

@matejdro
Copy link
Copy Markdown
Contributor

@matejdro matejdro commented Mar 7, 2026

This PR attempts to address two issues with the current buffering system:

  1. If the user closes the app and then quickly reopens it within 2.5 seconds, app will still receive stale AppMessages. I have attempted to fix this by draining all messages on the AppRunStateStop command. I think AppRunStateStop always comes last, so this should not cause major issues? Or is the out-of-order also possible here?

  2. message timeout applied to all messages, not just the too-early ones. This meant that if the downstream app is taking its sweet time processing the message, we might drop the messages just because the consumer is too slow. I have changed it so we only check it against the app start time , not the current time. So only messages sent way before app started are dropped.

Now, the issue with this PR is that I could not really test it. As part of the PT2 Alpha program, I was told to keep the official Pebble app installed and running for a longer time to gather logs for some issues that I'm still experiencing. So I cannot replace it with the test version temporarily. We can keep this PR open until I have the chance to test it or if you feel the code is okay, we can merge it.

@matejdro matejdro marked this pull request as draft March 20, 2026 19:23
@matejdro
Copy link
Copy Markdown
Contributor Author

matejdro commented Mar 20, 2026

This worked well to fix the app reopen issue, but it does not resolve channels already claimed errors. I'm testing an alternative solution now.

@matejdro matejdro closed this Mar 20, 2026
@matejdro matejdro deleted the pebblekit-improvements branch March 20, 2026 19:42
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.

1 participant