FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(android): accept ISO heartbeat timestamps by alprojectservices-create · Pull Request #358 · textbee/textbee · GitHub

fix(android): accept ISO heartbeat timestamps - #358

Open
alprojectservices-create wants to merge 1 commit into
textbee:mainfrom
alprojectservices-create:fix/android-heartbeat-iso-timestamp
Open

alprojectservices-create wants to merge 1 commit into
textbee:mainfrom
alprojectservices-create:fix/android-heartbeat-iso-timestamp

Conversation

alprojectservices-create commented Sep 20, 2026
edited by coderabbitai Bot
Loading

Copy link
Copy Markdown

Summary

The gateway heartbeat endpoint returns lastHeartbeat as an ISO-8601 JSON string because the API response field is a JavaScript Date. The Android response DTO currently declares the field as Long, causing Gson 2.9.0 to throw NumberFormatException while deserializing an otherwise successful heartbeat response.

This change aligns the Android DTO with the API contract by changing lastHeartbeat to nullable String.

Reproduction

A response containing:

2026-09-20T19:53:31.278Z

fails before this change with JsonSyntaxException caused by NumberFormatException.

Verification

  • Added HeartbeatResponseDTOTest.acceptsIso8601TimestampWithMillisecondsAndZuluSuffix.
  • The regression test fails on the unpatched DTO.
  • The targeted test passes after the DTO change.
  • The full available testProdReleaseUnitTest suite passes.

Scope

No heartbeat interval, retry policy, API endpoint, or server-side behavior is changed.

Summary by CodeRabbit

  • Bug Fixes
    • Improved heartbeat timestamp handling to support ISO 8601 timestamps, including millisecond precision and UTC indicators.
    • Heartbeat responses can now represent missing timestamp values without assuming a default time.

vercel Bot commented Sep 20, 2026

Copy link
Copy Markdown

@alprojectservices-create is attempting to deploy a commit to the Nuver Labs Team on Vercel.

A member of the Team first needs to authorize it.

coderabbitai Bot commented Sep 20, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info ⚙️ Run configuration

Configuration used: Repository: textbee/textbee/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: d9381eee-e9db-4c6d-9976-24f7b1dbd260

📥 Commits

Reviewing files that changed from the base of the PR and between 36b8d30 and 13cd258.

📒 Files selected for processing (2)
  • android/app/src/main/java/com/vernu/sms/dtos/HeartbeatResponseDTO.kt
  • android/app/src/test/java/com/vernu/sms/dtos/HeartbeatResponseDTOTest.kt

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

HeartbeatResponseDTO.lastHeartbeat now uses a nullable String. A unit test verifies deserialization of an ISO 8601 timestamp with milliseconds and a Z suffix.

Changes

Heartbeat timestamp handling

Layer / File(s) Summary
Timestamp contract and deserialization test
android/app/src/main/java/com/vernu/sms/dtos/HeartbeatResponseDTO.kt, android/app/src/test/java/com/vernu/sms/dtos/HeartbeatResponseDTOTest.kt
lastHeartbeat changes from Long = 0 to String? = null. The test verifies that an ISO 8601 timestamp is deserialized and preserved.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Suggested reviewers: vernu

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ 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%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: Android now accepts ISO heartbeat timestamps.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1 🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Create a new PR

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.

This branch has not been deployed

No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL