@@ -39,6 +39,7 @@ import { ScreenScrollView as ScrollView } from "../../components/ScreenScrollVie
3939import { SegmentedControl } from "../../components/SegmentedControl" ;
4040import { ThemedSwitch } from "../../components/ThemedSwitch" ;
4141import { tryCopyTextWithHaptic } from "../../lib/copyTextWithHaptic" ;
42+ import { usePreparedConnection } from "../../state/session" ;
4243import { buildModelOptions } from "../../lib/modelOptions" ;
4344import { NativeStackScreenOptions } from "../../native/StackHeader" ;
4445import { useProjects , useEnvironmentServerConfig } from "../../state/entities" ;
@@ -585,7 +586,14 @@ function TaskForm({
585586 environmentUnavailable
586587 )
587588 return ;
588- const schedule = scheduleFromDraft ( draft . schedule ) ;
589+ // Signatures are edited on desktop and web; send the task's current one,
590+ // not the copy taken when this form opened, so a newer edit survives.
591+ const liveTask = tasks . data ?. tasks . find ( ( task ) => task . id === draft . task ?. id ) ;
592+ const schedule = scheduleFromDraft (
593+ draft . schedule . mode === "webhook" && liveTask ?. schedule . type === "webhook"
594+ ? { ...draft . schedule , signature : liveTask . schedule . signature }
595+ : draft . schedule ,
596+ ) ;
589597 if (
590598 ! draft . title . trim ( ) ||
591599 ! draft . prompt . trim ( ) ||
@@ -960,8 +968,14 @@ function WebhookScheduleDetails({
960968 label : "scheduled task rotate webhook token" ,
961969 reportFailure : false ,
962970 } ) ;
971+ const preparedConnection = usePreparedConnection ( environmentId ) ;
972+ const httpBaseUrl =
973+ preparedConnection . _tag === "Some" ? preparedConnection . value . httpBaseUrl : null ;
963974 const webhook = task ?. schedule . type === "webhook" ? task . webhook : undefined ;
964- const address = webhook ? ( webhook . url ?? webhook . path ) : null ;
975+ // Without T3 Connect, the path is resolved on the address this phone uses.
976+ const address = webhook
977+ ? ( webhook . url ?? ( httpBaseUrl ? new URL ( webhook . path , httpBaseUrl ) . href : webhook . path ) )
978+ : null ;
965979 return (
966980 < View className = "gap-2 border-t border-border-subtle px-4 py-3" >
967981 < Text className = "text-sm text-foreground-muted" >
0 commit comments