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

@@ -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 폴링 명령어를 받아 실제 물리 클릭만 수행하는 '수동적 렌더러' 역할로 격하됨.