fix(dashboard): stop infinite mock loop; add demo-mode warning banner
--dashboard defaulted to looping mock STT forever, so the status page piled up thousands of fake "conversations" (all mock, 0ms, same reply) that looked like real traffic. Now it plays 3 sample utterances then idles; a loud 데모 모드 banner states the turns are mock samples, not real STT/Brain/TTS. Continuous demo moved behind --dashboard-loop-demo. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -179,6 +179,9 @@ PAGE = r"""<!DOCTYPE html>
|
||||
.ev.error{color:var(--err)}
|
||||
.ev .et{flex:0 0 68px;color:#5f7488}
|
||||
code{background:#0c1219;padding:1px 5px;border-radius:5px;border:1px solid var(--line)}
|
||||
.demobar{background:#2a2210;border:1px solid #6b5417;color:var(--warn);border-radius:12px;
|
||||
padding:11px 15px;margin:0 0 16px;font-size:13px;line-height:1.55}
|
||||
.demobar b{color:#ffe08a}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -196,6 +199,7 @@ PAGE = r"""<!DOCTYPE html>
|
||||
</div>
|
||||
</header>
|
||||
<main>
|
||||
<div class="demobar" id="demobar" style="display:none"></div>
|
||||
<div class="comp" id="comp"></div>
|
||||
<div id="turns"></div>
|
||||
<div id="empty" class="empty">아직 대화가 없습니다. 사용자가 말하면 여기에 단계별로 나타납니다.</div>
|
||||
@@ -232,6 +236,18 @@ function renderStatus(s){
|
||||
$('dot').className = 'dot ' + (listening ? 'live' : 'off');
|
||||
$('listen').textContent = listening ? '듣는 중' : (s.running ? '실행 중 (대기)' : '중지됨');
|
||||
const comps = s.components || {};
|
||||
// Demo banner: if the ears/brain/mouth are still mock, everything below is
|
||||
// replayed sample data, not a real conversation. Say so loudly.
|
||||
const mockParts = ['stt','brain','tts'].filter(k => comps[k]==='mock');
|
||||
const bar = $('demobar');
|
||||
if(mockParts.length){
|
||||
bar.style.display='block';
|
||||
bar.innerHTML = '⚠ <b>데모 모드</b> — 실제 음성/STT/두뇌/TTS가 아직 연결되지 않아, 아래 대화는 '
|
||||
+ '실제로 들은 내용이 아니라 <b>목(mock) 예시 스크립트</b>입니다. '
|
||||
+ '실제 엔진(faster-whisper·Claude·MeloTTS)을 붙이면 이 자리에 진짜 발화·지연·오류가 표시됩니다.';
|
||||
} else {
|
||||
bar.style.display='none';
|
||||
}
|
||||
const el = $('comp'); el.innerHTML = '';
|
||||
const names = {source:'눈(소스)', vision:'시각', stt:'귀(STT)', brain:'두뇌', tts:'입(TTS)', text:'텍스트'};
|
||||
for(const k of Object.keys(names)){
|
||||
|
||||
Reference in New Issue
Block a user