diff --git a/components/dashboard/src/start/StartWorkspace.tsx b/components/dashboard/src/start/StartWorkspace.tsx index 8c570068058504..e49bc754073cd5 100644 --- a/components/dashboard/src/start/StartWorkspace.tsx +++ b/components/dashboard/src/start/StartWorkspace.tsx @@ -107,6 +107,10 @@ export interface StartWorkspaceState { * Set to prevent multiple redirects to the same URL when the User Agent ignores our wish to open links in the same tab (by setting window.location.href). */ redirected?: boolean; + /** + * Determines whether `redirected` has been `true` for long enough to display our "new tab" info banner without racing with same-tab redirection in regular setups + */ + showRedirectMessage?: boolean; } // TODO: use Function Components @@ -474,6 +478,9 @@ export default class StartWorkspace extends React.Component { + this.setState({ showRedirectMessage: true }); + }, 2000); } private openDesktopLink(link: string) { @@ -767,7 +774,7 @@ export default class StartWorkspace extends React.Component {statusMessage} - {this.state.redirected && ( + {this.state.showRedirectMessage && ( <> We redirected you to your workspace, but your browser probably opened it in another tab.