From 0f1b3ae309ef48bff12b1467c9b670744f54988a Mon Sep 17 00:00:00 2001 From: dj-oyu <68707227+dj-oyu@users.noreply.github.com> Date: Wed, 25 Feb 2026 12:00:46 +0900 Subject: [PATCH] fix(miniapp): pigeon always visible; secretary shows only during plan mode - Add fallback position for heartbeat pigeon so stale cached map.js (missing MAP_POSITIONS.heartbeat) no longer renders at NaN coords - Secretary starts alive=false; appears/disappears in sync with conductor plan_* state changes via _orchSetState Co-Authored-By: Claude Sonnet 4.6 --- pkg/miniapp/static/index.html | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkg/miniapp/static/index.html b/pkg/miniapp/static/index.html index e51e81e9b..cf0424a8f 100644 --- a/pkg/miniapp/static/index.html +++ b/pkg/miniapp/static/index.html @@ -1824,8 +1824,8 @@ function _orchMakeChar(id, emoji, home) { function _orchInitChars() { _orchConductor = _orchMakeChar('conductor', '👑', MAP_POSITIONS.conductor); _orchSecretary = _orchMakeChar('secretary', '👩‍💼', MAP_POSITIONS.secretary); - _orchHeartbeat = _orchMakeChar('heartbeat', '🕊️', MAP_POSITIONS.heartbeat); - _orchConductor.alive = true; _orchSecretary.alive = true; _orchHeartbeat.alive = true; + _orchHeartbeat = _orchMakeChar('heartbeat', '🕊️', MAP_POSITIONS.heartbeat || {x:230,y:58}); + _orchConductor.alive = true; _orchSecretary.alive = false; _orchHeartbeat.alive = true; _orchConductor.statusText = null; _orchHeartbeat.facing = 1; _orchHeartbeat.flipTimer = 0; var ps = [{id:'s0',emoji:'🔍'},{id:'s1',emoji:'📊'},{id:'s2',emoji:'💻'}, @@ -1857,6 +1857,12 @@ function _orchSetState(c, state, tool) { else if (state==='plan_executing') c.statusText='▶️'; else if (state==='plan_completed') c.statusText='✅'; else c.statusText=null; + // Secretary appears only during plan mode. + var inPlan = state.indexOf('plan_')===0; + if (_orchSecretary.alive !== inPlan) { + _orchSecretary.alive = inPlan; + _orchSyncBadge('secretary', _orchSecretary.state, _orchSecretary.alive); + } } } function _orchMoveTo(c, pos, cb) { c.target=pos; c._onArrive=cb||null; }