@@ -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,25 @@ 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 && (
224
- < Alert severity = "info" >
225
- < AlertTitle > An update is available for your workspace</ AlertTitle >
226
- { updateMessage && < AlertDetail > { updateMessage } </ AlertDetail > }
227
- </ Alert >
228
- ) }
233
+ { workspace . outdated &&
234
+ ( requiresManualUpdate ? (
235
+ < Alert severity = "warning" >
236
+ < AlertTitle >
237
+ Autostart has been disabled for your workspace.
238
+ </ AlertTitle >
239
+ < AlertDetail >
240
+ Autostart is unable to automatically update your workspace.
241
+ Manually update your workspace to reenable Autostart.
242
+ </ AlertDetail >
243
+ </ Alert >
244
+ ) : (
245
+ < Alert severity = "info" >
246
+ < AlertTitle >
247
+ An update is available for your workspace
248
+ </ AlertTitle >
249
+ { updateMessage && < AlertDetail > { updateMessage } </ AlertDetail > }
250
+ </ Alert >
251
+ ) ) }
229
252
{ buildError }
230
253
{ cancellationError }
231
254
{ workspace . latest_build . status === "running" &&
0 commit comments