fix(bridge): eliminate discord empty embed spam by disabling DOM observer proactive pending

- removed PATS in observer-script.ts
- step-probe.ts now handles 100% of pending detection with full RPC payload context
- DOM observer restricted to trigger-click polling only
This commit is contained in:
Variet Worker
2026-04-10 16:12:15 +09:00
parent 2ece05fc6f
commit b88e75b075
3 changed files with 20 additions and 7 deletions

View File

@@ -5,4 +5,5 @@
| NNN | HH:MM | <20>𡢾<EFBFBD> <20><EFBFBD> | 儢月<E584A2><E69C88><EFBFBD> | <20><><EFBFBD> 諻拘庖 |
|---|---|---|---|---|
| 001 | 15:53 | Gravity Bridge AI <20>炣䠀 <20>𣽁擪<F0A3BD81><EFBFBD> <20><><EFBFBD><EFBFBD><><20>趣擪 (extractPlannerText <20><>鹻 諻<> Nested 魽堅<E9ADBD> 黺𥯆<E9BBBA>) | TBD | <20><> |
| 002 | 16:05 | Gravity Bridge 빠른 응답 누락 오류 해결 (IDLE-to-IDLE 패스 로직 완화) | TBD | ✅ |
| 002 | 16:05 | Gravity Bridge 赬𧙖斥 <20>炣䠀 <20><><20><EFBFBD> <20>湊盒 (IDLE-to-IDLE <20>到擪 諢𨰰<E8ABA2> <20><><EFBFBD>) | TBD | <20><> || 003 | 16:12 | [Bridge] DOM Observer 螃鬚雖 寡薯 (PATS 綠<><EFBFBD>)煎 綴 皎等晦 蛤蝶囀萄 憲葡 熱薑 | TBD | ? |

View File

@@ -0,0 +1,15 @@
# [Bridge] Disable DOM Observer Proactive Pending to Fix Empty Bots
- **시간**: 2026-04-10 16:12
- **Commit**: TBD
- **Vikunja**: TBD
## 문제 원인
- 디스코드에 Running 1 comman d 나 내용 없는 Allow 가 반복적으로 전송되는 문제.
- 원인은 v3 DOM Observer 스크립트가 Native UI에서 발생시키는 빈 껍데기 알림(POST /pending)들이, 정상적으로 본문 정보를 모두 추출해 기다리고 있는 step-probe.ts의 완벽한 Pending을 덮어씌우거나 먼저 처리되어버렸기 때문임.
- 단어 경계(\b) 정규식 필터조차 VS Code 렌더링 시 노드 줄바꿈 이슈 등으로 인해 완벽한 방어가 불가능했음.
## 해결 방법
- observer-script.ts에서 버튼 텍스트를 감지해 능동적으로 Pending을 생성하는 기능(PATS 배열)을 **전면 비활성화(배열 비움)**.
- 이로써, 오직 100% 신뢰 가능한 SDK RPC(step-probe.ts)만이 대기 상태(WAITING)와 명령어 상세 정보를 포착해 Pending을 생성함.
- DOM Observer는 브릿지가 보내는 /trigger-click 폴링 명령어를 받아 실제 물리 클릭만 수행하는 '수동적 렌더러' 역할로 격하됨.

View File

@@ -275,12 +275,9 @@ export function generateApprovalObserverScript(_port: number): string {
// ONLY positive triggers should initiate a pending request group.
// Negative/secondary buttons (Deny, Reject, Dismiss) will be collected as siblings.
var PATS=[
{re:/^(?:Always\s*)?Run\b/i, type:'terminal_command'},
{re:/^(?:Always\s*)?Accept(?: all)?\b/i, type:'diff_review'},
{re:/^(?:Always\s*)?Accept\b/i, type:'agent_step'},
{re:/^(?:Always\s*)?Allow\b/i, type:'permission'},
{re:/^(?:Always\s*)?Approve\b/i, type:'agent_step'},
{re:/^Retry\b/i, type:'error_recovery'},
// ALL PATS removed to prevent UI-level False Positives and "Empty Body" payloads.
// 100% of pending detection is now handled by step-probe.ts which has full RPC context.
// The DOM observer remains strictly for 'trigger-click' (executing physical clicks on fallback).
];
// ALL actionable button patterns (for grouping siblings in same container)