feat: Chats umbenennen (#1187); fix: ausgeblendete Elemente wirklich unsichtbar, Denkstufe nur bei bestätigtem Test (#1188); Version 0.1.17-rc4

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GmHhg6sxZ8wsKZAVLQ6Xj5
This commit is contained in:
2026-11-21 22:10:03 +01:00
parent 6db1eb6101
commit cf0b3fb0c3
9 changed files with 128 additions and 12 deletions

View File

@ -0,0 +1,18 @@
// Denkstufe im Chat nur bei Modellen mit bestätigtem Test (#1157): ungeprüft ausgeblendet (auch wirklich unsichtbar), „ja“ sichtbar.
// Aufruf: node chat-denkstufe.mjs <Passwort> (Testinstanz mit Modell „chat“ (ungeprüft) und „chat-denk“ (Spalte denkstufe = 'ja' in der Datenbank))
import * as cdp from './lib.mjs';
const BASE=process.env.NEXUS_BASE||'http://127.0.0.1:18123', pw=process.argv[2];
const b=await cdp.start({port:9373});
const ok=(n,c,d='')=>{console.log(`${c?'ok ':'FEHLER'} ${n}${d?' – '+d:''}`); if(!c) process.exitCode=1;};
const warte=ms=>new Promise(r=>setTimeout(r,ms));
const sichtbar=()=>b.eval(`(()=>{const l=document.getElementById('chat-denkstufe').closest('label'); const r=l.getBoundingClientRect(); return {display:getComputedStyle(l).display, breite:Math.round(r.width), hoehe:Math.round(r.height)};})()`);
try{
await b.login(BASE,'claude',pw); await b.goto(BASE+'/ui/chat'); await warte(1000);
const wahl=async m=>{ await b.eval(`(()=>{const s=document.getElementById('chat-modell'); s.value=${JSON.stringify(m)}; s.dispatchEvent(new Event('change',{bubbles:true}));})()`); await warte(300); };
await wahl('chat'); let s=await sichtbar();
ok('ungeprüftes Modell: Denkstufe unsichtbar (display none, keine Fläche)', s.display==='none' && s.breite===0 && s.hoehe===0, JSON.stringify(s));
await wahl('chat-denk'); s=await sichtbar();
ok('Modell mit bestätigtem Test: Denkstufe sichtbar', s.display!=='none' && s.breite>0, JSON.stringify(s));
await wahl('chat'); s=await sichtbar();
ok('zurück zum ungeprüften Modell: wieder unsichtbar, ohne Wert', s.display==='none' && (await b.eval(`document.getElementById('chat-denkstufe').value`))==='', JSON.stringify(s));
}catch(e){console.log('Fehler im Lauf:',e.message); process.exitCode=1;} finally{b.close();}