The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
fix(mobile): a stopped character training is not reported as trained
purple7ccca5f2f308
diff --git a/e2e/mobile/create.mobile.ts b/e2e/mobile/create.mobile.tsindex 4bf6f8c9..78768889 100644--- a/e2e/mobile/create.mobile.ts+++ b/e2e/mobile/create.mobile.ts@@ -2704,6 +2704,10 @@ for (const size of SIZES) {await tid(page, 'm-create-train-cancel').tap()await expect.poll(() => cloud.cancels).toEqual(['job-1'])await expect(tid(page, 'm-create-train-running')).toHaveCount(0)+ // Stopped, not trained: the page stays with its photos and says nothing about a finished character.+ await expect(tid(page, 'm-create-character-new-screen')).toBeVisible()+ await expect(tid(page, 'm-toast-create-character-trained')).toHaveCount(0)+ await expect(tid(page, 'm-create-char-photo')).not.toHaveCount(0)})test('prompt styles for clips: the length is kept and applied', async ({ page }) => {@@ -2876,8 +2880,6 @@ for (const size of SIZES) {})test('training: the shelf stops a running training; a training the server refuses says so', async ({ page }) => {- // Red twice in a row at 320x568 on the shared CI runner of 3.0.8 (no toast after the stop), green locally every time.- test.skip(!!process.env.CI, 'timing on the shared CI runner; runs locally')const cloud = new Cloud()cloud.hold = trueawait openCreate(page, cloud)@@ -2909,6 +2911,14 @@ for (const size of SIZES) {await expect.poll(() => cloud.cancels).toEqual(['job-1'])await expect(tid(page, 'm-toast-create-training-cancelled')).toBeVisible()await expect(tid(page, 'm-create-training')).toHaveCount(0)+ // A stopped training is not a trained one. The page of the new character used to take the end of+ // the run for success: it toasted "trained" (over this toast or under it, whichever came last, which+ // is why this test was red on the Linux runner only) and left the shelf.+ await expect(tid(page, 'm-create-characters-screen')).toBeVisible()+ await expect(tid(page, 'm-toast-create-character-trained')).toHaveCount(0)+ await page.waitForTimeout(1000)+ await expect(tid(page, 'm-create-characters-screen')).toBeVisible()+ await expect(tid(page, 'm-toast-create-character-trained')).toHaveCount(0)})test('the note about how long results are kept shows once; the credits chip opens the account', async ({ page }) => {diff --git a/src/mobile/screens/create/NewCharacterPage.tsx b/src/mobile/screens/create/NewCharacterPage.tsxindex 86be927c..403ae77c 100644--- a/src/mobile/screens/create/NewCharacterPage.tsx+++ b/src/mobile/screens/create/NewCharacterPage.tsx@@ -127,6 +127,10 @@ export default function NewCharacterPage() {// itself emptied the photos), that sentence is over and the page ends like any training.const stoppedInVain = !!st.error && explainError(st.error).kind === 'cannot-stop' && st.trainImages.length === 0if (st.error && !stoppedInVain) return+ // A training that came through emptied the photos. Photos still there and no error: the run was+ // stopped (the shelf's Stop, or Stop during the upload). That is not "trained", and the shelf says+ // "Training cancelled" itself; this page used to toast "trained" over it and leave the shelf.+ if (!stoppedInVain && st.trainImages.length > 0) returnif (stoppedInVain) st.setError(null)st.clearTrainImages()st.setTriggerWord('')