From c2b4e4281faa600e1adf1bd944282ef66419f34e Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Fri, 13 Nov 2026 17:31:49 -0800 Subject: [PATCH] fix(tasks): show cached GitHub rows on filter change and keep issue-number order (#42128) * fix(tasks): show cached GitHub rows instead of the skeleton on filter change Filter handlers set tasksFiltering and only the forced fetch settlement cleared it, so rows the landing run had already painted from the per-query cache stayed hidden behind the skeleton. The landing run now clears the flag when every selected repo (or the restored page) is cached for the applied query; the forced refetch still runs under the toolbar spinner and replaces the rows in place. Rebuilds #41998 by @piotrpawlik (fixes #41997). Co-authored-by: Piotr Pawlik * fix(tasks): keep GitHub Tasks pages in issue-number order materializeTaskPageItemList re-sorted every page by updatedAt while the host search, the cross-repo aggregate, the landing pre-paint and mobile all order by issue number. A triage edit moved old issues to the top, and the landing probe saw a different key order and reset pagination. Use the shared sortWorkItemsByNumber so retained pending rows keep their number slot too. Rebuilds #41999 by @bbingz (fixes #41987). Co-authored-by: Bing.Z * test(tasks): make landing tests revert-sensitive; scope refetch comment Address C1 review: every landing case now fails without the cached-rows fix, names say what they verify, and the comment no longer claims typed search forces the refetch. * test(tasks): replace landing test casts with annotations * fix(tasks): hold GitHub pagination while a forced refresh is in flight Cached rows now show during a filter switch's forced refetch, which made the pager live; opening page 2 then got undone when the refetch replaced every page. Disable the pager until it lands, as the phone does while revalidating. Also drops two landing tests that covered no new behavior. * fix(tasks): hold GitHub pagination for any in-flight landing fetch A typed search over stale cached rows lands without a forced fetch, so the pager was still live and its page could be undone when the landing fetch replaced the pages. Track the landing fetch itself, as the phone holds paging while any list load revalidates. Shares the retry-key release between the fetch's settle paths to keep the run under the file-length limit. --------- Co-authored-by: Piotr Pawlik Co-authored-by: Bing.Z Co-authored-by: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> --- .../components/task-page/PaginationBar.tsx | 8 +- .../task-page/github/listing/List.tsx | 2 + .../use-task-page-github-list-state.ts | 4 + ...ge-github-work-item-mutation-pages.test.ts | 63 +++++++ ...sk-page-github-work-item-mutation-pages.ts | 6 +- .../task-page-github-landing-refresh-model.ts | 1 + ...sk-page-github-landing-refresh-run.test.ts | 159 ++++++++++++++++++ .../task-page-github-landing-refresh-run.tsx | 60 +++---- 8 files changed, 267 insertions(+), 36 deletions(-) create mode 100644 src/renderer/src/components/task-page/github/mutations/task-page-github-work-item-mutation-pages.test.ts create mode 100644 src/renderer/src/components/task-page/github/refresh/task-page-github-landing-refresh-run.test.ts diff --git a/src/renderer/src/components/task-page/PaginationBar.tsx b/src/renderer/src/components/task-page/PaginationBar.tsx index c8d09a17726..b655bee3bc8 100644 --- a/src/renderer/src/components/task-page/PaginationBar.tsx +++ b/src/renderer/src/components/task-page/PaginationBar.tsx @@ -7,11 +7,13 @@ export function PaginationBar({ currentPage, totalPages, loadingTarget, + disabled = false, onPageChange }: { currentPage: number totalPages: number loadingTarget: number | null + disabled?: boolean onPageChange: (page: number) => void }): React.JSX.Element { const t = useTranslate() @@ -32,7 +34,7 @@ export function PaginationBar({ >