Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a parsing bug where numeric properties with a value of 0 were being incorrectly filtered out during entity parsing. The fix changes the condition from checking for truthy values (if (rawValue)) to explicitly checking for undefined (if (rawValue !== undefined)), and adds fallback logic to handle cases where the API returns numbers as strings instead of numeric values.
Changes:
- Updated condition checks in entity parsing to use
!== undefinedinstead of truthy checks to properly handle falsy values like 0 - Added fallback logic in
convertPropertyValueto parse numbers from string fields when the number field is null - Added temporary test script and configuration for manual testing
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/hypergraph/src/utils/convert-property-value.ts | Enhanced number property parsing with fallback to string field and explicit undefined handling |
| packages/hypergraph/src/utils/convert-relations.ts | Changed condition to !== undefined for proper handling of falsy numeric values |
| packages/hypergraph/src/entity/find-one-public.ts | Changed condition to !== undefined for proper handling of falsy numeric values |
| packages/hypergraph/src/entity/find-many-public.ts | Changed condition to !== undefined for proper handling of falsy numeric values |
| apps/events/test-script.ts | Added temporary manual test script (should be removed) |
| apps/events/package.json | Added script command for running test script (should be removed if test-script.ts is removed) |
| .claude/settings.local.json | Added permissions for test script execution |
| .changeset/fix-number-property-parsing.md | Added changeset documentation for the bug fix |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2c5b57e to
436fe4c
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.