fix: Befunde der Oberflächenprüfung vor 1.0.0 behoben (#1284)

Überblick zeigt geladene Modelle sofort, Dialoge schließen nur am Hintergrund,
Handy-Ansicht von Modellen und Modellsuche, Ausfallhinweise, Protokoll mit
Leerzustand und Tastaturbedienung, Fußzeile nennt Chat.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-03 14:46:24 +01:00
parent efaeed83fd
commit b237f916e7
12 changed files with 147 additions and 13 deletions

View File

@ -11,6 +11,7 @@ eingebauten WebSocket von Node (kein Paket, keine Installation). Sie laufen gege
| `streaming-scroll.mjs` | Beim Streaming nicht weggescrollt werden, Markierung bleibt, Rücksprung-Knopf (braucht `fake_llama_lang.py` als `llama_cpp.binary`) | `browser2bedienung.2` |
| `fokus-aktualisierung.mjs`, `fokus-aktualisierung-knopf.mjs` | Fokus und Cursor bei der Aktualisierung der Modellseite (zweites Modell `zweit` nötig) | `browser2bedienung.3` |
| `admin2update.mjs` | Kanal-Auswahl der Update-Prüfung: zwei Knöpfe, Meldungen, Audit mit Kanal, Nutzer abgelehnt (#1212) | `admin2update.1` bis `.4` (Stand 23.11.2026 lokal ✓) |
| `befunde-1284.mjs` | Befunde der Oberflächenprüfung vor 1.0.0: Dialog schließt nur am Hintergrund, Aktionsspalte am Handy, Modellsuche ohne Überlauf, Protokoll mit Leerzustand und Tastatur, Ausfallhinweis | `browser2bedienung.6` |
| `kontrast.mjs` | Textkontrast aller sichtbaren Texte auf allen Seiten, hell und dunkel, Verläufe einzeln (Grenze 4,5:1, großer Text 3:1) | `browser2bedienung.4` |
| `fokusring.mjs` | Fokusring von Knopf, Link, Feld und Auswahl in beiden Themes | `browser2bedienung.4` |
| `embeddings.mjs` | Reiter Embeddings, Knöpfe je Modellart, Vektor-Test (Testinstanz mit bge-m3 und einem Chat-Modell, Standard-Port 18097) | `browser2embeddings.1` bis `.3` |

View File

@ -0,0 +1,46 @@
// Befunde der Oberflächenprüfung vor 1.0.0 (#1284) in einem echten Chromium nachprüfen: Dialog, Aktionsspalte,
// Modellsuche, Leerzustand und Tastatur im Protokoll, Ausfallhinweis. Testinstanz mit mindestens einem Modell mit
// Bearbeiten-Dialog und llama.cpp mit model_roots; Aufruf: NEXUS_BASE=… node befunde-1284.mjs <Testpasswort>
import { start } from './lib.mjs';
const BASE = process.env.NEXUS_BASE || 'http://127.0.0.1:18112';
const warte = ms => new Promise(r => setTimeout(r, ms));
const b = await start({ port: 9488 });
await b.login(BASE, process.env.NEXUS_USER || 'claude', process.argv[2]);
b.vp = async (w, thema) => { await b.viewport(w, w < 700 ? 844 : 900, { mobile: w < 700 }); await b.send('Emulation.setEmulatedMedia', { features: [{ name: 'prefers-color-scheme', value: thema }] }); };
b.seitlich = () => b.eval('document.documentElement.scrollWidth - document.documentElement.clientWidth');
b.text = (n = 1500) => b.eval(`(document.querySelector('main')||document.body).innerText.slice(0,${n})`);
b.key = async (key, code, vk) => { for (const type of ['keyDown', 'keyUp']) await b.send('Input.dispatchKeyEvent', { type, key, code, windowsVirtualKeyCode: vk }); await warte(80); };
let fehler = 0;
const ok = (name, bed, info='') => { if (!bed) { fehler++; } console.log((bed?'ok ':'FEHLER ') + name + (info?' ['+info+']':'')); };
const maus = async (x,y) => { for (const type of ['mousePressed','mouseReleased']) await b.send('Input.dispatchMouseEvent',{type,x,y,button:'left',clickCount:1}); await warte(250); };
try {
await b.vp(1280,'dark'); await b.goto(BASE+'/ui/modelle');
const knopf = await b.eval(`[...document.querySelectorAll('[data-dialog^="dlg-"]')].map(e=>e.getAttribute('data-dialog')).find(i=>document.getElementById(i)?.querySelector('input,select'))`);
await b.eval(`document.querySelector('[data-dialog="${knopf}"]').click()`); await warte(300);
const r = await b.eval(`(()=>{const r=document.getElementById('${knopf}').getBoundingClientRect();return [r.left,r.top,r.right,r.bottom]})()`);
const offen = () => b.eval(`document.getElementById('${knopf}').open`);
await maus(r[0]+4, r[1]+4); ok('U2 Klick in den Innenrand lässt den Dialog offen', await offen());
await maus(r[0]+4, (r[1]+r[3])/2); ok('U2 Klick in eine Lücke am Rand lässt ihn offen', await offen());
await maus(Math.max(2, r[0]-30), r[1]+10); ok('U2 Klick auf den Hintergrund schließt', !(await offen()), JSON.stringify(r.map(Math.round)));
await b.vp(390,'dark'); await b.goto(BASE+'/ui/modelle');
ok('U3 Aktionsspalte klebt am Handy nicht', (await b.eval(`getComputedStyle(document.querySelector('td.aktionen')).position`))==='static');
await b.vp(1280,'dark'); await b.goto(BASE+'/ui/modelle');
ok('U3 am breiten Schirm klebt sie weiter', (await b.eval(`getComputedStyle(document.querySelector('td.aktionen')).position`))==='sticky');
await b.vp(390,'dark'); await b.goto(BASE+'/ui/engines?suche=llama.cpp'); await warte(800);
ok('U5 Modellsuche ohne seitliches Scrollen der Seite', (await b.seitlich())<=1 && await b.eval(`!!document.querySelector('.engine-suche table')`), 'ueberlauf '+await b.seitlich());
await b.vp(1280,'dark'); await b.goto(BASE+'/ui/protokoll?reiter=anfragen&q=gibtsnichtxyz');
ok('U6 Leerzustand', (await b.text(2000)).includes('Keine Einträge für diese Auswahl'));
await b.goto(BASE+'/ui/protokoll?reiter=anfragen');
await b.eval(`document.querySelector('form[data-auto] select[name=zeit]').focus()`);
const wert = () => b.eval(`document.querySelector('select[name=zeit]').value`);
const vor = await wert();
await b.key('ArrowDown','ArrowDown',40); await warte(300); await b.key('ArrowDown','ArrowDown',40); await warte(300);
const mitte = await wert(); const url1 = await b.eval('location.search');
await warte(2800);
const url2 = await b.eval('location.search'); const fokus = await b.eval('document.activeElement.name||document.activeElement.tagName');
ok('U7 zwei Pfeiltasten ohne Neuladen dazwischen', mitte!==vor && !url1.includes('zeit=') , vor+' -> '+mitte+' '+url1);
ok('U7 nach der Pause geladen, Fokus auf der Auswahl', url2.includes('zeit='+mitte) && fokus==='zeit', url2+' fokus '+fokus);
await b.goto(BASE+'/ui/modelle'); await b.eval(`window.fetch = () => Promise.reject(new Error('aus'))`); await warte(11000);
ok('U4 Modellseite meldet den Ausfall', (await b.eval(`document.getElementById('mod-stand').textContent`)).length>0, await b.eval(`document.getElementById('mod-stand').textContent`));
} catch (e) { fehler++; console.log('Abbruch', e.message); } finally { b.close(); }
process.exit(fehler ? 1 : 0);