Workers P6: Prüfstand für den Reiter Bot-Leads (Desktop und Handy)

Skript-API: botleads({ room, q, page, id }) antwortet wie GET /botleads des Dienstes
(items, total, pageSize 50; Telefon nie bei Heilberufen, gekürzte Stubs nur mit id).
60 sichtbare Einträge in vier Räumen (zwei Seiten), 3 gekürzte Stubs, Heilberufe mit
Altbestand-Telefon, eine http-Quelle, zwei feindliche Quellen, lange Namen und Gründe.
Schalter: faults.botleads, botleadsDelayMs, botleadsEmpty (?botleads=leer), botleadCalls.
Fetch-Weiche und entry.jsx (?bot=<Id>) um die Route und den Deep-Link ergänzt.

Szenarien: botleads (Reiter, Liste, Raumfilter, Blättern mit Fokus, Suche, Leerzustände,
Fehlertexte, Deep-Link, Quellen-Links, Telefon) und handy-botleads (390 x 844: kein
seitliches Scrollen, Knopfhöhe, Kontrast der gekürzten Zeile, Wortumbruch).
Der Pin in workersHarness.test.mjs prüft nun die neue Antwortform statt der leeren Liste.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Sonnet 5.5 committed 2026-10-20 14:43:33 +00:00
1 parent cd532e0cf0
commit 78c8e3fbc2
5 files changed
+709 -11

No files matched your search

@@ -6,6 +6,7 @@
// Satz) kommen als { error } mit diesem Status an, wie vom Dienst (auch 413 „Anfrage zu groß.“). Seit P4 laufen reply, approve-preview,
// start-build und paste über dieselbe Route POST /pult/:id/<Aktion>. Ein Fehler mit status 0 aus der Skript-API bricht die Verbindung ab
// (fetch wirft), damit die Meldung „Kann gesendet sein – Pult neu laden.“ (Zeitüberschreitung, D14) sichtbar wird.
// Seit P6 auch Bot-Leads (GET /botleads?room=&q=&page=&id=): die Route liest die Angaben wie der Dienst (fehlend = leer, page als Zahl, unlesbar = NaN).
// control.calls sammelt jede Anfrage ({ method, path, jwt }), damit der Prüfstand zählen kann.
const reply = (status, body) => ({
@@ -42,6 +43,10 @@ export function createScriptedFetch(api, control) {
if (method === 'GET' && path === '/pult') return reply(200, await api.pult(parsed.searchParams.get('status') ?? undefined))
const action = /^\/pult\/([^/]+)\/([^/]+)$/.exec(path)
if (method === 'POST' && action) return reply(200, await api.pultAction(decodeURIComponent(action[1]), action[2], body))
if (method === 'GET' && path === '/botleads') {
const query = parsed.searchParams
return reply(200, await api.botleads({ room: query.get('room') ?? '', q: query.get('q') ?? '', page: Number(query.get('page') ?? ''), id: query.get('id') ?? '' }))
}
const prospect = /^\/prospect\/([^/]+)$/.exec(path)
if (method === 'GET' && prospect) return reply(200, await api.prospect(decodeURIComponent(prospect[1])))
return reply(404, { error: 'Unbekannter Pfad im Prüfstand.' })