@@ -73,6 +73,7 @@ export interface WorkspaceProps {
73
73
onLoadMoreBuilds : ( ) => void ;
74
74
isLoadingMoreBuilds : boolean ;
75
75
hasMoreBuilds : boolean ;
76
+ canAutostart : boolean ;
76
77
}
77
78
78
79
/**
@@ -111,6 +112,7 @@ export const Workspace: FC<React.PropsWithChildren<WorkspaceProps>> = ({
111
112
onLoadMoreBuilds,
112
113
isLoadingMoreBuilds,
113
114
hasMoreBuilds,
115
+ canAutostart,
114
116
} ) => {
115
117
const navigate = useNavigate ( ) ;
116
118
const serverVersion = buildInfo ?. version || "" ;
@@ -168,6 +170,14 @@ export const Workspace: FC<React.PropsWithChildren<WorkspaceProps>> = ({
168
170
clearTimeout ( showTimer ) ;
169
171
} ;
170
172
} , [ workspace , now , showAlertPendingInQueue ] ) ;
173
+
174
+ const updateRequired =
175
+ ( workspace . template_require_active_version ||
176
+ workspace . automatic_updates === "always" ) &&
177
+ workspace . outdated ;
178
+ const autoStartFailing = workspace . autostart_schedule && ! canAutostart ;
179
+ const requiresManualUpdate = updateRequired && autoStartFailing ;
180
+
171
181
return (
172
182
< >
173
183
< FullWidthPageHeader >
@@ -220,12 +230,23 @@ export const Workspace: FC<React.PropsWithChildren<WorkspaceProps>> = ({
220
230
221
231
< Margins css = { styles . content } >
222
232
< Stack direction = "column" css = { styles . firstColumnSpacer } spacing = { 4 } >
223
- { workspace . outdated && (
233
+ { requiresManualUpdate && workspace . outdated && (
224
234
< Alert severity = "info" >
225
235
< AlertTitle > An update is available for your workspace</ AlertTitle >
226
236
{ updateMessage && < AlertDetail > { updateMessage } </ AlertDetail > }
227
237
</ Alert >
228
238
) }
239
+ { requiresManualUpdate && (
240
+ < Alert severity = "warning" >
241
+ < AlertTitle >
242
+ Autostart has been disabled for your workspace.
243
+ </ AlertTitle >
244
+ < AlertDetail >
245
+ Autostart is unable to automatically update your workspace.
246
+ Manually update your workspace to reenable Autostart.
247
+ </ AlertDetail >
248
+ </ Alert >
249
+ ) }
229
250
{ buildError }
230
251
{ cancellationError }
231
252
{ workspace . latest_build . status === "running" &&
0 commit comments