Skip to content

Stop presenting a refused terminal geometry report as a launch alert - #105

Merged
yansfil merged 1 commit into
mainfrom
fix/launch-geometry-rejection-alert
Sep 19, 2026
Merged

yansfil merged 1 commit into
mainfrom
fix/launch-geometry-rejection-alert

Conversation

@yansfil

@yansfil yansfil commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Summary

hide를 켤 때마다 "Waiting for the first herdr connection attempt" 모달이 뜨는 문제를 고칩니다.

터미널 뷰는 Herdr가 연결되기 전에 자기 크기를 재고 terminal_viewport, terminal_resize를 스스로 보냅니다.
디스패치 경계는 연결 전이라 그 보고를 거부하고, TerminalHost.replayGeometryIfReady가 연결 뒤 같은 격자를 한 번 다시 보내도록 이미 설계돼 있습니다.
문제는 그 거부가 사용자 동작 거부와 같은 경로(localHerdrMutationRejectionHandler → interactionNotice)로 흘러 모달로 표시되는 것이었습니다.
사용자가 아무것도 하지 않았는데 "기다리라"는 알림이 뜨는 셈입니다.

바뀐 것:

  • LocalHerdrMutationDispatchPolicy.presentsRejection(kind:)를 추가해 셸이 스스로 보내는 두 기하 보고(terminal_resize, terminal_viewport)의 거부는 표시하지 않습니다. 거부 자체와 launch trace 기록(core.dispatch.blocked)은 그대로입니다.
  • CoreBridge.dispatch는 그 정책이 허용할 때만 rejection handler를 부릅니다.

Review focus

  • 사람이 판단할 것: 표시하지 않는 종류를 두 기하 보고로 한정한 선택. terminal_scroll은 사용자의 휠 동작이라 그대로 두었습니다.
  • 위험한 파일: macos/Sources/HerdrMacOS/CoreBridge.swift의 dispatch 거부 분기. 거부 반환값과 trace는 바뀌지 않았고 handler 호출만 조건부가 됐습니다.

Risk surface

  • Failure path: 연결 전 기하 보고는 여전히 .rejected로 돌아가고 trace에 kind=terminal_viewport reason=local_herdr_not_ready로 남습니다. 사용자 동작(탭 생성 등)의 거부는 전과 같이 모달로 보입니다. 새 테스트가 두 경우를 함께 고정합니다.

Evidence

  • 확인한 것: bash scripts/verify-swift.sh test 435개 통과. 새 테스트 aRefusedGeometryReportIsNotPresentedAsARefusedAction: 연결 전 terminal_viewport/terminal_resize는 거부되지만 handler가 0회, create_tab은 거부되며 handler 1회. 기존 테스트의 handler 횟수 기대값을 그에 맞춰 조정했습니다.
  • 확인하지 못한 것과 그 이유: 원인은 코드 경로와 TerminalHost의 기존 주석("A terminal view can lay itself out before the core has confirmed Herdr compatibility. The admission boundary rejects that first geometry")으로 확정했고, launch trace는 info 레벨이라 unified log에 남지 않아 실제 실행의 core.dispatch.blocked 줄은 읽지 못했습니다. 설치 후 재실행에서 모달이 안 뜨는 것을 확인해 코멘트로 남깁니다.

AI tooling

  • 사람이 직접 작성 - [ ] 일부를 AI 도구로 작성 - [x] 대부분을 AI 도구로 작성

손으로 확인한 것: interactionNotice를 설정하는 모든 지점을 훑어 launch 시 자동으로 도달하는 경로가 dispatch 거부 handler뿐임을 대조했습니다.

A terminal view measures itself before the first Herdr connection and
reports its grid on its own (terminal_viewport, terminal_resize). The
dispatch boundary refuses that report until the session is connected, and
the terminal host replays the grid once it is; that part was already the
design. But the refusal went through the same handler as a refused operator
action, so every launch put "Waiting for the first herdr connection
attempt" in a modal the operator had to dismiss.

The dispatch policy now names the two geometry reports as the shell's own
bookkeeping: they are still refused and still recorded in the launch trace,
but their refusal is not presented. A refused operator action is presented
as before.
@yansfil
yansfil merged commit 1f3bf3b into main Sep 19, 2026
5 checks passed
@yansfil
yansfil deleted the fix/launch-geometry-rejection-alert branch September 19, 2026 02:22
@yansfil

yansfil commented Sep 19, 2026

Copy link
Copy Markdown
Contributor Author

설치 확인: main 1f3bf3b를 build_dev_app.sh로 빌드해 /Applications/hide.app을 교체하고 재실행했습니다. 15초 뒤 창을 캡처했을 때 hide 창은 하나뿐이고(1440x900) 알림창은 없었으며 상태줄은 Connected to Herdr였습니다. 이전 번들 백업: ~/hide-bundle-backups/hide-a233c6a-20260919-1123.app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant