From 5c5ddc6b23e17f44b427aee67bd1fd87e11b9e21 Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Wed, 25 Jan 2023 15:23:31 +0200 Subject: [PATCH] fix(site): Hide agent lifecycle unless opted in via `delay_login_until_ready` (#5850) Refs: #5835, #5749 --- site/src/components/Resources/AgentStatus.tsx | 42 ++++++++++++------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/site/src/components/Resources/AgentStatus.tsx b/site/src/components/Resources/AgentStatus.tsx index b607d3201b..0ab12ffdc9 100644 --- a/site/src/components/Resources/AgentStatus.tsx +++ b/site/src/components/Resources/AgentStatus.tsx @@ -135,22 +135,32 @@ const StartErrorLifecycle: React.FC<{ const ConnectedStatus: React.FC<{ agent: WorkspaceAgent }> = ({ agent }) => { - return ( - - - - - - - - - - - - - - - ) + // NOTE(mafredri): Keep this behind feature flag for the time-being, + // if delay_login_until_ready is true, the user has updated to + // terraform-provider-coder v0.6.7 and opted in to the functionality. + // + // Remove check once documentation is in place and we do a breaking + // release indicating startup script behavior has changed. + // https://github.com/coder/coder/issues/5749 + if (agent.delay_login_until_ready) { + return ( + + + + + + + + + + + + + + + ) + } + return } const DisconnectedStatus: React.FC = () => {