Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat: turn a No project thread into a project #26767

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/26767/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 27 changed files with 68 additions and 1 deletion (loading 24).

x
0 of 27 viewed, 27 left
20 additions and 1 deletionapps/mobile/src/features/threads/thread-list-v2-items.tsxModified
View file
@@ -62,6 +62,8 @@
import { useSwipeRowDormant } from "../home/swipe-row-activation";
import { ThreadSwipeable } from "../home/thread-swipe-actions";
import { buildThreadTitleRegenerationMenuItems } from "./thread-title-regeneration-menu";
+import { canTurnThreadIntoProject, turnThreadIntoProject } from "./turnThreadIntoProject";
+import { threadCanArchive } from "../home/threadArchive";
import {
THREAD_LIST_V2_SETTLED_PAGE_COUNT,
resolveThreadListV2SnoozeGateExpiryMs,
@@ -837,6 +839,7 @@
: [],
[props.autoSettleOptOutSupported, thread.autoSettleDisabledAt],
+ const canTurnIntoProject = canTurnThreadIntoProject(thread);
const titleMenuItems = useMemo<MenuAction[]>(
() => [
{ id: "rename", title: "Rename", image: "square.and.pencil" },
@@ -844,8 +847,23 @@
supported: props.titleRegenerationSupported,
isRegenerating: thread.titleRegeneration != null,
}),
+ ...(canTurnIntoProject
+ ? [
+ {
+ id: "turn-into-project",
+ title: "Turn into project",
+ image: "folder.badge.plus",
+ attributes: { disabled: !threadCanArchive(thread.runtime) },