Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf(shell): cold connects skip older settled threads, 93% of the shell JSON #24723

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/24723/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 63 changed files with 105 additions and 22 deletions (loading 60).

x
0 of 63 viewed, 63 left
21 additions and 4 deletionsapps/mobile/src/features/home/HomeScreen.tsxModified
View file
@@ -291,8 +291,6 @@
? [props.selectedEnvironmentId]
: [];
- const threadSearch = useThreadSearch(searchEnvironmentIds, props.searchQuery);
- const threadSearchMatchByKey = useThreadListSearchMatches(props.threads, threadSearch);
const handleSwipeableWillOpen = (methods: SwipeableMethods) => {
if (openSwipeableRef.current !== methods) {
openSwipeableRef.current?.close();
@@ -380,6 +378,14 @@
​
const v2ProjectScopeKey = props.selectedProjectKey;
const v2ScopedProjectGroup = findHomeProjectScope(projectScopes, v2ProjectScopeKey);
+ const threadSearch = useThreadSearch(
+ searchEnvironmentIds,
+ props.searchQuery,
+ v2ScopedProjectGroup === null
+ ? {}
+ : { projectIds: v2ScopedProjectGroup.projectRefs.map((ref) => ref.projectId) },
+ );
+ const threadSearchMatchByKey = useThreadListSearchMatches(props.threads, threadSearch);
const v2ProjectTitleByProjectKey = new Map(
projectScopes.flatMap((scope) =>
scope.projectRefs.map(
@@ -447,6 +453,7 @@
layout: threadListV2Layout,
items: threadListV2Items,
contentOnlyThreadKeys,