Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): preserve citations when adding review comments #19955

Closedjakeleventhal(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/19955/headopened View on GitHub

Showing 6 changed files with 6 additions and 4 deletions (loading 3).

x
0 of 6 viewed, 6 left
2 additions and 1 deletionapps/web/src/components/pullRequest/guide/GuideExcerpt.tsxModified
View file
@@ -18,6 +18,7 @@
import { PREFERRED_HIGHLIGHTER } from "~/lib/syntaxHighlighting";
import {
buildDiffReviewComment,
+ diffReviewSelectionId,
resolveDiffReviewAnchor,
type ReviewCommentContext,
} from "~/reviewCommentContext";
@@ -265,7 +266,7 @@
const askAgent = (request: string) => {
if (draft === null || onAskAgent === null) return;
const comment = buildDiffReviewComment({
- id: `pull-request-guide:${excerpt.path}:${draft.range.start}:${draft.range.end}`,
+ id: `pull-request-guide:${diffReviewSelectionId(excerpt.path, draft.range)}`,
sectionId: `pull-request-guide:${excerpt.path}`,
sectionTitle: "Review guide",
filePath: excerpt.path,
2 additions and 1 deletionapps/web/src/components/pullRequest/PullRequestCodeTab.tsxModified
View file
@@ -74,6 +74,7 @@
import { createPullRequestDiffFileContentsLoader } from "~/lib/diffFileContents";
import {
buildDiffReviewComment,
+ diffReviewSelectionId,
resolveDiffReviewAnchor,
type ReviewCommentContext,
} from "~/reviewCommentContext";