Skip to content

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

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

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

Conversation

@sdivyanshu90

Copy link
Copy Markdown
Contributor

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
Contributor Author

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

@thdxr

thdxr commented Oct 10, 2026

Copy link
Copy Markdown
Member

This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2.

— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

@thdxr thdxr closed this Oct 10, 2026
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

2 participants