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
test(e2e): follow P2's composer into the three specs it turned red
purple8fd677ae6b50
diff --git a/e2e/model-selector-scroll-leak.spec.ts b/e2e/model-selector-scroll-leak.spec.tsindex 0dadf2c8..1c5d92df 100644--- a/e2e/model-selector-scroll-leak.spec.ts+++ b/e2e/model-selector-scroll-leak.spec.ts@@ -38,6 +38,14 @@ import { seedOnboardingDone } from './support/cloud-mock'* wo die Zeile keinen Ueberlauf hat (`scrollWidth === clientWidth`,* gemessen), laeuft der volle Oeffnen/Waehlen/Schliessen-Weg am* Modellwaehler selbst.+ *+ * Seit 3.0.9 (P2, schmales Fenster) bricht die Aktionszeile unter 26rem in+ * zwei Zeilen um: bei 360px laeuft sie nicht mehr ueber (`scrollWidth ===+ * clientWidth`, gemessen 233), Modellwaehler und Send liegen im Fenster. Der+ * Vorfahr hat dort also von sich aus nichts mehr zu verschieben. Damit die+ * Pruefung unten weiter etwas misst, gibt `erzwingeUeberlauf` ihm zur Laufzeit+ * einen ueberbreiten Inhalt; der Schutz (`overflow-clip`) bleibt, was geprueft+ * wird.*//**@@ -63,6 +71,22 @@ async function findeSchneidendenVorfahren(page: Page) {})}+/** Ein 2000px breiter, leerer Inhalt im Vorfahren, damit er etwas zu+ * verschieben haette: ohne Ueberlauf bliebe jede `scrollLeft`-Zuweisung 0,+ * mit `clip` wie mit `hidden`, und die Pruefung saehe nichts. */+async function erzwingeUeberlauf(page: Page, handle: Awaited<ReturnType<typeof findeSchneidendenVorfahren>>) {+ const breit = await page.evaluate((el) => {+ const node = el as HTMLElement | null+ if (!node) return null+ const platz = document.createElement('div')+ platz.setAttribute('aria-hidden', 'true')+ platz.style.cssText = 'flex: 0 0 2000px; width: 2000px; height: 1px'+ node.appendChild(platz)+ return node.scrollWidth > node.clientWidth+ }, handle)+ expect(breit, 'der Vorfahr muss jetzt ueberlaufen').toBe(true)+}+async function scrollLeftVon(page: Page, handle: Awaited<ReturnType<typeof findeSchneidendenVorfahren>>) {return page.evaluate((el) => (el as HTMLElement | null)?.scrollLeft ?? null, handle)}@@ -162,6 +186,7 @@ test(`scrollLeft bleibt 0 bei 360px, auch nach einer echten Interaktion in der Z// Vorfahren landete: eine direkte `scrollLeft`-Zuweisung. `overflow: clip`// lehnt sie ab, `overflow: hidden` (der Zustand vor dem Fix) haette sie// angenommen, siehe die Negativkontrolle unten.+ await erzwingeUeberlauf(page, vorfahr)await page.evaluate((el) => {const node = el as HTMLElement | nullif (node) node.scrollLeft = 300@@ -183,6 +208,7 @@ test('Negativkontrolle: ohne overflow-clip auf dem Vorfahren wirkt eine scrollLeconst vorfahr = await findeSchneidendenVorfahren(page)expect(await scrollLeftVon(page, vorfahr)).toBe(0)+ await erzwingeUeberlauf(page, vorfahr)await page.evaluate((el) => {(el as HTMLElement | null)?.style.setProperty('overflow', 'hidden')}, vorfahr)@@ -196,6 +222,33 @@ test('Negativkontrolle: ohne overflow-clip auf dem Vorfahren wirkt eine scrollLeexpect(nachher, 'mit overflow: hidden statt clip nimmt der Vorfahr die Zuweisung an').not.toBe(0)})+/** 3.0.9: bei 360px bricht die Zeile um, statt ueberzulaufen; Modellwaehler+ * und Send liegen ganz im Fenster, eine echte Maus erreicht sie. */+for (const uiScale of [1, 1.15]) {+test(`bei 360px laeuft die Zeile nicht ueber, Modellwaehler und Send liegen im Fenster, --ui-scale ${uiScale}`, async ({ page }) => {+ await boot(page, 360, 720, uiScale)+ const vorfahr = await findeSchneidendenVorfahren(page)+ const masse = await page.evaluate((el) => {+ const node = el as HTMLElement+ return { sw: node.scrollWidth, cw: node.clientWidth }+ }, vorfahr)+ expect(masse.sw).toBeLessThanOrEqual(masse.cw)+ for (const knopf of [+ page.getByRole('button', { name: 'Select chat model', exact: true }),+ page.getByTestId('composer-send-slot'),+ page.getByTestId('sampling-trigger'),+ ]) {+ const box = await knopf.boundingBox()+ expect(box).not.toBeNull()+ expect(box!.x).toBeGreaterThanOrEqual(0)+ expect(box!.x + box!.width).toBeLessThanOrEqual(360)+ }+ await page.getByRole('button', { name: 'Select chat model', exact: true }).click()+ await expect(page.getByTestId('model-picker-menu')).toBeVisible()+ expect(await scrollLeftVon(page, vorfahr), 'nach dem Oeffnen bei 360px').toBe(0)+})+}+/*** Sichtbarkeitsfall fuer den VoiceButton-Tooltip: diese Runde ruehrt* `ChatInput.tsx`s Werkzeugzeile selbst nicht an (anders als Runde 4, diediff --git a/e2e/persona-sampling.spec.ts b/e2e/persona-sampling.spec.tsindex 42446bb1..d95c7dbb 100644--- a/e2e/persona-sampling.spec.ts+++ b/e2e/persona-sampling.spec.ts@@ -115,7 +115,8 @@ test('a persona made with its own sampling values runs on them, and the chat canawait expect(speaker).toContainText('Baron')await expect(speaker).toContainText('Min P 0.07')await expect(speaker).toContainText('Repeat penalty 1.12')- await expect(page.getByTestId('sampling-panel').getByLabel('Temperature')).toHaveValue('0.35')+ // exact: the "?" next to it is "What temperature does" (3.0.9).+ await expect(page.getByTestId('sampling-panel').getByLabel('Temperature', { exact: true })).toHaveValue('0.35')await page.getByTestId('sampling-close').click()await send(page, 'hello')@@ -129,7 +130,7 @@ test('a persona made with its own sampling values runs on them, and the chat can// The first answer is done before the second turn goes out.await expect(page.getByRole('button', { name: 'Regenerate response' })).toBeVisible({ timeout: 30_000 })await page.getByTestId('sampling-trigger').click()- await page.getByTestId('sampling-panel').getByLabel('Temperature').fill('1.2')+ await page.getByTestId('sampling-panel').getByLabel('Temperature', { exact: true }).fill('1.2')await page.getByTestId('sampling-close').click()await expect(page.getByTestId('sampling-panel')).toHaveCount(0)await expect(page.getByTestId('sampling-trigger')).toContainText('1.20')diff --git a/e2e/sampling-popup.spec.ts b/e2e/sampling-popup.spec.tsindex 7c777164..9ff2b637 100644--- a/e2e/sampling-popup.spec.ts+++ b/e2e/sampling-popup.spec.ts@@ -46,9 +46,13 @@ async function masse(page: Page): Promise<Masse> {return { x: Math.round(b.x), y: Math.round(b.y), w: Math.round(b.width), h: Math.round(b.height) }}const send = document.querySelector('[data-testid="composer-send-slot"]')+ // The row is the first ancestor with a box of its own: since 3.0.9 the send+ // slot sits in a cluster that is `display: contents` in a wide window.+ let row = send?.parentElement ?? null+ while (row && getComputedStyle(row).display === 'contents') row = row.parentElementreturn {textarea: runden(document.querySelector('textarea')),- row: runden(send?.parentElement ?? null),+ row: runden(row),send: runden(send),}})