Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): paginate large thread history to stop the server running out of memory #3510

Closedolafura(GitHub profile, opens in a new tab)wants to merge 13 commits intomain fromrefs/pull/3510/headopened View on GitHub

Showing 36 changed files with 50 additions and 2 deletions (loading 33).

x
0 of 36 viewed, 36 left
6 additions and 0 deletionsapps/mobile/src/features/threads/ThreadDetailScreen.tsxModified
View file
@@ -62,6 +62,9 @@
/** Message sync status for the selected thread (drives the composer status pill). */
readonly threadSyncStatus?: EnvironmentThreadStatus;
readonly activeThreadBusy: boolean;
+ readonly hasMoreOlderActivities: boolean;
+ readonly loadingOlderActivities: boolean;
+ readonly onLoadOlderActivities: () => void;
readonly environmentId: EnvironmentId;
readonly projectWorkspaceRoot: string | null;
readonly threadCwd: string | null;
@@ -371,6 +374,9 @@
usesAutomaticContentInsets={props.usesAutomaticContentInsets}
onHeaderMaterialVisibilityChange={props.onHeaderMaterialVisibilityChange}
skills={selectedProviderSkills}
+ hasMoreOlder={props.hasMoreOlderActivities}
+ loadingOlder={props.loadingOlderActivities}
+ onLoadOlder={props.onLoadOlderActivities}
</View>
) : (
38 additions and 1 deletionapps/mobile/src/features/threads/ThreadFeed.tsxModified
View file
@@ -141,6 +141,10 @@
readonly usesAutomaticContentInsets?: boolean;
readonly onHeaderMaterialVisibilityChange?: (visible: boolean) => void;
readonly skills?: ReadonlyArray<SelectableMarkdownSkill>;
+ /** Older history beyond the live activity window can be lazy-loaded on scroll-up. */