Skip to content

fix(app): validate comment selection coordinates - #51322

Open
sdivyanshu90 wants to merge 1 commit into
anomalyco:devfrom
sdivyanshu90:comment-selection-guard
Open

sdivyanshu90 wants to merge 1 commit into
anomalyco:devfrom
sdivyanshu90:comment-selection-guard

Conversation

@sdivyanshu90

Copy link
Copy Markdown

Issue for this PR

Closes #51319

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Requires all four comment selection coordinates to already be finite numbers before constructing a selection. Malformed coordinates such as null are ignored instead of being coerced to line zero, while the rest of the comment metadata remains available.

How did you verify your code works?

Added focused tests for null coordinates and a valid numeric selection, then ran the comment-note unit test from packages/app: 2 tests passed with 3 assertions.

Screenshots / recordings

Not applicable; this is a non-UI metadata parsing fix.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@sdivyanshu90

Copy link
Copy Markdown
Author

Hi @Hona, could you please review this PR whenever you have some time? Thanks!

This branch has not been deployed

No deployments
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.

Null comment coordinates become a line-zero selection

1 participant