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

@ -102,6 +102,14 @@ export function flattenIssueCommentPages(
return sortIssueComments((pages ?? []).flatMap((page) => page));
}
export function getNextIssueCommentPageParam(
lastPage: ReadonlyArray<IssueComment> | undefined,
pageSize: number,
): string | undefined {
if (!lastPage || lastPage.length < pageSize) return undefined;
return lastPage[lastPage.length - 1]?.id;
}
export function upsertIssueComment(
comments: IssueComment[] | undefined,
nextComment: IssueComment,