fix(sidebar): re-read displayed range when paging window drifts

This commit is contained in:
zipg authored and GitHub committed 2026-09-25 16:00:09 +08:00
1 parent 577154cf5a
commit 94a8fd6790
5 files changed
+352 -63

No files matched your search

+12
View File
@@ -112,6 +112,18 @@ function foldedPartitionObjectLookupKey(objectType: string, schema: string | und
return `${objectType}\0${(schema || "").toLowerCase()}\0${name.toLowerCase()}`;
}
/**
* Folded identity of one row of a paged object list. Paged loads remember the
* row that was expected to open the next page (the peek row the previous page
* fetched but did not show) so a window that shifted under concurrent DDL can be
* detected before an unaligned page is appended. Kept case-insensitive on
* purpose: an anchor must never look "changed" because the server cased a name
* differently between two responses.
*/
export function tablePageRowAnchorKey(name: string, schema?: string | null, parentName?: string | null) {
return `${(schema || "").toLowerCase()}\0${(parentName || "").toLowerCase()}\0${name.toLowerCase()}`;
}
type PrefixSortInfo = {
rootName: string;
leadingSegments: number;