#!/usr/bin/env bash set -euo pipefail test -s index.html grep -q '' index.html grep -q 'id="frontend-version">__FRONTEND_VERSION__' index.html grep -q "request('/version')" index.html grep -Fq "credentials: 'same-origin'" index.html grep -q 'id="dialogue" aria-label="Dialoghistorik" role="log" aria-live="polite"' index.html grep -q 'id="message" name="message"' index.html grep -q 'id="microphone" aria-pressed="false"' index.html grep -q 'id="voice-status" role="status" aria-live="polite"' index.html grep -q "window.GameVoice.createVoiceController" index.html grep -q 'Jag förstår – starta mikrofonen' index.html grep -q 'supportsRecognition' voice.js grep -q 'characterVoiceProfile' voice.js grep -q "voiceIdentity: speakingNpc.voice_identity" index.html grep -q "role: 'narrator', voiceIdentity: 'neutral'" index.html grep -q 'COPY voice.js /usr/share/nginx/html/voice.js' Dockerfile grep -q "SpeechRecognition || win.webkitSpeechRecognition" voice.js grep -q "submitMessage(text, 'voice')" index.html grep -q "'screen-reader', 'Skärmläsare'" index.html grep -q "'game-voice', 'Spelets röst'" index.html grep -q "'text-only', 'Endast text'" index.html grep -q "event.key === 'Enter' && !event.shiftKey" index.html grep -q "request('/api/character/draft'" index.html grep -q "request('/api/world/draft'" index.html grep -q "request('/api/dialogue'" index.html grep -q "result.intent === 'move' || result.intent === 'meet'" index.html grep -q 'dialogue_temporarily_unavailable:' index.html grep -q 'id="admin-view"' index.html grep -q '/api/admin/players?' index.html grep -q "request('/api/admin/prompts'" index.html grep -q "request('/api/admin/rules'" index.html grep -q '/api/admin/audit?limit=200' index.html grep -q 'entry.data.external_call' index.html grep -q 'Externt tjänsteanrop' index.html grep -q "request('/api/world/start'" index.html grep -q "request('/api/character'" index.html grep -q 'location = /healthz' nginx/default.conf if grep -Eq 'id="(new-character|world-setup|shop|buy-offer|balance|inventory|place-heading|npc-heading)"|Platsens sinnesintryck|Ekonomi och ägodelar|Köp på platsen|id="status"|id="logout"' index.html; then echo 'The active player UI must not contain permanent data panels, forms, or action buttons.' >&2 exit 1 fi if sed -n '/
/p' index.html | grep '/dev/null; then echo 'Only the microphone control may appear beside the game text input.' >&2 exit 1 fi node --test tests/voice.test.cjs echo 'Frontend source checks passed.'