Repository navigation
fix(mobile): reject partially numeric line params in the comment composer - #6775
Merged
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe comment-composer now routes Files Reviewed (5 files)
Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0 Review guidance: REVIEW.md from base branch |
iscekic
marked this pull request as draft
September 28, 2026 08:42
iscekic
marked this pull request as ready for review
September 28, 2026 08:46
iscekic
marked this pull request as draft
September 28, 2026 08:54
iscekic
marked this pull request as ready for review
September 28, 2026 09:07
iscekic
marked this pull request as draft
September 28, 2026 09:19
iscekic
marked this pull request as ready for review
September 28, 2026 09:22
iscekic
marked this pull request as draft
September 28, 2026 09:25
iscekic
marked this pull request as ready for review
September 28, 2026 09:31
pandemicsyn
approved these changes
Sep 28, 2026
This was referenced Sep 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog for users
Changelog for maintainers
E2E proof
The comment-composer's local parsePositiveInt uses Number.parseInt, so a deep link with a partial-numeric line or startLine (
line=1.5,line=12abc,startLine=9xon the GitHub route) is accepted as 1/12/9 and an inline comment is opened and posted to a line the user never selected; route-params.ts already ships parsePositiveIntParam for exactly this guard, and only the layout-validatednumbersegment is safe.Code trace:
apps/mobile/src/lib/pr-review/comment-composer-params.ts:1 changed in 814266ede3ce7b8e294ff6ce774fb2759b2167dc. Sense check (jev): probability 0.93Changed lines
commentTrailingControlsClearanceDp is dead production code: no component calls it (comment-row.tsx only names it in a comment) and only its own unit test does, so the test recomputes the expression instead of guarding the row's actual gap-3 and hit slops and cannot catch a change to them.
Code trace:
apps/mobile/src/lib/pr-review/comment-trailing-controls.ts:12 changed in 814266ede3ce7b8e294ff6ce774fb2759b2167dc. Sense check (model): The diff deletes the unreferencedexport function commentTrailingControlsClearanceDp()in comment-trailing-controls.ts:12 and rewrites the stale comment, removing exactly the dead production code the claim names.Changed lines
Owner request