diff --git a/apps/web/src/components/HomeDraftLanding.browser.test.tsx b/apps/web/src/components/HomeDraftLanding.browser.test.tsx new file mode 100644 index 0000000000000..13d7ff9ef484d --- /dev/null +++ b/apps/web/src/components/HomeDraftLanding.browser.test.tsx @@ -0,0 +1,90 @@ +import { createMemoryHistory } from "@tanstack/react-router"; +import { DEFAULT_CLIENT_SETTINGS } from "@t3tools/contracts/settings"; +import type * as Context from "effect/Context"; +import { Atom } from "effect/reactivity"; +import { expect, it, vi } from "vite-plus/test"; + +import { AppRoot } from "~/AppRoot"; +import { DraftId, useComposerDraftStore } from "~/composerDraftStore"; +import { __setClientSettingsForTests } from "~/hooks/useSettings"; +import stylesheet from "~/index.css?inline"; +import { getRouter } from "~/router"; +import { appAtomRegistry } from "~/rpc/atomRegistry"; +import { + ENVIRONMENT_ID, + installFakeEnvironment, + threadWithHistory, + type FakeDriver, +} from "../../test/fakeEnvironment"; +import { act, render } from "../../test/render"; + +const configVisible = Atom.make(false).pipe(Atom.keepAlive); + +vi.mock(import("~/state/server"), async (original) => { + const actual = await original(); + const { Atom } = await import("effect/reactivity"); + return { + ...actual, + environmentServerConfigsAtom: Atom.make((get) => { + if (!get(configVisible)) return new Map(); + const config = get(actual.environmentServerConfigsAtom).get(ENVIRONMENT_ID); + if (config === undefined) return new Map(); + return new Map([ + [ + ENVIRONMENT_ID, + { + ...config, + settings: { ...config.settings, defaultThreadEnvMode: "worktree" as const }, + }, + ], + ]); + }), + }; +}); + +vi.mock("../../../../packages/client-runtime/src/connection/driver.ts", async (original) => { + const [actual, { fakeDriver }, Layer] = await Promise.all([ + original<{ readonly ConnectionDriver: Context.Key }>(), + import("../../test/fakeEnvironment"), + import("effect/Layer"), + ]); + return { ...actual, layer: Layer.succeed(actual.ConnectionDriver, fakeDriver) }; +}); + +function setup() { + appAtomRegistry.set(configVisible, false); + __setClientSettingsForTests({ + ...DEFAULT_CLIENT_SETTINGS, + onboardingCompletedAt: "2026-01-01T00:00:00.000Z", + }); + return installFakeEnvironment([threadWithHistory("home-settings", 1)]); +} + +it("stays recoverable while the most recent project's settings are unavailable", async () => { + using _environment = setup(); + const router = getRouter(createMemoryHistory({ initialEntries: ["/"] })); + await router.load(); + await using screen = await render( + <> + + + , + { router: false }, + ); + + const retry = screen.getByRole("button", { name: "Try again", exact: true }); + await expect.element(retry).toBeVisible(); + await expect.element(screen.getByText("Environment settings are still loading")).toBeVisible(); + expect(router.state.location.pathname).toBe("/"); + + await retry.click(); + await expect.element(retry).toBeVisible(); + expect(router.state.location.pathname).toBe("/"); + + await act(() => appAtomRegistry.set(configVisible, true)); + await vi.waitFor(() => expect(router.state.location.pathname).toMatch(/^\/draft\//)); + const draftId = DraftId.make( + decodeURIComponent(router.state.location.pathname.split("/").at(-1)!), + ); + expect(useComposerDraftStore.getState().getDraftSession(draftId)?.envMode).toBe("worktree"); +}); diff --git a/apps/web/src/hooks/useHandleNewThread.test.ts b/apps/web/src/hooks/useHandleNewThread.test.ts index 7c64d0077cc2b..69f9f180f2a96 100644 --- a/apps/web/src/hooks/useHandleNewThread.test.ts +++ b/apps/web/src/hooks/useHandleNewThread.test.ts @@ -5,6 +5,7 @@ const testState = vi.hoisted(() => { let completeProjectFileRead: (value: null) => void = () => undefined; let projectFileRead = Promise.resolve(null); let projectRemoved = false; + let configMissing = false; let connectedEnvironmentIds = ["environment-primary", "environment-ssh"]; let targetSettings = { defaultThreadEnvMode: "local" as "local" | "worktree" | null, @@ -56,6 +57,13 @@ const testState = vi.hoisted(() => { }; return { + toast: vi.fn(), + get configMissing() { + return configMissing; + }, + setConfigMissing(value: boolean) { + configMissing = value; + }, completeProjectFileRead: (value: null) => completeProjectFileRead(value), draftStore, get projectFileRead() { @@ -101,6 +109,7 @@ const testState = vi.hoisted(() => { openDraftRoute = null; draftsWithUserText = new Set(); projectRemoved = false; + configMissing = false; connectedEnvironmentIds = ["environment-primary", "environment-ssh"]; targetSettings = { defaultThreadEnvMode: workspaceDefaults.envMode, @@ -132,9 +141,15 @@ const testServerConfigs = () => }, }, ], - ["environment-ssh", { settings: testState.targetSettings }], + ...(!testState.configMissing + ? [["environment-ssh", { settings: testState.targetSettings }] as const] + : []), ]); +vi.mock("../components/ui/toast", () => ({ + toastManager: { add: testState.toast }, +})); + vi.mock("../rpc/atomRegistry", () => ({ appAtomRegistry: { get: (atom: unknown) => @@ -271,6 +286,34 @@ describe.each([ }, ], ])("useNewThreadHandler with a %s draft", (_, draft) => { + it("does not guess before settings load and uses them on retry", async () => { + testState.reset(draft, { envMode: "worktree", startFromOrigin: true }); + testState.toast.mockClear(); + testState.setConfigMissing(true); + const openThread = useNewThreadHandler(); + const projectRef = { + environmentId: "environment-ssh", + projectId: "project-remote", + } as never; + + await expect(openThread(projectRef)).resolves.toBeNull(); + expect(testState.draftStore.setLogicalProjectDraftThreadId).not.toHaveBeenCalled(); + expect(testState.draftStore.setDraftThreadContext).not.toHaveBeenCalled(); + expect(testState.router.navigate).not.toHaveBeenCalled(); + expect(testState.toast).toHaveBeenCalledWith( + expect.objectContaining({ title: "Environment settings are still loading" }), + ); + + testState.setConfigMissing(false); + await expect(openThread(projectRef)).resolves.not.toBeNull(); + expect(testState.draftStore.setLogicalProjectDraftThreadId).toHaveBeenCalledWith( + "remote-project", + projectRef, + draft?.draftId ?? "draft-delayed", + expect.objectContaining({ envMode: "worktree", startFromOrigin: true }), + ); + }); + it("abandons a delayed draft open when the user navigates elsewhere", async () => { testState.reset(draft); const openThread = useNewThreadHandler(); @@ -349,6 +392,23 @@ describe.each([ }); describe("useNewThreadHandler", () => { + it("keeps an explicit choice while the target settings are unavailable", async () => { + testState.reset(null); + testState.setConfigMissing(true); + await expect( + useNewThreadHandler()( + { environmentId: "environment-ssh", projectId: "project-remote" } as never, + { envMode: "worktree" }, + ), + ).resolves.not.toBeNull(); + expect(testState.draftStore.setLogicalProjectDraftThreadId).toHaveBeenCalledWith( + "remote-project", + expect.anything(), + "draft-delayed", + expect.objectContaining({ envMode: "worktree" }), + ); + }); + it("keeps the text of a draft that gained some while it waited", async () => { testState.reset(null); const raced = { diff --git a/apps/web/src/hooks/useHandleNewThread.ts b/apps/web/src/hooks/useHandleNewThread.ts index 49e8812628b1b..9b20eec003652 100644 --- a/apps/web/src/hooks/useHandleNewThread.ts +++ b/apps/web/src/hooks/useHandleNewThread.ts @@ -5,6 +5,8 @@ import { } from "@t3tools/client-runtime/environment"; import { DEFAULT_SERVER_SETTINGS, type ScopedProjectRef, type ThreadId } from "@t3tools/contracts"; import { type AnyRouter, useRouter } from "@tanstack/react-router"; +import { msg } from "gt-react"; +import { m } from "~/i18n/messages"; import { composerDraftHasUserContent, markPromotedDraftThreadByRef, @@ -15,6 +17,7 @@ import { } from "../composerDraftStore"; import { newDraftId, newThreadId } from "../lib/utils"; import { orderItemsByPreferredIds } from "../components/Sidebar.logic"; +import { toastManager } from "../components/ui/toast"; import { deriveLogicalProjectKeyFromSettings, getProjectOrderKey, @@ -108,8 +111,8 @@ export function createNewThreadHandler(router: AnyRouter) { const projectGroupingSettings = selectProjectGroupingSettings(getClientSettings()); // Read at call time; status pushes replace the config map and would recreate every sidebar handler. const environmentServerConfigs = appAtomRegistry.get(environmentServerConfigsAtom); - const targetServerSettings = - environmentServerConfigs.get(projectRef.environmentId)?.settings ?? DEFAULT_SERVER_SETTINGS; + const targetServerConfig = environmentServerConfigs.get(projectRef.environmentId); + const targetServerSettings = targetServerConfig?.settings ?? DEFAULT_SERVER_SETTINGS; const { getComposerDraft, getDraftSessionByLogicalProjectKey, @@ -197,7 +200,15 @@ export function createNewThreadHandler(router: AnyRouter) { currentRouteTarget?.kind === "draft" ? currentRouteTarget.draftId : null, destinationDraftId, }); - const resolveDefaultEnvMode = async (): Promise => { + const resolveDefaultEnvMode = async (): Promise => { + if (targetServerConfig === undefined) { + toastManager.add({ + type: "warning", + title: m(msg("Environment settings are still loading")), + description: m(msg("Wait for this environment to finish connecting, then try again.")), + }); + return null; + } // Environment queries wait for a connection, so reading the project file on an // offline machine would never settle and the draft would never open. const consultProjectFile = @@ -291,6 +302,9 @@ export function createNewThreadHandler(router: AnyRouter) { if (abandonedSinceRequest()) { return resultIfAbandoned(); } + if (defaultEnvMode === null) { + return null; + } // Concurrent calls may change the draft; stale resets, remaps, or navigation could clobber it. const routeTargetNow = getCurrentRouteTarget(); const openedMeanwhile = @@ -407,6 +421,9 @@ export function createNewThreadHandler(router: AnyRouter) { if (abandonedSinceRequest()) { return resultIfAbandoned(); } + if (initialEnvMode === null) { + return null; + } // Reuse drafts registered while awaiting so their pending navigation cannot lose them. const racedDraft = getDraftSessionByLogicalProjectKey(logicalProjectKey); if ( diff --git a/apps/web/src/i18n/translations/de.json b/apps/web/src/i18n/translations/de.json index 221fbe9e1552a..8204ae781113f 100644 --- a/apps/web/src/i18n/translations/de.json +++ b/apps/web/src/i18n/translations/de.json @@ -2731,6 +2731,8 @@ "8f109e64ea66ebaf": "Der Text konnte nicht in die Zwischenablage kopiert werden.", "3444fc0e046baae6": "Die Zwischenablage-API ist beim Lesen des Textes nicht verfügbar.", "ec2160de6dd9c8d3": "Der Text konnte nicht aus der Zwischenablage gelesen werden.", + "d0d666e8667322ca": "Umgebungseinstellungen werden noch geladen", + "aa985f3cefd7c4d2": "Warte, bis die Verbindung zu dieser Umgebung hergestellt ist, und versuche es dann erneut.", "433bd7a75c28a858": "Das {label}-Repository konnte nicht erstellt werden", "181a251357eeca66": "{error} Verwende „Repository veröffentlichen“ im Git-Menü, um es erneut zu versuchen.", "fc6379bdbd00c0a3": "Auf {label} veröffentlicht", diff --git a/apps/web/src/i18n/translations/en.json b/apps/web/src/i18n/translations/en.json index 5f5205cd0be10..e1311cf74bbce 100644 --- a/apps/web/src/i18n/translations/en.json +++ b/apps/web/src/i18n/translations/en.json @@ -2730,6 +2730,8 @@ "8f109e64ea66ebaf": "Failed to copy text to the clipboard.", "3444fc0e046baae6": "Clipboard API is unavailable while reading text.", "ec2160de6dd9c8d3": "Failed to read text from the clipboard.", + "d0d666e8667322ca": "Environment settings are still loading", + "aa985f3cefd7c4d2": "Wait for this environment to finish connecting, then try again.", "433bd7a75c28a858": "Could not create the {label} repository", "181a251357eeca66": "{error} Use Publish Repository in the Git menu to try again.", "fc6379bdbd00c0a3": "Published to {label}", diff --git a/apps/web/src/i18n/translations/es.json b/apps/web/src/i18n/translations/es.json index cf98b0b2f00f2..9ed204690c7b5 100644 --- a/apps/web/src/i18n/translations/es.json +++ b/apps/web/src/i18n/translations/es.json @@ -2730,6 +2730,8 @@ "8f109e64ea66ebaf": "No se pudo copiar el texto al portapapeles.", "3444fc0e046baae6": "La API del portapapeles no está disponible al leer texto.", "ec2160de6dd9c8d3": "No se pudo leer el texto del portapapeles.", + "d0d666e8667322ca": "La configuración del entorno aún se está cargando", + "aa985f3cefd7c4d2": "Espera a que se conecte este entorno y vuelve a intentarlo.", "433bd7a75c28a858": "No se pudo crear el repositorio de {label}", "181a251357eeca66": "{error} Usa Publicar repositorio en el menú de Git para volver a intentarlo.", "fc6379bdbd00c0a3": "Publicado en {label}", diff --git a/apps/web/src/i18n/translations/fr.json b/apps/web/src/i18n/translations/fr.json index 46f0333590e03..dea3c949f868d 100644 --- a/apps/web/src/i18n/translations/fr.json +++ b/apps/web/src/i18n/translations/fr.json @@ -2730,6 +2730,8 @@ "8f109e64ea66ebaf": "Impossible de copier le texte dans le presse-papiers.", "3444fc0e046baae6": "L’API Presse-papiers n’est pas disponible pour lire le texte.", "ec2160de6dd9c8d3": "Impossible de lire le texte depuis le presse-papiers.", + "d0d666e8667322ca": "Les paramètres de l’environnement sont en cours de chargement", + "aa985f3cefd7c4d2": "Attendez que la connexion à cet environnement soit établie, puis réessayez.", "433bd7a75c28a858": "Impossible de créer le dépôt {label}", "181a251357eeca66": "{error} Utilisez Publier le dépôt dans le menu Git pour réessayer.", "fc6379bdbd00c0a3": "Publié sur {label}", diff --git a/apps/web/src/i18n/translations/ja.json b/apps/web/src/i18n/translations/ja.json index 3557dee251c90..63fafcd0a5283 100644 --- a/apps/web/src/i18n/translations/ja.json +++ b/apps/web/src/i18n/translations/ja.json @@ -2728,6 +2728,8 @@ "8f109e64ea66ebaf": "テキストをクリップボードにコピーできませんでした。", "3444fc0e046baae6": "テキストを読み取る際にクリップボード API を利用できませんでした。", "ec2160de6dd9c8d3": "クリップボードからテキストを読み取れませんでした。", + "d0d666e8667322ca": "環境設定を読み込み中です", + "aa985f3cefd7c4d2": "この環境に接続されたら、もう一度お試しください。", "433bd7a75c28a858": "{label} のリポジトリを作成できませんでした", "181a251357eeca66": "{error} Git メニューの [リポジトリを公開] から再試行してください。", "fc6379bdbd00c0a3": "{label} に公開しました", diff --git a/apps/web/src/i18n/translations/ko.json b/apps/web/src/i18n/translations/ko.json index afaedc677327e..5cccf1801266b 100644 --- a/apps/web/src/i18n/translations/ko.json +++ b/apps/web/src/i18n/translations/ko.json @@ -2729,6 +2729,8 @@ "8f109e64ea66ebaf": "텍스트를 클립보드에 복사하지 못했습니다.", "3444fc0e046baae6": "텍스트를 읽는 중 클립보드 API를 사용할 수 없습니다.", "ec2160de6dd9c8d3": "클립보드에서 텍스트를 읽지 못했습니다.", + "d0d666e8667322ca": "환경 설정을 불러오는 중입니다", + "aa985f3cefd7c4d2": "이 환경에 연결되면 다시 시도하세요.", "433bd7a75c28a858": "{label} 저장소를 만들 수 없습니다", "181a251357eeca66": "{error} 다시 시도하려면 Git 메뉴에서 저장소 게시를 사용하세요.", "fc6379bdbd00c0a3": "{label}에 게시됨", diff --git a/apps/web/src/i18n/translations/pt-BR.json b/apps/web/src/i18n/translations/pt-BR.json index 0be7d13d3cece..82a1e411d9808 100644 --- a/apps/web/src/i18n/translations/pt-BR.json +++ b/apps/web/src/i18n/translations/pt-BR.json @@ -2730,6 +2730,8 @@ "8f109e64ea66ebaf": "Falha ao copiar o texto para a área de transferência.", "3444fc0e046baae6": "A API da área de transferência não está disponível ao ler o texto.", "ec2160de6dd9c8d3": "Falha ao ler o texto da área de transferência.", + "d0d666e8667322ca": "As configurações do ambiente ainda estão carregando", + "aa985f3cefd7c4d2": "Aguarde até que este ambiente esteja conectado e tente novamente.", "433bd7a75c28a858": "Não foi possível criar o repositório no {label}", "181a251357eeca66": "{error} Use Publicar repositório no menu do Git para tentar novamente.", "fc6379bdbd00c0a3": "Publicado no {label}", diff --git a/apps/web/src/i18n/translations/ru.json b/apps/web/src/i18n/translations/ru.json index dacfb97f48567..13b6d33bedf8a 100644 --- a/apps/web/src/i18n/translations/ru.json +++ b/apps/web/src/i18n/translations/ru.json @@ -2730,6 +2730,8 @@ "8f109e64ea66ebaf": "Не удалось скопировать текст в буфер обмена.", "3444fc0e046baae6": "API буфера обмена недоступен при чтении текста.", "ec2160de6dd9c8d3": "Не удалось прочитать текст из буфера обмена.", + "d0d666e8667322ca": "Настройки окружения ещё загружаются", + "aa985f3cefd7c4d2": "Дождитесь подключения к этому окружению и повторите попытку.", "433bd7a75c28a858": "Не удалось создать репозиторий {label}", "181a251357eeca66": "{error} Повторите через «Опубликовать репозиторий» в меню Git.", "fc6379bdbd00c0a3": "Опубликовано на {label}", diff --git a/apps/web/src/i18n/translations/sv.json b/apps/web/src/i18n/translations/sv.json index d963ce9ef16a8..761d221e8d5ec 100644 --- a/apps/web/src/i18n/translations/sv.json +++ b/apps/web/src/i18n/translations/sv.json @@ -2730,6 +2730,8 @@ "8f109e64ea66ebaf": "Kunde inte kopiera text till urklipp.", "3444fc0e046baae6": "Urklipps-API:t är inte tillgängligt vid läsning av text.", "ec2160de6dd9c8d3": "Kunde inte läsa text från urklipp.", + "d0d666e8667322ca": "Miljöinställningarna läses fortfarande in", + "aa985f3cefd7c4d2": "Vänta tills den här miljön är ansluten och försök sedan igen.", "433bd7a75c28a858": "Kunde inte skapa {label}-repot", "181a251357eeca66": "{error} Använd Publicera repo i Git-menyn för att försöka igen.", "fc6379bdbd00c0a3": "Publicerat till {label}", diff --git a/apps/web/src/i18n/translations/zh.json b/apps/web/src/i18n/translations/zh.json index 4e240b7fc752c..cc7d73e4c7529 100644 --- a/apps/web/src/i18n/translations/zh.json +++ b/apps/web/src/i18n/translations/zh.json @@ -2734,6 +2734,8 @@ "8f109e64ea66ebaf": "无法将文本复制到剪贴板。", "3444fc0e046baae6": "读取文本时剪贴板 API 不可用。", "ec2160de6dd9c8d3": "无法从剪贴板读取文本。", + "d0d666e8667322ca": "环境设置仍在加载", + "aa985f3cefd7c4d2": "请等待此环境连接成功后重试。", "433bd7a75c28a858": "无法创建 {label} 仓库", "181a251357eeca66": "{error} 请使用 Git 菜单中的“发布仓库”重试。", "fc6379bdbd00c0a3": "已发布到 {label}", diff --git a/apps/web/src/routes/_chat.index.tsx b/apps/web/src/routes/_chat.index.tsx index 2e6ee53809310..34ed56f50b4a4 100644 --- a/apps/web/src/routes/_chat.index.tsx +++ b/apps/web/src/routes/_chat.index.tsx @@ -1,6 +1,7 @@ import { workspaceAreaProps } from "../lib/workspaceFocus"; import { RefreshIcon } from "~/components/ui/refresh-icon"; import { scopeProjectRef } from "@t3tools/client-runtime/environment"; +import { useAtomValue } from "@effect/atom-react"; import { createFileRoute, useRouter } from "@tanstack/react-router"; import { T, useGT } from "gt-react"; import { useEffect, useEffectEvent, useRef, useState } from "react"; @@ -13,6 +14,7 @@ import { HostedEmptyState } from "../components/HostedEmptyState"; import { Empty, EmptyDescription, EmptyHeader, EmptyTitle } from "../components/ui/empty"; import { SidebarInset } from "../components/ui/sidebar"; import { WorkspacePageHeader } from "../components/WorkspacePageHeader"; +import { environmentCatalog } from "../connection/catalog"; import { useNewThreadHandler } from "../hooks/useHandleNewThread"; import { readProject, @@ -21,6 +23,8 @@ import { useVisibleThreadShells, } from "../state/entities"; import { useEnvironments } from "../state/environments"; +import { environmentServerConfigsAtom } from "../state/server"; +import { useAtomCommand } from "../state/use-atom-command"; function ChatIndexRouteView() { const { authGateState } = Route.useRouteContext(); @@ -39,6 +43,8 @@ function IndexDraftLanding() { const threads = useVisibleThreadShells(); const bootstrapped = useAllEnvironmentShellsBootstrapped(); const handleNewThread = useNewThreadHandler(); + const retryEnvironment = useAtomCommand(environmentCatalog.retryNow); + const serverConfigs = useAtomValue(environmentServerConfigsAtom); const router = useRouter(); // Read at effect time; this page can stay mounted while the router is already navigating away. const isStillOnIndex = useEffectEvent(() => router.state.location.pathname === "/"); @@ -52,11 +58,19 @@ function IndexDraftLanding() { "updated_at", )[0] ?? null; const attempt = startState.retryRequest; + // Cached projects show before their environment connects; the handler refuses to guess until it does. + const configLoaded = + mostRecentProject !== null && serverConfigs.has(mostRecentProject.environmentId); // oxlint-disable-next-line t3code/no-unreasoned-state-sync -- starts a draft thread in the most recent project and navigates to it while still on the index useEffect(() => { // Starting a draft after the user has left would replace the page they picked. - if (mostRecentProject === null || startedAttemptRef.current === attempt || !isStillOnIndex()) { + if ( + mostRecentProject === null || + !configLoaded || + startedAttemptRef.current === attempt || + !isStillOnIndex() + ) { return; } const projectRef = scopeProjectRef(mostRecentProject.environmentId, mostRecentProject.id); @@ -67,18 +81,22 @@ function IndexDraftLanding() { void handleNewThread(projectRef, { replace: true }) .then((opened) => { if (opened === null) { - setStartState((state) => ({ ...state, retryRequest: state.retryRequest + 1 })); + setStartState((state) => ({ ...state, failed: true })); } }) .catch(() => { setStartState((state) => ({ ...state, failed: true })); }); - }, [attempt, handleNewThread, mostRecentProject]); + }, [attempt, configLoaded, handleNewThread, mostRecentProject]); if (mostRecentProject !== null) { - return startState.failed ? ( - { + if (!configLoaded) { + void retryEnvironment(mostRecentProject.environmentId); + } setStartState((state) => ({ failed: false, retryRequest: state.retryRequest + 1, @@ -91,7 +109,13 @@ function IndexDraftLanding() { return bootstrapped ? : null; } -function DraftStartError({ onRetry }: { readonly onRetry: () => void }) { +function DraftStartNotice({ + waitingForSettings, + onRetry, +}: { + readonly waitingForSettings: boolean; + readonly onRetry: () => void; +}) { const gt = useGT(); const contentArea = workspaceAreaProps("home", 1, gt("Home", { $context: "the home screen" })); return ( @@ -104,10 +128,18 @@ function DraftStartError({ onRetry }: { readonly onRetry: () => void }) { - Couldn’t start a new thread + {waitingForSettings ? ( + gt("Environment settings are still loading") + ) : ( + Couldn’t start a new thread + )} - The project is still available. Try opening the draft again. + {waitingForSettings ? ( + gt("Wait for this environment to finish connecting, then try again.") + ) : ( + The project is still available. Try opening the draft again. + )}