Skip to content

fix: compare all overlay descriptor fields - #117

Open
TayfurYldz wants to merge 1 commit into
gmi-software:mainfrom
TayfurYldz:fix/95-overlay-descriptor-equality
Open

TayfurYldz wants to merge 1 commit into
gmi-software:mainfrom
TayfurYldz:fix/95-overlay-descriptor-equality

Conversation

@TayfurYldz

@TayfurYldz TayfurYldz commented Sep 16, 2026

Copy link
Copy Markdown

Summary

  • include zIndex in polyline and polygon descriptor equality
  • compare polygon hole rings structurally so hole changes reach native
  • extend field-coverage tests for z-index, hole add/remove, ring-count and coordinate changes

Closes #95

Validation

  • regression proof against unmodified comparator: 8 new cases failed
  • targeted comparator suite: 85 pass, 0 fail
  • bun run --filter react-native-better-maps test: 171 pass, 0 fail
  • bun run nitrogen
  • bun run typecheck
  • bun run lint
  • git diff --check

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 443aa321-c99a-4461-8e4a-cb17844c0f01

📥 Commits

Reviewing files that changed from the base of the PR and between ccbc2a8 and 2122845.

📒 Files selected for processing (2)
  • package/src/overlays/__tests__/descriptorEquality.test.ts
  • package/src/overlays/descriptorEquality.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Overlay updates now correctly detect changes to polyline and polygon stacking order.
    • Polygon changes involving interior holes—such as added, removed, or modified rings—are now recognized reliably.
    • Improved comparison of nested polygon coordinates helps ensure overlays refresh when their geometry changes.

Walkthrough

The overlay descriptor comparators now detect changes to polyline and polygon zIndex values and polygon holes. Tests cover coordinate changes, ring-count changes, and undefined fields.

Changes

Overlay descriptor equality

Layer / File(s) Summary
Descriptor comparator updates
package/src/overlays/descriptorEquality.ts
Adds nested coordinate-ring comparison. Compares zIndex for polylines and polygons, and compares holes for polygons.
Equality coverage updates
package/src/overlays/__tests__/descriptorEquality.test.ts
Adds fixtures and cases for changed, cleared, added, and structurally modified zIndex and holes values.

Priority: ➖ Normal

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

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 21228

The overlay equality update covers the intended descriptor changes without an identified remaining merge risk.

🚥 Pre-merge checks | ✅ 5 | ❌ 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 5 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title uses the required fix prefix, stays concise at 42 characters, and accurately describes the descriptor equality changes.
Description check ✅ Passed The description directly explains the zIndex and polygon hole comparison changes, test coverage, validation results, and linked issue.
Linked Issues check ✅ Passed The implementation satisfies #95. polylineDescriptorsEqual compares zIndex. polygonDescriptorsEqual compares zIndex and uses coordinateRingsEqual for ring count, added or removed holes, and …
Out of Scope Changes check ✅ Passed The reviewed changes are limited to descriptor equality logic and its automated tests. These changes directly implement #95. No unrelated production behavior or unrelated test changes are present.
Security Check ✅ Passed No medium-, high-, or critical-severity vulnerability was introduced. The PR only adds in-memory comparisons for zIndex and polygon holes in descriptorEquality.ts, plus tests. These fields were …
  • Fix all pre-merge checks with AI

Comment @coderabbitai help to get the list of available commands.

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.

Overlay diff misses polyline/polygon zIndex and polygon holes

1 participant