@@ -28,7 +28,7 @@ import {
2828 KeyboardStickyView ,
2929 useKeyboardState ,
3030} from "react-native-keyboard-controller" ;
31- import Animated from "react-native-reanimated" ;
31+ import Animated , { FadeInDown , ReduceMotion } from "react-native-reanimated" ;
3232import { useSafeAreaInsets } from "react-native-safe-area-context" ;
3333import { useUniwindTheme } from "../../lib/useUniwindTheme" ;
3434import { FONT_FAMILIES } from "../../lib/fontFamilies" ;
@@ -74,6 +74,7 @@ import { hasProviderUsageLimits, isUsageLimitsCommand } from "@t3tools/shared/us
7474import { threadContextsOutsideEnvironment } from "@t3tools/shared/composerContextReferences" ;
7575import { COMPOSER_LAYOUT_TRANSITION , ComposerSurface } from "./ThreadComposer" ;
7676import { ComposerCommandPopover } from "./ComposerCommandPopover" ;
77+ import { ComposerPopoverAnchor } from "./ComposerPopoverAnchor" ;
7778import { useComposerCommandMenu } from "./use-composer-command-menu" ;
7879import {
7980 ComposerDictationCancelAction ,
@@ -143,6 +144,8 @@ import { serverEnvironment } from "../../state/server";
143144import { fileRoutePathSegments } from "../files/filePath" ;
144145import { readEnvironmentScope , useEnvironmentScope } from "../../state/session" ;
145146
147+ const COMPOSER_POPOVER_ENTERING = FadeInDown . duration ( 180 ) . reduceMotion ( ReduceMotion . System ) ;
148+
146149function NewTaskWorkspaceIcon ( props : {
147150 readonly workspaceMode : "local" | "worktree" ;
148151 readonly worktreePath : string | null ;
@@ -1590,6 +1593,15 @@ export function NewTaskDraftScreen(props: {
15901593 </ View >
15911594 ) ;
15921595
1596+ const composerPopover = composerMenu . trigger ? (
1597+ < ComposerCommandPopover
1598+ items = { composerMenu . items }
1599+ triggerKind = { composerMenu . trigger . kind }
1600+ isLoading = { composerMenu . isLoading }
1601+ error = { composerMenu . error }
1602+ onSelect = { composerMenu . onSelect }
1603+ />
1604+ ) : null ;
15931605 const composerDock = (
15941606 < View
15951607 className = {
@@ -1600,15 +1612,15 @@ export function NewTaskDraftScreen(props: {
16001612 { ! voiceInput . isBusy &&
16011613 composerMenu . trigger &&
16021614 ( composerMenu . items . length > 0 || composerMenu . trigger . kind === "pull-request" ) ? (
1603- < View className = "mb-2" >
1604- < ComposerCommandPopover
1605- items = { composerMenu . items }
1606- triggerKind = { composerMenu . trigger . kind }
1607- isLoading = { composerMenu . isLoading }
1608- error = { composerMenu . error }
1609- onSelect = { composerMenu . onSelect }
1610- / >
1611- </ View >
1615+ Platform . OS === "ios" ? (
1616+ < View >
1617+ < ComposerPopoverAnchor >
1618+ < Animated . View entering = { COMPOSER_POPOVER_ENTERING } > { composerPopover } </ Animated . View >
1619+ </ ComposerPopoverAnchor >
1620+ </ View >
1621+ ) : (
1622+ < View className = "mb-2" > { composerPopover } </ View >
1623+ )
16121624 ) : null }
16131625 { projectClone && projectClone . phase !== "done" && selectedProject ? (
16141626 < View className = "px-1 pb-2" >
0 commit comments