fix(meta-agent): explicit endpoint detect trigger (Enter / button)#295
Conversation
외부 사용자 보고: LM Studio Endpoint 필드에서 `192.168.1.1` 입력 중 `.` (period) 칠 때마다 600 ms 디바운스 후 자동 detect 가 발동하여 부분 입력 상태에서 의도치 않은 검색이 반복되었다. onChange 는 local state 만 갱신하도록 변경하고, debounce 기반 자동 detect 트리거를 제거. 실제 detect 는 후속 commit 에서 Enter 키 + 새로고침 버튼 같은 명시 액션으로만 트리거되도록 한다. 사용처 0 이 된 `debounceRef` 와 `useRef` import 도 함께 정리. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
T1 에서 onChange 자동 detect 가 제거된 뒤, 사용자가 endpoint 입력을 끝낸 시점을 표시할 수 있는 명시 액션 두 가지를 추가한다. - 입력 필드 `onKeyDown` 에서 Enter 키 입력 시 `runDetect()` 호출 (e.preventDefault 로 form submit 동작과 분리). - 옆 새로고침 버튼(RefreshCw) 클릭으로도 동일하게 `runDetect()`. - ollama / lmstudio 양쪽 HTTP endpoint 행에 동일 패턴 적용. i18n: `dialog.meta_agent.endpoint_refresh` 키 추가 (ko/en). 버튼은 title + aria-label 양쪽에 같은 문구를 노출하여 hover / 스크린리더 모두에서 의도를 알 수 있도록 했다. 회귀 가드: - Rust 변경 0 (src-tauri/ 비변경) - MetaAgentSelector 외 컴포넌트 변경 0 - runDetect 호출 4 곳 — 정의 / mount useEffect / onKeyDown / button onClick. onChange 영역 0 (T1 그대로 유지). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request replaces the automatic debounced endpoint detection in MetaAgentSelector.tsx with manual triggers, specifically by pressing the Enter key or clicking a new refresh button. It also introduces the necessary translation strings for the refresh button. The review feedback correctly identifies a UX bug where clicking the nested input or refresh button bubbles up to the parent <label>, causing the agent to be unintentionally selected. A code suggestion is provided to stop event propagation on the container.
| {/* HTTP endpoint editor — Enter 키 또는 새로고침 버튼으로만 | ||
| detect 트리거. onChange 는 local state 갱신만 한다. */} | ||
| {d.kind === "http" && ( | ||
| <div className="flex items-center gap-2"> |
There was a problem hiding this comment.
HTTP 엔드포인트 입력 필드와 새로고침 버튼이 <label> 태그 내부에 중첩되어 있습니다. HTML 표준상 <label> 내부에 라디오 버튼 외의 다른 대화형 요소(Interactive elements)가 존재하면, 해당 요소를 클릭했을 때 이벤트가 버블링되어 라디오 버튼이 원치 않게 선택되는 부작용이 발생합니다.\n\n예를 들어, 현재 다른 에이전트(예: Claude)가 선택된 상태에서 Ollama 엔드포인트의 새로고침 버튼을 클릭하면, Ollama 에이전트가 자동으로 선택되어 버립니다.\n\n이를 방지하기 위해 엔드포인트 에디터 컨테이너(div)에 onClick={(e) => e.stopPropagation()}을 추가하여 클릭 이벤트가 <label>로 전파되는 것을 차단하는 것이 좋습니다.
| <div className="flex items-center gap-2"> | |
| <div className="flex items-center gap-2" onClick={(e) => e.stopPropagation()}> |
…nt UX 매니페스트 4 곳 + Cargo.lock bump. CHANGELOG entry 추가. 핵심 fix: - Windows agents/ .cmd batch arg escape (PR #294, merge a70459e) Rust 1.77+ CVE-2024-24576 fix. agents/ 영역 누락 → win_spawn helper SSOT. - MetaAgent endpoint explicit trigger (PR #295, merge a5c8479) LM Studio Endpoint 자동 detect 제거 → Enter / refresh 버튼. 외부 사용자 (메신저) 보고 2 건 즉시 대응 hotfix. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
외부 사용자 보고
LM Studio Endpoint 입력 필드에서
192.168.1.1을 한 글자씩 입력하던 중 매번.(period) 를 칠 때마다 600 ms 디바운스 후 메타에이전트 detect 가 자동 트리거되어, 부분 입력 상태 (192.168.,192.168.1.등) 로 endpoint 검색이 반복 발동되었다.변경
onEndpointChange에서 자동 detect 디바운스 호출 제거 — local state 갱신만 수행. 사용처 0 이 된debounceRef/useRefimport 정리.onKeyDown=Enter→runDetect()+ 옆 RefreshCw 버튼 (onClick→runDetect()) 추가. ollama / lmstudio 양쪽 동일.dialog.meta_agent.endpoint_refresh추가 (ko/en) — 버튼 title + aria-label 공용 문구.영향 영역:
src/components/tunaflow/MetaAgentSelector.tsxsrc/locales/ko/dialog.json,src/locales/en/dialog.jsonVerification
회귀 가드 grep
git diff src-tauri/→ 변경 0 (Rust 영역 미수정)runDetect호출 = 정의(1) + mountuseEffect(1) + onKeyDown(1) + button onClick(1).onEndpointChange영역 0 호출 — onChange 자동 트리거 완전 제거 확인.e2e 수동 검증 (외부 사용자 영역)
192.168.1.1한 글자씩 입력 → detect 미발동 확인영향 범위
runDetect(default endpoint)호출은 그대로 유지 (line 109useEffect([])).🤖 Generated with Claude Code