fix(ui): harden issue comment editor sync

This commit is contained in:
dotta 2026-04-09 06:12:43 -05:00
parent 996c7eb727
commit 327eadb45c
4 changed files with 59 additions and 2 deletions

View file

@ -36,6 +36,7 @@ import {
applyOptimisticIssueCommentUpdate,
createOptimisticIssueComment,
flattenIssueCommentPages,
getNextIssueCommentPageParam,
isQueuedIssueComment,
matchesIssueRef,
mergeIssueComments,
@ -416,7 +417,7 @@ export function IssueDetail() {
enabled: !!issueId,
initialPageParam: null as string | null,
getNextPageParam: (lastPage) =>
lastPage.length === ISSUE_COMMENT_PAGE_SIZE ? lastPage[lastPage.length - 1]?.id : undefined,
getNextIssueCommentPageParam(lastPage, ISSUE_COMMENT_PAGE_SIZE),
placeholderData: keepPreviousData,
});
const comments = useMemo(