Workers P3: Prüfstand um Freigabe, Interessenten-Panel, Anhalten-Rückfrage und Handy erweitert

Echte Seite WorkersPage im Prüfstand (Austausch-Module für Anmeldung, Mitarbeiterliste und Sitzungs-JWT), Skript-API mit Pult, Aktionen und Interessent samt Schaltern für 409, 400, Ausfall und Leerzustand, vier neue Szenarien (Freigabe, Interessent, Anhalten, Handy), jedes Szenario läuft für sich, und der Szenario Desktop bestätigt jetzt die Rückfrage vor dem Anhalten.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Sonnet 5.5 committed 2026-10-18 10:20:29 +00:00
1 parent 686db61e1c
commit 2ed2201b22
9 files changed
+847 -20

No files matched your search

@@ -2,6 +2,8 @@
// beantwortet sie mit der Skript-API. Damit läuft im Prüfstand dieselbe Kette wie im Betrieb (API-Client, Feed, Board), und die
// Ausfälle lassen sich schalten: control.fault = null (gesund) | 'down' (503 ohne JSON wie eine Fehlerseite des Proxys) |
// 'session' (401) | 'hang' (die Antwort kommt nie, wie auf einer toten Verbindung). Kein Netz, kein Appwrite.
// Seit P3 auch Pult (GET /pult, POST /pult/:id/<Aktion>) und Interessent (GET /prospect/:id): Fehler der Skript-API (status + deutscher
// Satz) kommen als { error } mit diesem Status an, wie vom Dienst.
// control.calls sammelt jede Anfrage ({ method, path, jwt }), damit der Prüfstand zählen kann.
const reply = (status, body) => ({
@@ -34,6 +36,12 @@ export function createScriptedFetch(api, control) {
if (method === 'POST' && path === '/pause') return reply(200, await api.pause(body.paused))
if (method === 'GET' && path === '/settings') return reply(200, await api.settings())
if (method === 'PUT' && path === '/settings') return reply(200, await api.saveSettings(body))
// Freigabe-Pult und Interessent (P3); ohne ?status= gilt wie im Dienst offen,in_arbeit
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))
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.' })
} catch (err) {
return reply(err && err.status ? err.status : 500, { error: err && err.message ? err.message : 'Fehler im Prüfstand.' })