Skip to content

feat(windows): 트레이 런타임 제어 추가#5

Draft
dkfhddla wants to merge 1 commit into
feature/restore-macos-menubar-runtime-controlfrom
feature/restore-windows-tray-runtime-control
Draft

feat(windows): 트레이 런타임 제어 추가#5
dkfhddla wants to merge 1 commit into
feature/restore-macos-menubar-runtime-controlfrom
feature/restore-windows-tray-runtime-control

Conversation

@dkfhddla

@dkfhddla dkfhddla commented May 13, 2026

Copy link
Copy Markdown
Owner

요약

  • Windows 시스템 트레이에서 codex-lb-cinamon 런타임을 제어할 수 있게 추가합니다.
  • 트레이 메뉴에서 서버 시작, 중지, 상태 새로고침, 대시보드 열기, 로그 열기를 지원합니다.
  • Windows 시작 프로그램 등록/해제와 관련 런처 스크립트, OpenSpec 변경, 단위 테스트를 추가합니다.

변경 내용

  • app/tray.py와 app/windows_startup.py 추가
  • CLI에 Windows tray 실행 및 런타임 제어 옵션 추가
  • run-tray.bat, run-tray.vbs 런처 추가
  • Windows startup 등록과 tray 상태/동작 테스트 추가
  • pystray/Pillow 동적 객체 경계에 타입을 명시해 ty 검증을 통과하도록 보정

PR 관계

검증

  • ruff check app/cli.py app/cli_runtime.py app/tray.py app/windows_startup.py tests/unit/test_cli.py tests/unit/test_cli_runtime.py tests/unit/test_tray.py tests/unit/test_windows_startup.py
  • ty check app/cli.py app/cli_runtime.py app/tray.py app/windows_startup.py tests/unit/test_cli.py tests/unit/test_cli_runtime.py tests/unit/test_tray.py tests/unit/test_windows_startup.py
  • python -m pytest tests/unit/test_cli.py tests/unit/test_cli_runtime.py tests/unit/test_tray.py tests/unit/test_windows_startup.py

@dkfhddla dkfhddla force-pushed the feature/restore-macos-menubar-runtime-control branch from eedaa3e to ef97439 Compare May 13, 2026 06:54
@dkfhddla dkfhddla force-pushed the feature/restore-windows-tray-runtime-control branch from a627f0e to 9703270 Compare May 13, 2026 06:54
@dkfhddla dkfhddla force-pushed the feature/restore-macos-menubar-runtime-control branch from ef97439 to eb89aa2 Compare May 13, 2026 07:05
@dkfhddla dkfhddla force-pushed the feature/restore-windows-tray-runtime-control branch from 9703270 to 90b4ae5 Compare May 13, 2026 07:05
Windows tray 런타임 제어를 macOS 복원 브랜치 위에 별도 커밋으로 다시 추가합니다. ty 검증이 통과하도록 tray 동적 객체 경계에 타입을 명시했습니다.
@dkfhddla dkfhddla force-pushed the feature/restore-macos-menubar-runtime-control branch from eb89aa2 to 4a8a419 Compare May 13, 2026 07:16
@dkfhddla dkfhddla force-pushed the feature/restore-windows-tray-runtime-control branch from 90b4ae5 to 71e4893 Compare May 13, 2026 07:16
@dkfhddla dkfhddla changed the title feat(windows): 트레이 런타임 제어 복원 feat(windows): 트레이 런타임 제어 추가 May 13, 2026

@dkfhddla dkfhddla left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows tray 런타임 제어 변경을 검토했습니다. 큰 흐름은 좋고 테스트/문서/OpenSpec도 맞춰져 있습니다. 다만 Windows 프로세스 핸들 ctypes 선언 누락은 실제 런타임 상태 오판으로 이어질 수 있어 inline으로 1건 남깁니다.

Comment thread app/cli_runtime.py
kernel32 = ctypes.WinDLL("kernel32", use_last_error=True)
handle = kernel32.OpenProcess(process_query_limited_information, False, pid)
if not handle:
error_access_denied = 5

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] ctypes.WinDLL 함수의 restype/argtypes를 지정하지 않으면 기본 반환형이 c_int라서 64-bit Windows에서 OpenProcess가 반환한 HANDLE이 잘리거나 이후 GetExitCodeProcess/CloseHandle 호출에 잘못 전달될 수 있습니다. 이 함수가 False를 돌려주면 load_running_metadata()가 살아 있는 서버 PID 파일을 stale로 지우고 트레이에서 중복 서버 시작까지 이어질 수 있으니, OpenProcess.restype = wintypes.HANDLE 및 각 함수의 인자/반환 타입을 명시해 주세요.

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