Skip to content

fix: make GeoPoint portable through json - #56

Merged
fwal merged 4 commits into
mainfrom
fwal/portable-geopoint
Jul 19, 2026
Merged

fix: make GeoPoint portable through json#56
fwal merged 4 commits into
mainfrom
fwal/portable-geopoint

Conversation

@fwal

@fwal fwal commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Make GeoPoint as portable as the other types

Summary by CodeRabbit

  • New Features

    • Added Firestore GeoPoint model support for select, insert, update, and JSON operations.
    • GeoPoint values now round-trip safely between native Firestore instances and JSON-compatible latitude/longitude objects.
    • Exported GeoPoint helpers through the Firestore API.
  • Tests

    • Added coverage for GeoPoint encoding, decoding, and JSON serialization scenarios.
  • Documentation

    • Improved formatting of the built-in field helpers documentation.

@fwal fwal added this to the 1.0 - Effect v4 milestone Jul 19, 2026
@fwal fwal self-assigned this Jul 19, 2026
@fwal fwal added the 🐛 fix Something is broken or doesn't work properly label Jul 19, 2026
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds Firestore GeoPoint model support with database and JSON representations, exports the new helper through public Firestore modules, tests its transformations, and reformats helper documentation. Package manifest edits only adjust end-of-file formatting.

Changes

Firestore GeoPoint support

Layer / File(s) Summary
GeoPoint schema and model mapping
packages/effect-firebase/src/lib/firestore/schema/geopoint.ts, packages/effect-firebase/src/lib/firestore/model/geopoint.ts, packages/effect-firebase/src/lib/firestore/model/geopoint.spec.ts
Defines GeoPoint instance validation, database mappings, JSON representations, and tests for select, insert, and JSON round trips.
Public exports and helper documentation
packages/effect-firebase/src/lib/firestore/model/index.ts, packages/effect-firebase/src/lib/firestore/firestore.ts, packages/effect-firebase/README.md
Re-exports the GeoPoint helper and reformats the built-in field helpers table without changing its described behaviors.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

I’m a bunny with points in a cloud,
Latitude, longitude—coordinates proud.
Through JSON I hop, then return as new,
A Firestore GeoPoint, sturdy and true.
Barrels now share what my models can do!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: making GeoPoint portable through JSON.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@fwal fwal changed the title Make GeoPoint portable through json fix: make GeoPoint portable through json Jul 19, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/effect-firebase/README.md`:
- Around line 37-46: Add the new Model.GeoPoint helper to the built-in field
helpers table in the README, including a concise description of its Firestore
geographic-point behavior consistent with the surrounding entries.

In `@packages/effect-firebase/src/lib/firestore/model/geopoint.ts`:
- Around line 1-4: Remove the unused Schema import from geopoint.ts while
preserving the Model, VariantSchema, and FirestoreSchema imports.
🪄 Autofix (Beta)

✅ Autofix completed


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7d41de7a-c976-4ee5-8d8c-c7aad1d969d0

📥 Commits

Reviewing files that changed from the base of the PR and between dd31795 and ea3615f.

📒 Files selected for processing (10)
  • example/app/package.json
  • example/backend/package.json
  • example/shared/package.json
  • package.json
  • packages/effect-firebase/README.md
  • packages/effect-firebase/src/lib/firestore/firestore.ts
  • packages/effect-firebase/src/lib/firestore/model/geopoint.spec.ts
  • packages/effect-firebase/src/lib/firestore/model/geopoint.ts
  • packages/effect-firebase/src/lib/firestore/model/index.ts
  • packages/effect-firebase/src/lib/firestore/schema/geopoint.ts

Comment thread packages/effect-firebase/README.md
Comment thread packages/effect-firebase/src/lib/firestore/model/geopoint.ts Outdated
@fwal
fwal changed the base branch from next to main July 19, 2026 13:22
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Fixes Applied Successfully

Fixed 1 file(s) based on 1 unresolved review comment.

Files modified:

  • packages/effect-firebase/README.md

Commit: 0af27fa138ac24d5065de1694415544791de3173

The changes have been pushed to the fwal/portable-geopoint branch.

Time taken: 3m 59s

Fixed 1 file(s) based on 1 unresolved review comment.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
@fwal
fwal merged commit 8556bb8 into main Jul 19, 2026
5 checks passed
@fwal
fwal deleted the fwal/portable-geopoint branch July 19, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 fix Something is broken or doesn't work properly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant