Skip to content

fix(android): safer heartbeat name log - #345

Open
wized2 wants to merge 1 commit into
textbee:mainfrom
wized2:fix/heartbeat-log-20260918c
Open

wized2 wants to merge 1 commit into
textbee:mainfrom
wized2:fix/heartbeat-log-20260918c

Conversation

@wized2

@wized2 wized2 commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Use local name after null check for logging.

Summary by CodeRabbit

  • Bug Fixes
    • Prevented a potential crash when the heartbeat service returns no device name.
    • Preserved empty-name handling for heartbeat responses.

@vercel

vercel Bot commented Sep 18, 2026

Copy link
Copy Markdown

@wized2 is attempting to deploy a commit to the Nuver Labs Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 6277264f-f346-40de-8d46-89907b4bd664

📥 Commits

Reviewing files that changed from the base of the PR and between daf0d2e and 18be250.

📒 Files selected for processing (1)
  • android/app/src/main/java/com/vernu/sms/helpers/HeartbeatHelper.kt

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


📝 Walkthrough

Walkthrough

The heartbeat helper now stores an empty string when the response device name is null. This replaces a non-null assertion that could cause a null pointer exception.

Changes

Heartbeat handling

Layer / File(s) Summary
Safe device name storage
android/app/src/main/java/com/vernu/sms/helpers/HeartbeatHelper.kt
sendHeartbeat uses body.name ?: "" when storing the device name in shared preferences.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 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 1 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 Android heartbeat logging safety fix.
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

Warning

Tools execution failed with the following error:

Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)


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
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