Skip to content

Fix createdAt and expiresAt returning numbers instead of Date objects#855

Closed
davidtruong wants to merge 1 commit intomasterfrom
claude/fix-rn-sdk-581-iHgC0
Closed

Fix createdAt and expiresAt returning numbers instead of Date objects#855
davidtruong wants to merge 1 commit intomasterfrom
claude/fix-rn-sdk-581-iHgC0

Conversation

@davidtruong
Copy link
Copy Markdown

setUTCMilliseconds() returns a numeric timestamp, not a Date object, causing type mismatches and crashes on Android. Replace with new Date() constructor which correctly creates Date objects from millisecond timestamps. Also removes the downstream typeof workaround in defaultDateMapper and the @ts-ignore suppression.

Fixes #581

https://claude.ai/code/session_016EHrcqQDgexLB5xApCxrZj

🔹 JIRA Ticket(s) if any

✏️ Description

Please provide a brief description of what this pull request does.

setUTCMilliseconds() returns a numeric timestamp, not a Date object,
causing type mismatches and crashes on Android. Replace with new Date()
constructor which correctly creates Date objects from millisecond
timestamps. Also removes the downstream typeof workaround in
defaultDateMapper and the @ts-ignore suppression.

Fixes #581

https://claude.ai/code/session_016EHrcqQDgexLB5xApCxrZj
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Lines Statements Branches Functions
Coverage: 62%
63.02% (392/622) 40.39% (103/255) 61.5% (139/226)

@qltysh
Copy link
Copy Markdown

qltysh bot commented Apr 7, 2026

Qlty

Coverage Impact

⬇️ Merging this pull request will decrease total coverage on master by 0.05%.

Modified Files with Diff Coverage (2)

RatingFile% DiffUncovered Line #s
Coverage rating: B Coverage rating: B
src/inApp/classes/IterableInAppMessage.ts100.0%
Coverage rating: F Coverage rating: F
src/inbox/classes/IterableInboxDataModel.ts0.0%214
Total66.7%
🤖 Increase coverage with AI coding...

In the `claude/fix-rn-sdk-581-iHgC0` branch, add test coverage for this new code:

- `src/inbox/classes/IterableInboxDataModel.ts` -- Line 214

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@davidtruong
Copy link
Copy Markdown
Author

Things are fixed

@davidtruong davidtruong closed this Apr 8, 2026
@davidtruong davidtruong deleted the claude/fix-rn-sdk-581-iHgC0 branch April 8, 2026 14:43
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.

IterableInAppMessage.createdAt type seems inconsistent with what's specified in the TS declaration - causing crashes

2 participants