Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): keep new-thread targets stable during search #3693

Closedt3dotgg(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromfix/new-thread-target-searchopened View on GitHub

Showing 2 changed files with 53 additions and 4 deletions.

x
0 of 2 viewed, 2 left
44 additions and 0 deletionsapps/mobile/src/features/home/homeThreadList.test.tsModified
View file
@@ -743,4 +743,48 @@
expect(groups[0]?.newThreadTarget?.environmentId).toBe(desktopEnv);
expect(groups[0]?.newThreadTarget?.id).toBe(desktopProject.id);
});
+​
+ it("keeps the quick new-thread target when search hides the newest thread", () => {
+ const laptopProject = makeProject({
+ environmentId: EnvironmentId.make("environment-laptop"),
+ id: ProjectId.make("project-laptop"),
+ title: "t3code",
+ repositoryIdentity: {
+ canonicalKey: "github.com/pingdotgg/t3code",
+ locator: {
+ source: "git-remote",
+ remoteName: "origin",
+ remoteUrl: "git@github.com:pingdotgg/t3code.git",
+ },
+ },
+ });
+ const desktopProject = makeProject({
+ ...laptopProject,
+ environmentId: EnvironmentId.make("environment-desktop"),
+ id: ProjectId.make("project-desktop"),
+ });
+ const laptopThread = makeThread({
+ environmentId: laptopProject.environmentId,
+ id: ThreadId.make("thread-laptop"),
+ projectId: laptopProject.id,
+ title: "Older laptop thread",
+ updatedAt: "2026-06-27T00:00:00.000Z",