Skip to content

refactor: remove dead normalizeMarkerDescriptor helper - #57

Open
jkasprzyk17 wants to merge 1 commit into
mainfrom
refactor/remove-dead-normalize-marker-descriptor
Open

refactor: remove dead normalizeMarkerDescriptor helper#57
jkasprzyk17 wants to merge 1 commit into
mainfrom
refactor/remove-dead-normalize-marker-descriptor

Conversation

@jkasprzyk17

@jkasprzyk17 jkasprzyk17 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

What

Deletes normalizeMarkerDescriptor (singular) from package/src/utils/enteringAnimation.ts, along with the MarkerDescriptor / PublicMarkerDescriptor type imports it was the only user of in that file.

Why

It was dead code, and it was also wrong:

  • No callers. A repo-wide grep for normalizeMarkerDescriptor\b matched only its own definition — nothing in package/src, package/type-tests or example — and it was not re-exported from package/src/index.ts.
  • Wrong if it had ever been called. It duplicated normalizeDescriptor in package/src/overlays/normalizeMarkerDescriptors.ts but dropped image, anchor, centerOffset, rotation, flat and opacity. Any future caller would have silently lost those marker properties.

normalizeEnteringAnimation in the same file stays — it is still used by normalizeMarkerDescriptors.ts, which is the complete and correct implementation.

Verification

No behaviour change: nothing referenced the deleted symbol before or after.

Check Result
bun run lint pass
bun run typecheck pass
cd package && bun test src/ 50 pass, 0 fail

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

normalizeMarkerDescriptor had no callers anywhere in the repo and was
not re-exported from the package entrypoint.

It also duplicated normalizeDescriptor in
overlays/normalizeMarkerDescriptors.ts while dropping image, anchor,
centerOffset, rotation, flat and opacity, so any future caller would
have silently lost those marker properties.

Drop it along with the MarkerDescriptor / PublicMarkerDescriptor type
imports it was the only user of in that file.
@github-actions

Copy link
Copy Markdown

React Doctor found 7 issues in 4 files · 2 errors & 5 warnings · score 64 / 100 (Needs work) · full project

Errors

5 warnings

App.tsx

  • ⚠️ L729 Side effect inside a state updater function no-side-effect-in-state-updater-function
  • ⚠️ L734 Side effect inside a state updater function no-side-effect-in-state-updater-function
  • ⚠️ L735 Side effect inside a state updater function no-side-effect-in-state-updater-function

package.json

  • ⚠️ L0 unused-dev-dependency

src/hooks/index.ts

  • ⚠️ L0 unused-file

Reviewed by React Doctor for commit 0e80862. See inline comments for fixes.

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 50965f89-011c-4a95-8a6c-1dc3089780bb

📥 Commits

Reviewing files that changed from the base of the PR and between 1c38c93 and 0e80862.

📒 Files selected for processing (1)
  • package/src/utils/enteringAnimation.ts

Included review availability: 3 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


📝 Walkthrough

Summary by CodeRabbit

  • Refactor
    • Removed unused internal marker-processing functionality.
    • No changes to entering-animation behavior.

Walkthrough

The entering-animation utility removes unused marker descriptor imports and the exported normalizeMarkerDescriptor function. Entering-animation normalization remains unchanged.

Changes

Entering animation utility

Layer / File(s) Summary
Remove marker descriptor normalization
package/src/utils/enteringAnimation.ts
The utility removes marker descriptor type imports and the exported normalizeMarkerDescriptor function. Entering-animation normalization remains unchanged.

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

Merge Risk: ⚪ Minimal · up to 0e808

This localized cleanup removes dead code without changing referenced behavior, and no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: piotr-graczyk-dev

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Security Check ✅ Passed PASS. The commit changes only package/src/utils/enteringAnimation.ts: it removes an unreferenced helper and type imports. The parent revision shows no callers in package/src, package/type-tests,…
Full details: Security Check

Explanation

PASS. The commit changes only package/src/utils/enteringAnimation.ts: it removes an unreferenced helper and type imports. The parent revision shows no callers in package/src, package/type-tests, or example, and package/src/index.ts does not export the helper. Existing normalization still uses normalizeEnteringAnimation through normalizeMarkerDescriptors.ts, with no changed attacker-controlled input path or security sink. No medium, high, or critical vulnerability was introduced.

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


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.

1 participant