Skip to content

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.

test(mobile e2e): follow the wanted 3.1.0 changes

purple9d3e9c7bb6d4
diff --git a/e2e/mobile/agent.mobile.ts b/e2e/mobile/agent.mobile.ts
index 81291bf9..ef662c87 100644
--- a/e2e/mobile/agent.mobile.ts
+++ b/e2e/mobile/agent.mobile.ts
@@ -212,8 +212,11 @@ for (const size of SIZES) {
await expect(page.getByTestId('m-chat-goal')).toContainText('Know the weather')
await expect(page.getByTestId('m-chat-loop')).toContainText('pass 2 of 5')
await expect(page.getByTestId('m-chat-plan-toggle')).toContainText('1 of 3 done')
- await expect(page.getByTestId('m-chat-status-agent')).toBeVisible()
- await expect(page.getByTestId('m-chat-status-caveman')).toBeVisible()
+ // Prompt v2: what was a row of chips above the field is the grey summary on the settings button. The chat
+ // that was open before stays in the stack below with its own composer: the page on top is the last one.
+ const options = page.getByTestId('m-chat-options').last()
+ await expect(options).toContainText('Agent')
+ await expect(options).toContainText('Caveman')
await clean(page, 'slots closed')
// The plan opens and lists its steps.
@@ -222,7 +225,14 @@ for (const size of SIZES) {
await clean(page, 'plan open')
await page.getByTestId('m-chat-plan-toggle').tap()
- // Thinking and the band of two steps open.
+ // The lines act: clear the goal, stop the loop.
+ await page.getByTestId('m-chat-goal-clear').tap()
+ await expect(page.getByTestId('m-chat-goal')).toHaveCount(0)
+ await page.getByTestId('m-chat-loop-stop').tap()
+ await expect(page.getByTestId('m-chat-loop')).toHaveCount(0)
+
+ // Thinking and the band of two steps open. After the lines above went: at 320x568 goal, loop, plan and a notice
+ // leave a strip of transcript above the composer of prompt v2 too small to hold the fold still.
await page.getByTestId('m-chat-thinking').tap()
await expect(page.getByTestId('m-chat-blocks')).toContainText('I search first')
await page.getByTestId('m-chat-steps').tap()
@@ -231,19 +241,15 @@ for (const size of SIZES) {
await expect(page.getByTestId('m-chat-blocks')).toContainText('The page did not answer.')
await clean(page, 'blocks open')
- // The lines act: clear the goal, stop the loop.
- await page.getByTestId('m-chat-goal-clear').tap()
- await expect(page.getByTestId('m-chat-goal')).toHaveCount(0)
- await page.getByTestId('m-chat-loop-stop').tap()
- await expect(page.getByTestId('m-chat-loop')).toHaveCount(0)
- // A status chip opens the place where its thing is changed.
- await page.getByTestId('m-chat-status-caveman').tap()
+ // The settings button opens the place where caveman is changed, one level down.
+ await options.tap()
+ await page.getByTestId('m-options-caveman-row').tap()
await expect(page.getByTestId('m-options-caveman')).toBeVisible()
await page.getByTestId('m-options-caveman-off').tap()
await page.goBack()
await page.goBack()
- await expect(page.getByTestId('m-chat-status-caveman')).toHaveCount(0)
+ await expect(options).not.toContainText('Caveman')
expect(tried).toEqual([])
expect(errors()).toEqual([])
})
diff --git a/e2e/mobile/chat.mobile.ts b/e2e/mobile/chat.mobile.ts
index b74e6fd9..c2151df6 100644
--- a/e2e/mobile/chat.mobile.ts
+++ b/e2e/mobile/chat.mobile.ts
@@ -154,8 +154,10 @@ function chatBackend(opts: BackendOptions) {
return Promise.resolve({ content, encoding: 'utf8', bytes: content.length })
}
case 'fs_delete': {
- // A build without the command answers nothing at all (the mock does the same for every unknown command).
- if (!ctl.workspace || !ctl.workspace.canDelete) return inner(cmd, args)
+ if (!ctl.workspace) return inner(cmd, args)
+ // A build without the command answers nothing at all. Said here: the shared mock knows fs_delete since the
+ // rewind of CA U4 (6ba8a3da0) and would answer "deleted".
+ if (!ctl.workspace.canDelete) return Promise.resolve(null)
const rel = String(args?.path)
if (!(rel in ctl.workspace.files)) return Promise.reject('fs_delete: no such file')
delete ctl.workspace.files[rel]
@@ -506,8 +508,17 @@ function microphoneStub() {
const LONG_REPLY = Array.from({ length: 40 }, (_, i) => `Sentence ${i + 1} of a long answer about tides and the moon.`).join(' ')
+/**
+ * Prompt v2 (c19cc0cad): no model chip above the field any more. The model is the first part of the summary on the
+ * settings button under the field, and the model sheet is one level down: settings button, then the row "Model".
+ */
+async function openModelSheet(page: Page): Promise<void> {
+ await page.getByTestId('m-chat-options').tap()
+ await page.getByTestId('m-options-model').tap()
+}
+
async function waitForModel(page: Page, name = SMALL): Promise<void> {
- await expect(page.getByTestId('m-chat-model')).toContainText(name)
+ await expect(page.getByTestId('m-chat-options')).toContainText(name)
}
async function send(page: Page, text: string): Promise<void> {
@@ -840,7 +851,7 @@ for (const size of SIZES) {
const errors = watchErrors(page)
await boot(page)
await waitForModel(page)
- await page.getByTestId('m-chat-model').tap()
+ await openModelSheet(page)
await expect(page.getByTestId('m-sheet-model')).toBeVisible()
const local = page.getByTestId('m-chat-model-local')
await expect(local).toHaveCount(2)
@@ -851,7 +862,7 @@ for (const size of SIZES) {
await page.locator(`[data-testid="m-chat-model-local"][data-m-id="openai::${SMALL}"]`).tap()
await expect(page.getByTestId('m-sheet-model')).toHaveCount(0)
expect(await backend(page, (ctl) => ctl.engineStarts.length)).toBe(startsBefore)
- await page.getByTestId('m-chat-model').tap()
+ await openModelSheet(page)
await expect(page.getByTestId('m-sheet-model')).toBeVisible()
expect(await layout(page)).toEqual(CLEAN)
@@ -873,7 +884,7 @@ for (const size of SIZES) {
await expect(page.getByTestId('m-chat-model-by').last()).toContainText(VISION_LABEL)
// C3.4.
- await page.getByTestId('m-chat-model').tap()
+ await openModelSheet(page)
await page.getByTestId('m-chat-model-get-more').tap()
await expect(page.getByTestId('m-models-screen')).toBeVisible()
expect(errors()).toEqual([])
@@ -1155,7 +1166,7 @@ for (const size of SIZES) {
await boot(page, { models: [] })
const empty = page.getByTestId('m-chat-empty')
await expect(empty).toContainText('No model yet.')
- await expect(page.getByTestId('m-chat-model')).toContainText('Choose a model')
+ await expect(page.getByTestId('m-chat-options')).toContainText('Choose a model')
expect(await layout(page)).toEqual(CLEAN)
// Sending keeps the text and opens the model sheet, which says where models come from.
@@ -1199,7 +1210,7 @@ for (const size of SIZES) {
await signInCloud(page)
// C3.5 to C3.8: the catalogue with search, filters and the price page.
- await page.getByTestId('m-chat-model').tap()
+ await openModelSheet(page)
await page.getByTestId('m-chat-model-segment-cloud').tap()
const cloudRows = page.locator('[data-testid="m-sheet-model"] [data-testid^="m-chat-model-cloud"]')
await expect(cloudRows.first()).toBeVisible({ timeout: 20_000 })
@@ -1235,13 +1246,13 @@ for (const size of SIZES) {
await expect(page.getByTestId('m-consent-text')).toContainText('LU Cloud')
await page.getByTestId('m-consent-decline').tap()
await expect(page.getByTestId('m-sheet-model')).toBeVisible()
- await expect(page.getByTestId('m-chat-cloud-chip')).toHaveCount(0)
+ await expect(page.getByTestId('m-chat-options').last()).toHaveAttribute('data-m-place', 'local')
await cheapest.tap()
await page.getByTestId('m-dialog-confirm').tap()
await page.getByTestId('m-consent-agree').tap()
await expect(page.getByTestId('m-sheet-model')).toHaveCount(0)
await waitForModel(page, cloudName)
- await expect(page.getByTestId('m-chat-cloud-chip')).toBeVisible()
+ await expect(page.getByTestId('m-chat-options').last()).toHaveAttribute('data-m-place', 'cloud')
// The model sheet goes through the one door of the mode, so the switch is counted like every other.
// Review M2: the phone counts anonymously through the native layer only. The count per account,
// which this route would see, is never sent.
@@ -1303,7 +1314,7 @@ for (const size of SIZES) {
await page.locator(`[data-testid="m-chat-model-local"][data-m-id="openai::${SMALL}"]`).tap()
await expect(page.getByTestId('m-toast-back-on-device')).toHaveText('Back on device')
await waitForModel(page, SMALL)
- await expect(page.getByTestId('m-chat-cloud-chip')).toHaveCount(0)
+ await expect(page.getByTestId('m-chat-options').last()).toHaveAttribute('data-m-place', 'local')
await backend(page, (ctl) => { ctl.reply = 'Back on the phone.' })
await expect(page.getByTestId('m-chat-regenerate')).not.toHaveAttribute('data-m-risk', 'paid')
await page.getByTestId('m-chat-regenerate').tap()
@@ -1499,7 +1510,7 @@ for (const size of SIZES) {
await back(page)
// C4.1: the camera, with a model that reads images.
- await page.getByTestId('m-chat-model').tap()
+ await openModelSheet(page)
await page.locator(`[data-testid="m-chat-model-local"][data-m-id="openai::${VISION}"]`).tap()
await waitForModel(page, VISION_LABEL)
await page.getByTestId('m-chat-attach').tap()
@@ -1521,7 +1532,7 @@ for (const size of SIZES) {
await expect(page.getByTestId('m-chat-engine-error')).toHaveCount(0)
await expect(page.getByTestId('m-chat-screen').getByText('Not enough memory for this model.')).toHaveCount(1)
expect(await layout(page)).toEqual(CLEAN)
- await page.getByTestId('m-chat-model').tap()
+ await openModelSheet(page)
await expect(page.getByTestId('m-chat-model-engine-error')).toContainText('Not enough memory for this model.')
await expect(page.getByTestId('m-chat-model-engine-retry')).toBeVisible()
expect(await layout(page)).toEqual(CLEAN)
@@ -1598,8 +1609,10 @@ for (const size of SIZES) {
await expect(page.getByTestId('m-sheet-chat-options')).toBeVisible()
await page.getByTestId('m-sheet-close').tap()
- await page.getByTestId('m-chat-context').tap()
- await expect(page.getByTestId('m-sheet-chat-options')).toBeVisible()
+ // Prompt v2: the context chip stands above the field only when it wants attention; the window is in the options.
+ await expect(page.getByTestId('m-chat-context')).toHaveCount(0)
+ await page.getByTestId('m-chat-options').tap()
+ await expect(page.getByTestId('m-options-context')).toBeVisible()
await page.getByTestId('m-sheet-close').tap()
expect(errors()).toEqual([])
})
@@ -1612,7 +1625,8 @@ for (const size of SIZES) {
const one = (await input.boundingBox())!.height
await input.fill(Array.from({ length: 12 }, (_, i) => `line ${i + 1}`).join('\n'))
const many = await input.evaluate((el) => ({ height: el.getBoundingClientRect().height, scroll: el.scrollHeight }))
- expect(many.height).toBeGreaterThan(one * 2)
+ // Prompt v2: the field starts at three lines and grows to about six, so twice the start is more than it takes.
+ expect(many.height).toBeGreaterThan(one * 1.5)
expect(many.scroll).toBeGreaterThan(many.height)
// The composer stays inside the window, with the send button reachable.
const sendBox = (await page.getByTestId('m-chat-send').boundingBox())!
@@ -1735,7 +1749,7 @@ for (const size of SIZES) {
expect(await backend(page, (ctl) => ctl.engineStarts.length)).toBe(1)
expect(await backend(page, (ctl) => ctl.bodies.length)).toBe(1)
// The model sheet reads the same source: the chosen model is in memory.
- await page.getByTestId('m-chat-model').tap()
+ await openModelSheet(page)
await expect(page.getByTestId('m-chat-model-list')).toHaveAttribute('data-m-loaded', 'yes')
await expect(page.getByTestId('m-chat-model-loads-later')).toHaveCount(0)
await page.getByTestId('m-sheet-close').tap()
@@ -1762,7 +1776,7 @@ for (const size of SIZES) {
await expect(line).toHaveAttribute('data-m-reason', 'memory')
expect(await layout(page)).toEqual(CLEAN)
// The sheet of the models says the same.
- await page.getByTestId('m-chat-model').tap()
+ await openModelSheet(page)
await expect(page.getByTestId('m-chat-model-loads-later')).toBeVisible()
await expect(page.getByTestId('m-chat-model-list')).toHaveAttribute('data-m-loaded', 'no')
await page.getByTestId('m-sheet-close').tap()
@@ -2285,7 +2299,7 @@ for (const size of SIZES) {
})
expect(textLeftAlone).toBe(true)
- await page.getByTestId('m-chat-model').tap()
+ await openModelSheet(page)
await page.locator(`[data-testid="m-chat-model-local"][data-m-id="openai::${VISION}"]`).tap()
await waitForModel(page, VISION_LABEL)
await paste(2)
@@ -2437,7 +2451,7 @@ for (const size of SIZES) {
const row = { progress: 40, total: 100, speed: 0, filename: 'Phi-4-mini-Q4_K_M.gguf', status: 'downloading' }
useDownloadStore.setState({ downloads: { 'Phi-4-mini-Q4_K_M.gguf': row }, ownRows: { 'Phi-4-mini-Q4_K_M.gguf': row } })
})
- await page.getByTestId('m-chat-model').tap()
+ await openModelSheet(page)
const download = page.getByTestId('m-chat-model-download')
// N1: the name of the model, not the name of its file.
await expect(download).toContainText('Phi-4-mini-Q4_K_M')
@@ -2470,7 +2484,7 @@ for (const size of SIZES) {
await signInCloud(page)
// C3.10: signed in, no plan.
- await page.getByTestId('m-chat-model').tap()
+ await openModelSheet(page)
await page.getByTestId('m-chat-model-segment-cloud').tap()
await expect(page.getByTestId('m-chat-model-plans-state')).toBeVisible({ timeout: 20_000 })
expect(await layout(page)).toEqual(CLEAN)
@@ -2481,7 +2495,7 @@ for (const size of SIZES) {
// With a plan, and a server that does not hand out the catalogue.
scenario = 'plan'
await signInCloud(page)
- await page.getByTestId('m-chat-model').tap()
+ await openModelSheet(page)
await page.getByTestId('m-chat-model-segment-cloud').tap()
await expect(page.getByTestId('m-chat-model-catalog-error')).toBeVisible({ timeout: 30_000 })
expect(await layout(page)).toEqual(CLEAN)
@@ -2553,7 +2567,7 @@ for (const size of SIZES) {
await boot(page)
await waitForModel(page)
const png = await makePng(page)
- await page.getByTestId('m-chat-model').tap()
+ await openModelSheet(page)
await page.locator(`[data-testid="m-chat-model-local"][data-m-id="openai::${VISION}"]`).tap()
await waitForModel(page, VISION_LABEL)
await page.getByTestId('m-chat-input').fill('Half a thought about tides')
@@ -2612,12 +2626,12 @@ for (const size of SIZES) {
})
// The composer names the model the way the catalogue does, not by its file.
await waitForModel(page, 'SmolLM2 360M')
- await expect(page.getByTestId('m-chat-model')).not.toContainText('Q4_K_M')
+ await expect(page.getByTestId('m-chat-options')).not.toContainText('Q4_K_M')
await expect(page.getByTestId('m-chat-loading-model')).toContainText('Loading SmolLM2 360M')
expect(await layout(page)).toEqual(CLEAN)
// SmolLM2 does not think: no chip and no switch, before the engine was ever asked.
- await expect(page.getByTestId('m-chat-status-thinking')).toHaveCount(0)
+ await expect(page.getByTestId('m-chat-options')).not.toContainText('Thinking')
await page.getByTestId('m-chat-options').tap()
await expect(page.getByTestId('m-sheet-chat-options')).toBeVisible()
await expect(page.getByTestId('m-options-thinking')).toHaveCount(0)
@@ -2634,7 +2648,7 @@ for (const size of SIZES) {
expect(await backend(page, (ctl) => ctl.engineStarts.length)).toBe(1)
await expect(page.getByTestId('m-chat-model-by').last()).toHaveText(/SmolLM2 360M/)
await expect(page.getByTestId('m-chat-model-by').last()).not.toContainText('Instruct')
- await expect(page.getByTestId('m-chat-status-thinking')).toHaveCount(0)
+ await expect(page.getByTestId('m-chat-options')).not.toContainText('Thinking')
expect(await layout(page)).toEqual(CLEAN)
// A toast over the text field must not swallow the tap that was meant for the field.
@@ -2655,7 +2669,7 @@ for (const size of SIZES) {
await page.getByTestId('m-chat-input').fill('')
// The model sheet uses the same names. Qwen3 thinks: there the switch is offered.
- await page.getByTestId('m-chat-model').tap()
+ await openModelSheet(page)
const local = page.getByTestId('m-chat-model-local')
await expect(local).toHaveCount(2)
await expect(local.first()).toContainText('SmolLM2 360M')
@@ -3511,7 +3525,7 @@ test.describe('chat, a provider with the own key', () => {
await waitForModel(page)
// C3.11: the rows of the provider, under its own heading, next to the models of this phone.
- await page.getByTestId('m-chat-model').tap()
+ await openModelSheet(page)
const rows = page.locator('[data-testid="m-sheet-model"] [data-testid="m-chat-model-provider"]')
await expect(rows).toHaveCount(2)
await expect(rows.first()).toContainText('llama-3.3-70b')
@@ -3520,8 +3534,9 @@ test.describe('chat, a provider with the own key', () => {
await rows.first().tap()
await expect(page.getByTestId('m-sheet-model')).toHaveCount(0)
await waitForModel(page, 'llama-3.3-70b')
- // Not a model of this phone: the chip does not say it is one.
- await expect(page.getByTestId('m-chat-model')).toHaveClass(/m-mchip--cloud/)
+ // Not a model of this phone: the settings button names the model and nothing that says it runs here. Prompt v2 has
+ // no chip colour for "elsewhere" any more; data-m-place says LU Cloud or not (a provider costs no LU credits).
+ await expect(page.getByTestId('m-chat-options')).toHaveAttribute('aria-label', 'Chat settings: llama-3.3-70b')
await send(page, 'Hello provider')
await answerDone(page, 'Hello from the provider.')
@@ -4152,7 +4167,7 @@ test.describe('chat, round 3 on the small iPhone', () => {
await page.setViewportSize(SE_SIDE)
await expect(page.locator('html')).not.toHaveClass(/m-kb-open/)
await expect(page.getByTestId('m-chat-attach')).toBeVisible()
- await expect(page.getByTestId('m-chat-model')).toBeVisible()
+ await expect(page.getByTestId('m-chat-options')).toBeVisible()
expect(errors()).toEqual([])
})
})
@@ -4162,7 +4177,8 @@ test.describe('chat, round 3 on the small iPhone', () => {
test('M6: with the keyboard open the chips fold away and the transcript keeps its room', async ({ page }) => {
await openTalk(page)
- await expect(page.locator('.m-composer-status--chips')).toBeVisible()
+ // Prompt v2: nothing warns here, so the status row above the field is empty; the settings button carries the state.
+ await expect(page.getByTestId('m-chat-options')).toBeVisible()
const before = await transcriptHeight(page)
await openKeyboard(page, SE_KEYBOARD)
await expect(page.locator('html')).toHaveAttribute('data-m-room', 'tight')
@@ -4404,7 +4420,7 @@ test.describe('chat, round 3 on the small iPhone', () => {
const { useModelsView } = await import(/* @vite-ignore */ `${location.origin}/src/mobile/screens/models/parts/view.ts`)
useModelsView.getState().setSegment('installed')
})
- await page.getByTestId('m-chat-model').tap()
+ await openModelSheet(page)
await page.getByTestId('m-chat-model-get-more').tap()
await expect(page.getByTestId('m-models-screen')).toBeVisible()
await expect(page.getByTestId('m-models-segment-new')).toHaveAttribute('aria-checked', 'true')
@@ -4420,7 +4436,7 @@ test.describe('chat, round 3 on the small iPhone', () => {
})
await send(page, 'Who are you?')
await answerDone(page)
- await expect(page.getByTestId('m-chat-status-persona')).toContainText('Code Expert')
+ await expect(page.getByTestId('m-chat-options')).toContainText('Code Expert')
const bodies = await backend(page, (ctl) => ctl.bodies as string[])
expect(bodies.at(-1)).toContain('You are an expert software engineer')
// The options say the same, with the name of the persona.
@@ -4433,7 +4449,7 @@ test.describe('chat, round 3 on the small iPhone', () => {
await page.getByTestId('m-options-persona-switch').tap()
await expect(page.getByTestId('m-options-persona-switch')).toContainText('Off: this chat talks to the plain model.')
await page.getByTestId('m-sheet-close').tap()
- await expect(page.getByTestId('m-chat-status-persona')).toHaveCount(0)
+ await expect(page.getByTestId('m-chat-options')).not.toContainText('Code Expert')
await send(page, 'And now?')
await expect(answers(page)).toHaveCount(2)
await answerDone(page)
@@ -4445,7 +4461,7 @@ test.describe('chat, round 3 on the small iPhone', () => {
await waitForModel(page)
await send(page, 'Who are you?')
await answerDone(page)
- await expect(page.getByTestId('m-chat-status-persona')).toHaveCount(0)
+ await expect(page.getByTestId('m-chat-options')).not.toContainText('Code Expert')
expect((await backend(page, (ctl) => ctl.bodies as string[])).at(-1)).not.toContain('You are an expert software engineer')
})
@@ -4466,7 +4482,7 @@ test.describe('chat, round 3 on the small iPhone', () => {
await expect(toggle).toHaveAttribute('aria-checked', 'true')
await expect(toggle).toContainText('On: this chat answers as Code Expert.')
await page.getByTestId('m-sheet-close').tap()
- await expect(page.getByTestId('m-chat-status-persona')).toContainText('Code Expert')
+ await expect(page.getByTestId('m-chat-options')).toContainText('Code Expert')
await send(page, 'And now?')
await expect(answers(page)).toHaveCount(2)
await answerDone(page)
@@ -4582,8 +4598,8 @@ test.describe('chat, round 3 on the small iPhone', () => {
await waitForModel(page)
await send(page, 'Hi')
await answerDone(page)
- const chip = page.getByTestId('m-chat-context')
- await expect(chip).toContainText(/^Context \d+%$/)
+ // Prompt v2: a chat that fits shows no context chip above the field; the window is named in the options.
+ await expect(page.getByTestId('m-chat-context')).toHaveCount(0)
await page.getByTestId('m-chat-options').tap()
await expect(page.getByTestId('m-options-context')).toContainText('One size for all chats')
await page.getByTestId('m-options-context').tap()
@@ -4835,7 +4851,7 @@ test.describe('chat, round 3 on the small iPhone', () => {
await boot(page, { engineThinks: true })
await waitForModel(page)
// Off from the start, although the logic layer starts with it on.
- await expect(page.getByTestId('m-chat-status-thinking')).toHaveCount(0)
+ await expect(page.getByTestId('m-chat-options')).not.toContainText('Thinking')
await page.getByTestId('m-chat-options').tap()
const toggle = page.locator('[data-testid="m-options-thinking"][role="switch"], [data-testid="m-options-thinking"] [role="switch"]')
await expect(toggle).toHaveAttribute('aria-checked', 'false')
@@ -4869,7 +4885,7 @@ test.describe('chat, round 3 on the small iPhone', () => {
await page.getByTestId('m-chat-answer-no-thinking').tap()
await expect(page.getByTestId('m-toast-thinking-off')).toBeVisible()
await answerDone(page, 'Your dog is called Bruno.')
- await expect(page.getByTestId('m-chat-status-thinking')).toHaveCount(0)
+ await expect(page.getByTestId('m-chat-options')).not.toContainText('Thinking')
const lastBody = (await backend(page, (ctl) => ctl.bodies as string[])).at(-1) ?? ''
expect(lastBody).toContain('"enable_thinking":false')
expect(await layout(page)).toEqual(CLEAN)
@@ -5051,14 +5067,14 @@ test.describe('chat, screenshots', () => {
await page.getByTestId('m-chat-voice-gate-later').tap()
// C3: on device, cloud before and after the sign in, the price page.
- await page.getByTestId('m-chat-model').tap()
+ await openModelSheet(page)
await shot(page, 'c3-local')
await page.getByTestId('m-chat-model-segment-cloud').tap()
await expect(page.getByTestId('m-chat-model-signin')).toBeVisible()
await shot(page, 'c3-cloud-signin')
await closeSheet(page)
await signInCloud(page)
- await page.getByTestId('m-chat-model').tap()
+ await openModelSheet(page)
await page.getByTestId('m-chat-model-segment-cloud').tap()
await expect(page.locator('[data-testid="m-sheet-model"] [data-testid^="m-chat-model-cloud"]').first()).toBeVisible({ timeout: 20_000 })
await shot(page, 'c3-cloud')
@@ -5106,7 +5122,7 @@ test.describe('chat, screenshots', () => {
await boot(page, { theme: variant.theme, fontScale: variant.fontScale, models: [] })
await expect(page.getByTestId('m-chat-empty')).toBeVisible()
await shot(page, 'c2-no-model')
- await page.getByTestId('m-chat-model').tap()
+ await openModelSheet(page)
await expect(page.getByTestId('m-chat-model-empty')).toBeVisible()
await shot(page, 'c3-no-model')
})
diff --git a/e2e/mobile/create.mobile.ts b/e2e/mobile/create.mobile.ts
index 1549bf45..c2f4ffdf 100644
--- a/e2e/mobile/create.mobile.ts
+++ b/e2e/mobile/create.mobile.ts
@@ -139,8 +139,9 @@ const CATALOG_MODELS: Record<string, unknown>[] = [
{ id: 'qwen3-tts', label: 'Qwen3 TTS (voices)', kind: 'audio', ops: ['tts'], credits: { base: 800 }, tier: 'standard', weights: 'open' },
{ id: 'qwen3-tts-design', label: 'Qwen3 TTS Voice Design', kind: 'audio', ops: ['tts'], credits: { base: 800 }, tier: 'standard', weights: 'open' },
{ id: 'ace-step-1.5', label: 'ACE-Step 1.5', kind: 'audio', ops: ['music'], lyrics: true, credits: { base: 1800, per_s: 30 }, tier: 'standard', weights: 'open' },
- { id: 'ltx-2-extend', label: 'LTX-2 Extend', kind: 'video', ops: ['extend'], t2v: false, i2v: false, credits: { base: 9000 }, tier: 'older', weights: 'open' },
- { id: 'wan-2.2-animate', label: 'Wan 2.2 Animate', kind: 'video', ops: ['motion'], t2v: false, i2v: false, credits: { base: 12000 }, tier: 'standard', weights: 'open' },
+ // ltx-2-extend and wan-2.2-animate are retired since 24.10.2026 (src/lib/render/retired-models.ts): their successors.
+ { id: 'wan-3.0-extend', label: 'Wan 3.0 Extend', kind: 'video', ops: ['studio'], quote_required: true, tier: 'standard', weights: 'closed' },
+ { id: 'wan-2.2-animate-2', label: 'Wan 2.2 Animate 2', kind: 'video', ops: ['studio'], quote_required: true, tier: 'standard', weights: 'open' },
]
/** A model whose price the server confirms before every run. */
const STUDIO_EDIT_MODEL = { id: 'seedream-5-edit', label: 'Seedream 5 Edit', kind: 'image', ops: ['studio'], quote_required: true, tier: 'best', weights: 'closed' }
@@ -491,8 +492,17 @@ async function pick(page: Page, opener: Locator, files: { name: string; mimeType
await chooser.setFiles(files)
}
+/**
+ * Prompt v2 (c19cc0cad): no tool row above the field and no model chip beside it. "What" and "Model" are the first
+ * rows of the run settings, which the settings button under the field opens.
+ */
+async function openRunRow(page: Page, row: 'm-create-tools-all' | 'm-create-model'): Promise<void> {
+ await tid(page, 'm-create-settings').tap()
+ await tid(page, row).tap()
+}
+
async function chooseTool(page: Page, tool: string): Promise<void> {
- await tid(page, 'm-create-tools-all').tap()
+ await openRunRow(page, 'm-create-tools-all')
await tid(page, `m-create-tools-${tool}`).tap()
await expect(stage(page)).toHaveAttribute('data-m-tool', tool)
}
@@ -549,7 +559,7 @@ async function back(page: Page, screen: string): Promise<void> {
}
async function pickModel(page: Page, id: string): Promise<void> {
- await tid(page, 'm-create-model').tap()
+ await openRunRow(page, 'm-create-model')
await page.locator(`[role="radio"][data-m-id="${id}"]`).tap()
await expect(tid(page, 'm-sheet-create-model')).toHaveCount(0)
}
@@ -786,8 +796,8 @@ for (const size of SIZES) {
await expect(tid(page, 'm-create-empty')).toHaveText('Describe what you want to see.')
await expect(tid(page, 'm-create-prompt')).toHaveValue('')
await typePrompt(page, 'a red fox in the snow')
- await expect(tid(page, 'm-create-price')).toHaveText('300 credits')
- await expect(tid(page, 'm-create-summary')).toContainText('1 image')
+ await expect(tid(page, 'm-create-price')).toHaveText('300')
+ await expect(tid(page, 'm-create-settings')).toContainText('1 image')
await run(page)
const id = await expectResult(page, 'image')
@@ -811,7 +821,7 @@ for (const size of SIZES) {
test('image: the model sheet searches, shows prices and picks; the settings change the run', async ({ page }) => {
const cloud = new Cloud()
await openCreate(page, cloud)
- await tid(page, 'm-create-model').tap()
+ await openRunRow(page, 'm-create-model')
await expect(tid(page, 'm-sheet-create-model')).toBeVisible()
await expectLayout(page, 'K3')
await expect(tid(page, 'm-create-model-cheapest')).toHaveAttribute('data-m-id', 'z-image-turbo')
@@ -825,10 +835,10 @@ for (const size of SIZES) {
await expect(tid(page, 'm-create-model-price')).toBeVisible()
await tid(page, 'm-sheet-back').tap()
await page.locator('[role="radio"][data-m-id="flux-dev"]').tap()
- await expect(tid(page, 'm-create-model')).toContainText('Flux Dev')
+ await expect(tid(page, 'm-create-settings')).toContainText('Flux Dev')
await typePrompt(page, 'a lighthouse')
- await expect(tid(page, 'm-create-price')).toHaveText('1,200 credits')
+ await expect(tid(page, 'm-create-price')).toHaveText('1,200')
await tid(page, 'm-create-settings').tap()
await expect(tid(page, 'm-sheet-run-settings')).toBeVisible()
await expectLayout(page, 'K4')
@@ -839,8 +849,8 @@ for (const size of SIZES) {
await tid(page, 'm-sheet-back').tap()
await expect(tid(page, 'm-create-settings-price')).toContainText('1,200')
await tid(page, 'm-sheet-close').tap()
- await expect(tid(page, 'm-create-summary')).toContainText('16:9')
- await expect(tid(page, 'm-create-summary')).toContainText('High')
+ await expect(tid(page, 'm-create-settings')).toContainText('16:9')
+ await expect(tid(page, 'm-create-settings')).toContainText('High')
await run(page)
await expectResult(page, 'image')
const p = cloud.submits[0].params
@@ -856,8 +866,8 @@ for (const size of SIZES) {
await tid(page, 'm-create-settings').tap()
await tid(page, 'm-create-count-3').tap()
await tid(page, 'm-sheet-close').tap()
- await expect(tid(page, 'm-create-summary')).toContainText('3 images')
- await expect(tid(page, 'm-create-price')).toHaveText('900 credits')
+ await expect(tid(page, 'm-create-settings')).toContainText('3 images')
+ await expect(tid(page, 'm-create-price')).toHaveText('900')
await run(page)
await expectResult(page, 'image')
expect(cloud.submits[0].params.count).toBe(3)
@@ -1018,7 +1028,7 @@ for (const size of SIZES) {
await expect(tid(page, 'm-create-mask-screen')).toHaveAttribute('data-state', 'ready')
await paint(page, [[0.45, 0.5], [0.55, 0.5]])
await tid(page, 'm-create-mask-done').tap()
- await expect(tid(page, 'm-create-price')).toHaveText('2,500 credits')
+ await expect(tid(page, 'm-create-price')).toHaveText('2,500')
await run(page)
await expectResult(page, 'image')
expect(cloud.submits[0].params.op).toBe('eraser')
@@ -1026,15 +1036,18 @@ for (const size of SIZES) {
})
for (const tool of [
- { id: 'removebg', op: 'removebg', price: '1,000 credits' },
- { id: 'upscale', op: 'upscale', price: '1,000 credits' },
+ { id: 'removebg', op: 'removebg', price: '1,000' },
+ { id: 'upscale', op: 'upscale', price: '1,000' },
]) {
test(`${tool.id}: a photo in, a result out`, async ({ page }) => {
const cloud = new Cloud()
await openCreate(page, cloud)
await chooseTool(page, tool.id)
await expect(tid(page, 'm-create-prompt')).toHaveCount(0)
+ // Prompt v2: the fixed model is the row "Model" of the run settings.
+ await tid(page, 'm-create-settings').tap()
await expect(tid(page, 'm-create-model-fixed')).toBeVisible()
+ await tid(page, 'm-sheet-close').tap()
await addSource(page, [photo('cat.png')])
if (tool.id === 'upscale') await tid(page, 'm-create-enhance-4k').tap()
await expect(tid(page, 'm-create-price')).toHaveText(tool.price)
@@ -1052,12 +1065,12 @@ for (const size of SIZES) {
await openCreate(page, cloud)
await chooseTool(page, 'video')
await typePrompt(page, 'waves on a beach')
- await expect(tid(page, 'm-create-price')).toHaveText('40,000 credits')
+ await expect(tid(page, 'm-create-price')).toHaveText('40,000')
await tid(page, 'm-create-settings').tap()
await expect(tid(page, 'm-create-aspect')).toHaveCount(0)
await tid(page, 'm-create-length-8').tap()
await tid(page, 'm-sheet-close').tap()
- await expect(tid(page, 'm-create-price')).toHaveText('64,000 credits')
+ await expect(tid(page, 'm-create-price')).toHaveText('64,000')
await run(page)
await expectResult(page, 'video')
expect(cloud.submits[0]).toMatchObject({ kind: 'video', model: 'wan-2.2-720p' })
@@ -1144,8 +1157,9 @@ for (const size of SIZES) {
await typePrompt(page, 'the train disappears')
await run(page)
await expectResult(page, 'video')
- expect(cloud.submits[1]).toMatchObject({ kind: 'video', model: 'ltx-2-extend', params: { op: 'extend' } })
- expect(String(cloud.submits[1].params.source_url)).toContain('/mock-result/job-1.webm')
+ // The successor of ltx-2-extend is a studio model: it runs as op "studio" and takes the clip as an upload.
+ expect(cloud.submits[1]).toMatchObject({ kind: 'video', model: 'wan-3.0-extend', prompt: 'the train disappears', params: { op: 'studio' } })
+ expect(String(cloud.submits[1].params.video_path)).toMatch(/^inputs\//)
})
test('motion: a portrait follows a motion video', async ({ page }) => {
@@ -1159,7 +1173,9 @@ for (const size of SIZES) {
await run(page)
await expectResult(page, 'video')
expect(cloud.uploads.map((u) => u.role).sort()).toEqual(['source', 'video'])
- expect(cloud.submits[0]).toMatchObject({ model: 'wan-2.2-animate', params: { op: 'motion' } })
+ // The successor of wan-2.2-animate is a studio model: op "studio", the portrait and the clip as uploads.
+ expect(cloud.submits[0]).toMatchObject({ model: 'wan-2.2-animate-2', params: { op: 'studio' } })
+ expect(cloud.submits[0].params).toMatchObject({ source_path: expect.stringMatching(/^inputs\//), video_path: expect.stringMatching(/^inputs\//) })
})
test('enhance a video from the viewer', async ({ page }) => {
@@ -1367,7 +1383,7 @@ for (const size of SIZES) {
await openCreate(page, cloud)
await pickModel(page, 'nucleus-image')
await typePrompt(page, 'a quoted picture')
- await expect(tid(page, 'm-create-price')).toHaveText('1,500 credits')
+ await expect(tid(page, 'm-create-price')).toHaveText('1,500')
await expect(tid(page, 'm-create-price')).toHaveAttribute('data-state', 'known')
expect(cloud.quotes.length).toBeGreaterThan(0)
cloud.quoteCredits = 2100
@@ -1376,7 +1392,7 @@ for (const size of SIZES) {
await expect(tid(page, 'm-create-error')).toContainText('2,100')
await expect(tid(page, 'm-create-error')).toContainText('Nothing was charged')
expect(cloud.submits).toHaveLength(0)
- await expect(tid(page, 'm-create-price')).toHaveText('2,100 credits')
+ await expect(tid(page, 'm-create-price')).toHaveText('2,100')
await run(page)
await expectResult(page, 'image')
expect(cloud.submits).toHaveLength(1)
@@ -1393,7 +1409,7 @@ for (const size of SIZES) {
await expect(tid(page, 'm-create-price')).toHaveAttribute('data-state', 'unavailable', { timeout: 20_000 })
await expect(tid(page, 'm-create-generate')).toBeDisabled()
await expect(tid(page, 'm-create-blocked')).toContainText('Price could not be confirmed')
- await tid(page, 'm-create-summary').tap()
+ await tid(page, 'm-create-settings').tap()
await expect(tid(page, 'm-create-settings-price-retry')).toBeVisible()
// While the server is still down the button asks again and the state stays honest.
const asked = cloud.quotes.length
@@ -1408,7 +1424,7 @@ for (const size of SIZES) {
await expect(tid(page, 'm-create-settings-price')).toContainText('1,500', { timeout: 1500 })
}).toPass({ timeout: 20_000 })
await tid(page, 'm-sheet-close').tap()
- await expect(tid(page, 'm-create-price')).toHaveText('1,500 credits')
+ await expect(tid(page, 'm-create-price')).toHaveText('1,500')
await expect(tid(page, 'm-create-generate')).toBeEnabled()
})
@@ -2028,25 +2044,26 @@ for (const size of SIZES) {
// ---------- every remaining control leads somewhere ----------
- test('tool strip: a chip switches the tool, the source card opens the source sheet', async ({ page }) => {
+ test('tools: What in the run settings switches the tool, the source card opens the source sheet', async ({ page }) => {
const cloud = new Cloud()
await openCreate(page, cloud)
- await expect(tid(page, 'm-create-tools')).toBeVisible()
+ // Prompt v2: no tool row above the field. The tool is the first part of the summary and the row "What".
+ await expect(tid(page, 'm-create-tools')).toHaveCount(0)
for (const tool of ['video', 'removebg', 'upscale', 'eraser', 'animate', 'character', 'lipsync', 'music', 'extend', 'motion', 'image']) {
- await tid(page, `m-create-tool-${tool}`).tap()
- await expect(stage(page)).toHaveAttribute('data-m-tool', tool)
- await expect(tid(page, `m-create-tool-${tool}`)).toHaveAttribute('aria-checked', 'true')
+ await chooseTool(page, tool)
+ await openRunRow(page, 'm-create-tools-all')
+ await expect(tid(page, `m-create-tools-${tool}`)).toHaveAttribute('aria-checked', 'true')
+ await tid(page, 'm-sheet-close').tap()
}
- // The four tools whose names the sweep of the acceptance frame refuses carry the mark on the element, in the
- // strip and in the sheet. The other tools do not (acceptance Android, N9).
+ // The four tools whose names the sweep of the acceptance frame refuses carry the mark on the element in the
+ // sheet. The other tools do not (acceptance Android, N9).
const MARKED = ['animate', 'eraser', 'extend', 'removebg']
const marksOf = (prefix: string) =>
page.evaluate(
({ prefix, names }) => names.map((name) => document.querySelector(`[data-testid="${prefix}-${name}"]`)?.getAttribute('data-m-risk') ?? null),
{ prefix, names: [...MARKED, 'image', 'video', 'upscale'] },
)
- expect(await marksOf('m-create-tool')).toEqual(['paid', 'paid', 'paid', 'paid', null, null, null])
- await tid(page, 'm-create-tools-all').tap()
+ await openRunRow(page, 'm-create-tools-all')
await expect(tid(page, 'm-create-tools-grid')).toBeVisible()
expect(await marksOf('m-create-tools')).toEqual(['paid', 'paid', 'paid', 'paid', null, null, null])
await tid(page, 'm-sheet-close').tap()
@@ -2056,16 +2073,15 @@ for (const size of SIZES) {
await tid(page, 'm-create-count-4').tap()
await tid(page, 'm-create-quality-draft').tap()
await tid(page, 'm-sheet-close').tap()
- await expect(tid(page, 'm-create-summary')).toContainText('4 images')
- await expect(tid(page, 'm-create-summary')).toContainText('Draft')
+ await expect(tid(page, 'm-create-settings')).toContainText('4 images')
+ await expect(tid(page, 'm-create-settings')).toContainText('Draft')
await tid(page, 'm-create-settings').tap()
await tid(page, 'm-create-count-1').tap()
await tid(page, 'm-create-quality-standard').tap()
await tid(page, 'm-sheet-close').tap()
- await expect(tid(page, 'm-create-summary')).toContainText('1 image')
- await expect(tid(page, 'm-create-summary')).toContainText('Standard')
- await tid(page, 'm-create-tool-edit').tap()
- await expect(stage(page)).toHaveAttribute('data-m-tool', 'edit')
+ await expect(tid(page, 'm-create-settings')).toContainText('1 image')
+ await expect(tid(page, 'm-create-settings')).toContainText('Standard')
+ await chooseTool(page, 'edit')
await tid(page, 'm-create-source-add').tap()
await expect(tid(page, 'm-sheet-source')).toBeVisible()
// The camera is the first way in.
@@ -2146,18 +2162,18 @@ for (const size of SIZES) {
await tid(page, 'm-create-settings').tap()
await tid(page, 'm-create-size-8k').tap()
await tid(page, 'm-sheet-close').tap()
- await expect(tid(page, 'm-create-summary')).toContainText('8K')
+ await expect(tid(page, 'm-create-settings')).toContainText('8K')
await expect(tid(page, 'm-create-enhance-8k')).toHaveAttribute('aria-checked', 'true')
await tid(page, 'm-create-enhance-2k').tap()
- await expect(tid(page, 'm-create-summary')).toContainText('2K')
+ await expect(tid(page, 'm-create-settings')).toContainText('2K')
await tid(page, 'm-create-settings').tap()
await expect(tid(page, 'm-create-size-2k')).toHaveAttribute('aria-checked', 'true')
await tid(page, 'm-create-size-4k').tap()
await tid(page, 'm-create-size-2k').tap()
await tid(page, 'm-sheet-close').tap()
- await expect(tid(page, 'm-create-summary')).toContainText('2K')
+ await expect(tid(page, 'm-create-settings')).toContainText('2K')
await tid(page, 'm-create-enhance-8k').tap()
- await expect(tid(page, 'm-create-summary')).toContainText('8K')
+ await expect(tid(page, 'm-create-settings')).toContainText('8K')
await tid(page, 'm-create-enhance-2k').tap()
await run(page)
await expectResult(page, 'image')
@@ -2189,7 +2205,7 @@ for (const size of SIZES) {
const seed = Number(await tid(page, 'm-create-opt-seed').inputValue())
await tid(page, 'm-create-opt-guidance-scale').fill('5')
await tid(page, 'm-sheet-close').tap()
- await expect(tid(page, 'm-create-price')).toHaveText('1,500 credits', { timeout: 20_000 })
+ await expect(tid(page, 'm-create-price')).toHaveText('1,500', { timeout: 20_000 })
await run(page)
await expectResult(page, 'image')
const sent = JSON.stringify(cloud.submits[0].params)
@@ -2290,7 +2306,7 @@ for (const size of SIZES) {
await tid(page, 'm-sheet-back').tap()
await expect(row).toContainText('hardcut')
await tid(page, 'm-sheet-close').tap()
- await expect(tid(page, 'm-create-price')).toHaveText('1,500 credits', { timeout: 20_000 })
+ await expect(tid(page, 'm-create-price')).toHaveText('1,500', { timeout: 20_000 })
await run(page)
await expectResult(page, 'video')
const sent = cloud.submits[0].params.studio_options as { loras?: { path: string; scale: number }[] }
@@ -2311,7 +2327,7 @@ for (const size of SIZES) {
const before = await tid(page, 'm-create-price').textContent()
await tid(page, 'm-create-music-length').fill('120')
await expect(tid(page, 'm-create-price')).not.toHaveText(before ?? '')
- await expect(tid(page, 'm-create-summary')).toContainText('2 min')
+ await expect(tid(page, 'm-create-settings')).toContainText('2 min')
await run(page)
await expectResult(page, 'audio')
const sent = JSON.stringify(cloud.submits[0].params)
@@ -2497,6 +2513,7 @@ for (const size of SIZES) {
await tid(page, 'm-create-save-character-frame-remove').tap()
await expect(tid(page, 'm-create-save-character-frame-remove')).toHaveCount(0)
await tid(page, 'm-create-save-character-frame').tap()
+ await expect(tid(page, 'm-create-save-character-frame-remove')).toHaveCount(1)
await tid(page, 'm-create-save-character-save').tap()
await expect(tid(page, 'm-toast-create-character-saved')).toBeVisible()
expect(cloud.submits).toHaveLength(1)
@@ -2594,7 +2611,7 @@ for (const size of SIZES) {
const cloud = new Cloud()
cloud.catalogDown = true
await openCreate(page, cloud)
- await tid(page, 'm-create-model').tap()
+ await openRunRow(page, 'm-create-model')
await expect(tid(page, 'm-create-model-stale')).toBeVisible()
await expect(tid(page, 'm-create-model-list')).toBeVisible()
cloud.catalogDown = false
@@ -2610,8 +2627,7 @@ for (const size of SIZES) {
await expect(tid(page, 'm-create-model-row').or(tid(page, 'm-create-model-cheapest')).first()).toBeVisible()
await tid(page, 'm-sheet-close').tap()
// A tool the price list has no model for is not offered at all.
- await expect(tid(page, 'm-create-tool-music')).toHaveCount(0)
- await tid(page, 'm-create-tools-all').tap()
+ await openRunRow(page, 'm-create-tools-all')
await expect(tid(page, 'm-create-tools-grid')).toBeVisible()
await expect(tid(page, 'm-create-tools-music')).toHaveCount(0)
await expect(tid(page, 'm-create-tools-video')).toBeVisible()
@@ -2736,7 +2752,7 @@ for (const size of SIZES) {
await card.tap()
await expect(tid(page, 'm-create-screen')).toBeVisible()
await expect(stage(page)).toHaveAttribute('data-m-tool', 'video')
- await expect(tid(page, 'm-create-summary')).toContainText('8 s')
+ await expect(tid(page, 'm-create-settings')).toContainText('8 s')
})
test('showcase while signed in: it leads back to Create', async ({ page }) => {
@@ -2821,7 +2837,7 @@ for (const size of SIZES) {
await tid(page, 'm-create-opt-choice').tap()
await tid(page, 'm-sheet-close').tap()
- await expect(tid(page, 'm-create-price')).toHaveText('1,500 credits', { timeout: 20_000 })
+ await expect(tid(page, 'm-create-price')).toHaveText('1,500', { timeout: 20_000 })
await run(page)
await expectResult(page, 'image')
expect(cloud.uploads).toHaveLength(2)
@@ -3020,7 +3036,7 @@ for (const size of SIZES) {
test('guided presets: style LoRAs on a step, a prompt idea, Cancel refunds, Start over clears', async ({ page }) => {
const cloud = new Cloud()
await openCreate(page, cloud)
- await tid(page, 'm-create-tools-all').tap()
+ await openRunRow(page, 'm-create-tools-all')
await tid(page, 'm-create-tools-presets').tap()
await page.locator('[data-testid="m-create-preset-card"][data-m-id="your-character"]').tap()
const preset = tid(page, 'm-create-preset')
@@ -3083,7 +3099,7 @@ for (const size of SIZES) {
await typePrompt(page, 'a harbour')
await page.locator('[data-testid="m-create-style"][data-m-id="b-cinematic"]').tap()
await expect(tid(page, 'm-create-prompt')).toHaveValue('a harbour, cinematic lighting, shallow depth of field, film grain')
- await expect(tid(page, 'm-create-summary')).toContainText('16:9')
+ await expect(tid(page, 'm-create-settings')).toContainText('16:9')
await tid(page, 'm-create-styles-all').tap()
await expect(tid(page, 'm-create-styles-screen')).toBeVisible()
@@ -3107,7 +3123,7 @@ for (const size of SIZES) {
await tid(page, 'm-create-style-card').filter({ hasText: 'Moody portrait' }).tap()
await expect(tid(page, 'm-create-screen')).toBeVisible()
await expect(tid(page, 'm-create-prompt')).toHaveValue(/soft light, 35mm$/)
- await expect(tid(page, 'm-create-summary')).toContainText('3:4')
+ await expect(tid(page, 'm-create-settings')).toContainText('3:4')
await tid(page, 'm-create-styles-all').tap()
await tid(page, 'm-create-style-remove').tap()
@@ -3523,7 +3539,7 @@ test.describe('create on a low screen', () => {
await expect(tid(page, 'm-sheet-run-settings')).toBeVisible()
await expectLayout(page, 'K4 low')
await tid(page, 'm-sheet-close').tap()
- await tid(page, 'm-create-model').tap()
+ await openRunRow(page, 'm-create-model')
await expectLayout(page, 'K3 low')
await tid(page, 'm-sheet-close').tap()
await run(page)
@@ -3570,11 +3586,11 @@ test.describe('create screenshots', () => {
// K1 empty, K2, K3, K4, K5.
await shot('k1-empty')
- await tid(page, 'm-create-tools-all').tap()
+ await openRunRow(page, 'm-create-tools-all')
await expect(tid(page, 'm-sheet-tools')).toBeVisible()
await shot('k2-tools')
await tid(page, 'm-sheet-close').tap()
- await tid(page, 'm-create-model').tap()
+ await openRunRow(page, 'm-create-model')
await shot('k3-model')
await tid(page, 'm-create-model-price-open').first().tap()
await shot('k3-price')
@@ -3786,9 +3802,13 @@ async function createFit(page: Page): Promise<Fit> {
})
}
+/** Tools whose models price by a studio quote, which needs their inputs first. */
+const STUDIO_PRICED_TOOLS: readonly string[] = ['extend', 'motion']
+
/** What has to be on the first screen of a tool to start it. */
function coreOf(tool: (typeof FIT_TOOLS)[number]): string[] {
- const ids = ['m-create-tools-all', `m-create-tool-${tool}`, 'm-create-summary', 'm-create-price', 'm-create-settings', 'm-create-add-source', 'm-create-generate']
+ // Prompt v2: tool and model are in the run settings; the settings button, Add source and Create with its price.
+ const ids = ['m-create-price', 'm-create-settings', 'm-create-add-source', 'm-create-generate']
if (!['removebg', 'upscale', 'eraser', 'lipsync'].includes(tool)) ids.push('m-create-prompt')
if (['edit', 'removebg', 'upscale', 'eraser', 'animate', 'motion'].includes(tool)) ids.push('m-create-source-add')
return ids
@@ -3804,7 +3824,9 @@ test.describe('create fits on one screen (round 45)', () => {
for (const tool of FIT_TOOLS) {
if (tool !== 'image') await chooseTool(page, tool)
await expect(stage(page)).toHaveAttribute('data-m-tool', tool)
- await expect(tid(page, 'm-create-price')).not.toHaveAttribute('data-state', 'pending')
+ // Extend and Motion run on studio models since the catalogue of 24.10.2026: until a clip is in, the price is
+ // the estimate with its ring ("pending") and the live quote has nothing to ask for. Their layout is measured as it is.
+ if (!STUDIO_PRICED_TOOLS.includes(tool)) await expect(tid(page, 'm-create-price')).not.toHaveAttribute('data-state', 'pending')
const f = await createFit(page)
if (f.examples > 0) problems.push(`${tool}: ${f.examples} examples in the page`)
if (f.shape !== 'tall') problems.push(`${tool}: layout ${f.shape}, not the fixed composer`)
@@ -4020,7 +4042,7 @@ test.describe('3D on the phone', () => {
test('the tool is only there when the catalog lists a 3D model', async ({ page }) => {
const cloud = new Cloud()
await openCreate(page, cloud)
- await tid(page, 'm-create-tools-all').tap()
+ await openRunRow(page, 'm-create-tools-all')
await expect(tid(page, 'm-sheet-tools')).toBeVisible()
await expect(tid(page, 'm-create-tools-3d')).toHaveCount(0)
})
@@ -4035,7 +4057,7 @@ test.describe('3D on the phone', () => {
// The way a fresh phone starts on: a photo, so no prompt field.
await expect(tid(page, 'm-create-prompt')).toHaveCount(0)
await tid(page, 'm-create-3d-way-text').tap()
- await expect(tid(page, 'm-create-model')).toContainText('Hunyuan3D')
+ await expect(tid(page, 'm-create-settings')).toContainText('Hunyuan3D')
await expect(tid(page, 'm-create-3d-detail-card')).toHaveCount(0)
await expect(tid(page, 'm-create-source-empty')).toHaveCount(0)
await expect(tid(page, 'm-create-blocked')).toHaveAttribute('data-m-reason', 'no-prompt')
@@ -4101,7 +4123,7 @@ test.describe('3D on the phone', () => {
await pick(page, tid(page, 'm-create-source-library'), [photo('front.png', 10)])
await expect(tid(page, 'm-sheet-source')).toHaveCount(0)
await expect(tid(page, 'm-create-source')).toBeVisible()
- await tid(page, 'm-create-model').tap()
+ await openRunRow(page, 'm-create-model')
await page.locator(`[data-m-id="${MESH_VIEWS}"]`).first().tap()
await expect(tid(page, 'm-create-3d-sides')).toHaveAttribute('data-state', '0')
await pick(page, tid(page, 'm-create-3d-side-add'), [photo('left.png', 40)])
diff --git a/e2e/mobile/geruest.mobile.ts b/e2e/mobile/geruest.mobile.ts
index fbda8d0c..55a1c944 100644
--- a/e2e/mobile/geruest.mobile.ts
+++ b/e2e/mobile/geruest.mobile.ts
@@ -202,7 +202,7 @@ test.describe('scaffold of the mobile shell', () => {
await expect(page.getByTestId('m-chat-screen')).toBeVisible()
// Without a model the empty chat says how to get one (the text with a model: chat.mobile.ts, round 57).
await expect(page.getByTestId('m-chat-empty')).toBeVisible()
- await expect(page.getByTestId('m-chat-model')).toBeVisible()
+ await expect(page.getByTestId('m-chat-options')).toBeVisible()
await expect(page.getByTestId('m-chat-input')).toBeVisible()
}
// The new chat is no chat of the list until its first message: two starts left nothing behind.
@@ -1038,14 +1038,17 @@ test.describe('kit: composer on its side', () => {
await expect(composer).toBeVisible()
const third = variant.height / 3
expect((await composer.boundingBox())!.height).toBeLessThanOrEqual(third + 0.5)
- // Status chips, attach, options, model and the shared slot are all still there, in one row.
+ // Prompt v2: the one warning, the settings button with its summary, Attach and the shared slot are all still
+ // there, in one row.
const row = await page.evaluate(() => {
const tops = (sel: string) => [...document.querySelectorAll(`[data-testid="m-dev-composer"] ${sel}`)].map((el) => Math.round(el.getBoundingClientRect().top + el.getBoundingClientRect().height / 2))
- return { chips: tops('.m-chip'), buttons: tops('.m-ib'), model: tops('.m-mchip'), slot: tops('.m-send') }
+ return { chips: tops('.m-chip'), buttons: tops('.m-ib'), tune: tops('.m-composer-tune'), slot: tops('.m-send') }
})
- expect(row.chips).toHaveLength(4)
- expect(row.buttons).toHaveLength(2)
- const centres = [...row.chips, ...row.buttons, ...row.model, ...row.slot]
+ expect(row.chips).toHaveLength(1)
+ expect(row.buttons).toHaveLength(1)
+ expect(row.tune).toHaveLength(1)
+ expect(row.slot).toHaveLength(1)
+ const centres = [...row.chips, ...row.buttons, ...row.tune, ...row.slot]
expect(Math.max(...centres) - Math.min(...centres)).toBeLessThanOrEqual(2)
await page.getByTestId('m-dev-composer-input').fill(Array.from({ length: 8 }, (_, i) => `Line ${i + 1} of a long message`).join('\n'))
@@ -1070,7 +1073,8 @@ test.describe('kit: composer on its side', () => {
expect(order.status).toBeLessThan(order.field)
expect(order.field).toBeLessThan(order.row)
const before = (await page.getByTestId('m-dev-composer-input').boundingBox())!.height
- await page.getByTestId('m-dev-composer-input').fill('One\nTwo\nThree\nFour')
+ // Prompt v2: the field starts at three lines, so it takes six to grow by more than 40 px.
+ await page.getByTestId('m-dev-composer-input').fill('One\nTwo\nThree\nFour\nFive\nSix')
const after = (await page.getByTestId('m-dev-composer-input').boundingBox())!.height
expect(after).toBeGreaterThan(before + 40)
})
diff --git a/e2e/mobile/models.mobile.ts b/e2e/mobile/models.mobile.ts
index ac109a20..5107ed34 100644
--- a/e2e/mobile/models.mobile.ts
+++ b/e2e/mobile/models.mobile.ts
@@ -451,7 +451,7 @@ test.describe('a fresh install, no developer switch', () => {
expect((await mock(page).disk()).onboarding).toBe(true)
// The downloaded model is the model of the chat, and it answers.
- await expect(at(page, 'm-chat-model')).not.toContainText('Choose a model')
+ await expect(at(page, 'm-chat-options')).not.toContainText('Choose a model')
await at(page, 'm-chat-input').fill('Are you there?')
await at(page, 'm-chat-send').tap()
await expect(page.locator('[data-testid="m-chat-message"][data-m-role="assistant"]').last()).toContainText('ready', { timeout: 30_000 })
@@ -1864,7 +1864,7 @@ for (const size of SIZES) {
expect(await layoutOf(page)).toEqual(CLEAN)
await said.getByRole('button', { name: 'New chat' }).tap()
await expect(at(page, 'm-chat-screen')).toBeVisible()
- await expect(at(page, 'm-chat-screen').getByTestId('m-chat-model')).toContainText(SMALL.name)
+ await expect(at(page, 'm-chat-screen').getByTestId('m-chat-options')).toContainText(SMALL.name)
await expect(at(page, 'm-chat-screen').getByTestId('m-chat-empty-model')).toContainText(SMALL.name)
// Back leads to the list of chats, not to a page that is gone.
await at(page, 'm-page-back').tap()
diff --git a/e2e/mobile/remote-create.mobile.ts b/e2e/mobile/remote-create.mobile.ts
index 262a8016..124bb156 100644
--- a/e2e/mobile/remote-create.mobile.ts
+++ b/e2e/mobile/remote-create.mobile.ts
@@ -162,6 +162,18 @@ test.afterEach(async () => {
await desk.stop()
})
+
+/**
+ * Prompt v2 (c19cc0cad): no tool row above the field on "My computer". The tools are the group "What" in the
+ * settings sheet, which the settings button under the field opens.
+ */
+async function computerTool(page: Page, id: string): Promise<void> {
+ await page.getByTestId('m-create-computer-settings').tap()
+ await page.getByTestId(`m-create-computer-tool-${id}`).tap()
+ if (await page.getByTestId('m-create-computer-sheet').isVisible()) await page.getByTestId('m-sheet-close').tap()
+ await expect(page.getByTestId('m-create-computer-stage')).toHaveAttribute('data-m-tool', id)
+}
+
test.describe('My computer in Create', () => {
test('signed out of LU Cloud: create an image on the computer, into the gallery, no price, nothing in plain text', async ({ page, context }) => {
const errors = watchErrors(page)
@@ -173,9 +185,11 @@ test.describe('My computer in Create', () => {
// The gate of LU Cloud offers the computer as well.
await page.getByTestId('m-create-gate-computer').tap()
await expect(page.getByTestId('m-create-computer-stage')).toBeVisible()
- await expect(page.getByTestId('m-create-computer-model')).toContainText('FLUX.1 schnell')
+ await expect(page.getByTestId('m-create-computer-settings')).toContainText('FLUX.1 schnell')
await noPrice(page)
- await expect(page.getByTestId('m-create-computer-where')).toHaveText('On your computer')
+ // Prompt v2: where it runs is part of the settings button, "My computer" in the summary, the whole words in its name.
+ await expect(page.getByTestId('m-create-computer-settings')).toContainText('My computer')
+ await expect(page.getByTestId('m-create-computer-settings')).toHaveAttribute('aria-label', /On your computer/)
expect(await measureLayout(page)).toEqual({ overflow: [], small: [], pageScrolls: false })
// Nothing to scroll on 412x915 (round 45).
const scroll = await page.evaluate(() => {
@@ -212,7 +226,7 @@ test.describe('My computer in Create', () => {
desk.sealed!.devices.get(p.sealed.deviceId)!.rights.add('create')
await openCreateTab(page)
await page.getByTestId('m-create-gate-computer').tap()
- const summary = page.getByTestId('m-create-computer-summary')
+ const summary = page.getByTestId('m-create-computer-settings')
await expect(summary).toHaveAttribute('aria-label', /SD 1\.5 · 512x512/)
// Computer decides: the size is not sent, the computer takes the one of the family.
@@ -258,7 +272,7 @@ test.describe('My computer in Create', () => {
desk.create!.pollsToDone = 10_000
await openCreateTab(page)
await page.getByTestId('m-create-gate-computer').tap()
- await page.getByTestId('m-create-computer-tool-video').tap()
+ await computerTool(page, 'video')
await page.getByTestId('m-create-computer-prompt').fill('waves at night')
await page.getByTestId('m-create-computer-generate').tap()
await expect(page.getByTestId('m-create-computer-running')).toHaveAttribute('data-state', 'running', { timeout: 10_000 })
@@ -279,7 +293,7 @@ test.describe('My computer in Create', () => {
desk.sealed!.devices.get(p.sealed.deviceId)!.rights.add('create')
await openCreateTab(page)
await page.getByTestId('m-create-gate-computer').tap()
- await expect(page.getByTestId('m-create-computer-model')).toBeVisible()
+ await expect(page.getByTestId('m-create-computer-settings')).toBeVisible()
// The switch goes off on the computer while the page is open.
desk.create!.enabled = false
await page.getByTestId('m-create-computer-prompt').fill('a fox')
@@ -381,18 +395,21 @@ test.describe('A17: the whole tool row on my computer', () => {
desk.sealed!.devices.get(p.sealed.deviceId)!.rights.add('create')
await openCreateTab(page)
await page.getByTestId('m-create-gate-computer').tap()
+ // Prompt v2: the tool row is the group "What" in the settings sheet.
+ await page.getByTestId('m-create-computer-settings').tap()
for (const id of ['image', 'edit', 'removebg', 'upscale', 'video', 'character', 'music']) await expect(page.getByTestId(`m-create-computer-tool-${id}`)).toBeAttached()
+ await page.getByTestId('m-sheet-close').tap()
await noPrice(page)
expect(await measureLayout(page)).toEqual({ overflow: [], small: [], pageScrolls: false })
await page.screenshot({ path: test.info().outputPath('a17-computer-tools.png') })
// Cutout: not available, the reason of the computer, Create stays off.
- await page.getByTestId('m-create-computer-tool-removebg').tap()
+ await computerTool(page, 'removebg')
await expect(page.getByTestId('m-create-computer-unavailable')).toContainText('Cutting out needs the background model.')
await expect(page.getByTestId('m-create-computer-generate')).toBeDisabled()
// Edit: three photos from the library, a prompt, the computer gets them in order.
- await page.getByTestId('m-create-computer-tool-edit').tap()
+ await computerTool(page, 'edit')
await expect(page.getByTestId('m-create-computer-generate')).toBeDisabled()
await addPhotos(page, 'm-create-computer-photo-add', 3)
await expect(page.getByTestId('m-create-computer-photo')).toHaveCount(3)
@@ -408,7 +425,7 @@ test.describe('A17: the whole tool row on my computer', () => {
expect(edit.mask_id).toBeUndefined()
// Music: style, lyrics, a track that plays on the stage.
- await page.getByTestId('m-create-computer-tool-music').tap()
+ await computerTool(page, 'music')
await page.getByTestId('m-create-computer-prompt').fill('calm piano, slow')
await page.getByTestId('m-create-computer-lyrics').fill('la la la')
await page.getByTestId('m-create-computer-generate').tap()
@@ -417,7 +434,7 @@ test.describe('A17: the whole tool row on my computer', () => {
expect(desk.create!.bodies.find((b) => b.kind === 'music')).toMatchObject({ prompt: 'calm piano, slow', lyrics: 'la la la' })
// Character: the list of the computer, the pick goes with the job.
- await page.getByTestId('m-create-computer-tool-character').tap()
+ await computerTool(page, 'character')
await expect(page.getByTestId('m-create-computer-character')).toHaveText('Mia')
await page.getByTestId('m-create-computer-prompt').fill('Mia at the beach')
await page.getByTestId('m-create-computer-generate').tap()
@@ -425,7 +442,7 @@ test.describe('A17: the whole tool row on my computer', () => {
expect(desk.create!.bodies.at(-1)).toMatchObject({ kind: 'image', character: 'chr_mia' })
// Enhance: one photo, factor 4.
- await page.getByTestId('m-create-computer-tool-upscale').tap()
+ await computerTool(page, 'upscale')
await expect(page.getByTestId('m-create-computer-prompt')).toHaveCount(0)
await expect(page.getByTestId('m-create-computer-photo')).toHaveCount(1)
await page.getByRole('radio', { name: '4x' }).tap()
@@ -473,9 +490,11 @@ test.describe('A17: the whole tool row on my computer', () => {
desk.sealed!.devices.get(p.sealed.deviceId)!.rights.add('create')
await openCreateTab(page)
await page.getByTestId('m-create-gate-computer').tap()
+ await page.getByTestId('m-create-computer-settings').tap()
await expect(page.getByTestId('m-create-computer-tools').getByRole('radio')).toHaveCount(2)
await expect(page.getByTestId('m-create-computer-tool-image')).toBeVisible()
await expect(page.getByTestId('m-create-computer-tool-video')).toBeVisible()
+ await page.getByTestId('m-sheet-close').tap()
await page.getByTestId('m-create-gallery').tap()
await expect(page.getByTestId('m-create-gallery-tabs')).toHaveCount(0)
})
@@ -527,7 +546,7 @@ test.describe('A17: the painted area of an edit on my computer', () => {
desk.sealed!.devices.get(p.sealed.deviceId)!.rights.add('create')
await openCreateTab(page)
await page.getByTestId('m-create-gate-computer').tap()
- await page.getByTestId('m-create-computer-tool-edit').tap()
+ await computerTool(page, 'edit')
await addPhotos(page, 'm-create-computer-photo-add', 1)
await page.getByTestId('m-create-computer-paint').tap()
await expect(page.getByTestId('m-create-mask-screen')).toHaveAttribute('data-state', 'ready')
diff --git a/e2e/mobile/remote-shared.mobile.ts b/e2e/mobile/remote-shared.mobile.ts
index 83fdb034..54ba4481 100644
--- a/e2e/mobile/remote-shared.mobile.ts
+++ b/e2e/mobile/remote-shared.mobile.ts
@@ -382,7 +382,8 @@ test.describe('Remote desktop with shared chats', () => {
await page.getByTestId('m-remote-shared-row').tap()
const chip = page.getByTestId('m-remote-shared-model')
await expect(chip).toHaveAttribute('aria-label', new RegExp(long.replace(/[().]/g, '\\$&')))
- const name = chip.locator('.m-mchip-name')
+ // Prompt v2: the chip is the settings button; the model is the bold first part of its summary.
+ const name = chip.locator('.m-composer-tune-text b')
const cut = await name.evaluate((el) => ({ cut: el.scrollWidth > el.clientWidth, ellipsis: getComputedStyle(el).textOverflow, right: el.getBoundingClientRect().right }))
expect(cut).toMatchObject({ cut: true, ellipsis: 'ellipsis' })
expect(cut.right).toBeLessThanOrEqual(320)
diff --git a/e2e/mobile/remote.mobile.ts b/e2e/mobile/remote.mobile.ts
index a948ab9e..416dad26 100644
--- a/e2e/mobile/remote.mobile.ts
+++ b/e2e/mobile/remote.mobile.ts
@@ -289,7 +289,7 @@ test.describe('remote desktop', () => {
await expect(page.getByTestId('m-toast-remote-connected')).toContainText(`Connected to ${ADDRESS}`)
await expect(page.getByTestId('m-remote-chat-screen').locator('.m-hdr-sub')).toHaveText(`On ${ADDRESS}`)
await expect(page.getByTestId('m-remote-chat-empty')).toBeVisible()
- await expect(page.getByTestId('m-remote-chat-model')).toContainText('qwen3:8b')
+ await expect(page.getByTestId('m-remote-chat-options')).toContainText('qwen3:8b')
expect(await measureLayout(page)).toEqual({ overflow: [], small: [], pageScrolls: false })
await shot(page, 'r4-empty')
@@ -491,7 +491,9 @@ test.describe('remote desktop', () => {
await openHome(page)
await pair(page)
- await page.getByTestId('m-remote-chat-model').tap()
+ // Prompt v2: the model is one level down, settings button, then the row "Model".
+ await page.getByTestId('m-remote-chat-options').tap()
+ await page.getByTestId('m-remote-options-model').tap()
await expect(page.getByTestId('m-sheet-remote-model')).toBeVisible()
await expect(page.getByTestId('m-remote-model-list').locator('.m-row-title')).toHaveText(['qwen3:8b', 'gemma4:e4b'])
await expect(page.getByTestId('m-remote-model-0')).toContainText('Chosen on the desktop')
@@ -499,7 +501,7 @@ test.describe('remote desktop', () => {
await shot(page, 'r4-model-sheet')
await page.getByTestId('m-remote-model-1').tap()
await expect(page.getByTestId('m-sheet-remote-model')).toHaveCount(0)
- await expect(page.getByTestId('m-remote-chat-model')).toContainText('gemma4:e4b')
+ await expect(page.getByTestId('m-remote-chat-options')).toContainText('gemma4:e4b')
desk.delayMs = 4000
await send(page, 'a long one')
@@ -1301,7 +1303,7 @@ test.describe('remote desktop', () => {
await expect(page.getByTestId('m-remote-chat-screen').locator('.m-hdr-sub')).toHaveText('On Office PC')
// A fresh chat, with a model of this desktop.
await expect(page.getByTestId('m-remote-chat-empty')).toBeVisible()
- await expect(page.getByTestId('m-remote-chat-model')).toContainText('office:1b')
+ await expect(page.getByTestId('m-remote-chat-options')).toContainText('office:1b')
await send(page, 'Hello office')
await expect(page.getByTestId('m-remote-chat-answer')).toContainText('From the office.')
await backHome(page)
@@ -1320,7 +1322,7 @@ test.describe('remote desktop', () => {
await expect(page.getByTestId('m-remote-chat-screen').locator('.m-hdr-sub')).toHaveText('On Studio Mac')
await expect(page.getByTestId('m-remote-chat-other-desktop')).toContainText('This chat was held with Studio Mac')
await expect(page.getByTestId('m-remote-chat-other-desktop')).toContainText('connected to Office PC')
- await expect(page.getByTestId('m-remote-chat-model')).toContainText('qwen3:8b')
+ await expect(page.getByTestId('m-remote-chat-options')).toContainText('qwen3:8b')
await page.getByTestId('m-remote-chat-input').fill('and now?')
await expect(page.getByTestId('m-remote-chat-send')).toBeDisabled()
expect(await measureLayout(page)).toEqual({ overflow: [], small: [], pageScrolls: false })
diff --git a/e2e/mobile/settings.mobile.ts b/e2e/mobile/settings.mobile.ts
index 056ecee3..2456543c 100644
--- a/e2e/mobile/settings.mobile.ts
+++ b/e2e/mobile/settings.mobile.ts
@@ -1648,7 +1648,11 @@ for (const size of SIZES) {
await page.getByTestId('m-settings-about-whats-new').tap()
await expect(page.getByTestId('m-whats-new-screen')).toBeVisible()
await expect(page.getByTestId('m-whats-new-version')).toHaveText(`Version ${version.split(' ')[0]}`)
- await expect(page.getByTestId('m-whats-new-notes')).toContainText('What changed since 3.0.7.')
+ // The headline of the version shown, as strand 5 wrote it (3.1.0 brought its own, 3.0.10 had "What changed since 3.0.7.").
+ const notesSource = fs.readFileSync(path.join(HERE, '../../src/mobile/strings/release-notes.ts'), 'utf8')
+ const headline = notesSource.match(new RegExp(`note\\('${version.split(' ')[0].replace(/\./g, '\\.')}', '([^']+)'`))?.[1]
+ expect(headline).toBeTruthy()
+ await expect(page.getByTestId('m-whats-new-notes')).toContainText(headline!)
await expectClean(page)
await page.getByTestId('m-whats-new-got-it').tap()
await expect(page.getByTestId('m-whats-new-screen')).toHaveCount(0)