Skip to content

macOS: fix blank access window and add Finder launch wrappers - #1

Merged
askac merged 2 commits into
mainfrom
fix/macos-tk-access-window
Jul 8, 2026
Merged

macOS: fix blank access window and add Finder launch wrappers#1
askac merged 2 commits into
mainfrom
fix/macos-tk-access-window

Conversation

@askac

@askac askac commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Problem

On macOS with only the Command Line Tools Python (3.9, Apple Tk 8.5), the launcher access window opens but renders no widgets — a silent blank window. Two gaps allowed this:

  1. run.sh only enforces Python >= 3.10 when creating a new venv; an existing older venv is reused without a version check.
  2. Nothing checked the Tk version, and the access window child process has its stderr discarded, so the failure was invisible.

Verified on Darwin 25 (arm64): Apple Tk 8.5 draws an empty window; redraw workarounds (resize/update/withdraw) do not help. Tk 8.6.17 (+quartz) renders correctly.

Changes

  • app.py: probe tkinter / Tk >= 8.6 in-process before spawning the access window; print an actionable console notice (Homebrew python-tk / MacPorts commands) and skip instead of launching a broken window. WSL helper interpreters are not probed.
  • scripts/access_window.py: defensive guard — exit 3 with a stderr hint when Tk < 8.6.
  • run.sh: automatically recreate an existing venv whose Python is < 3.10; extend macOS install guidance (Homebrew python3 python-tk, MacPorts python313 py313-tkinter tk +quartz).
  • run.command / install.command: Finder-double-clickable wrappers, matching run.bat convenience on Windows.

Testing

  • bash -n run.sh, py_compile on both Python files.
  • All 6 access_window tests in tests/agent_backend_smoke.py pass.
  • Live-verified: Tk 8.5 interpreter now exits with the hint (exit 3); Tk 8.6.17 venv renders the window fully.
  • Note: test_wsl_uart_scan_lists_windows_and_wsl_devices fails on this machine on a clean tree too (pre-existing, unrelated).

askac added 2 commits July 9, 2026 02:16
Double-clicking run.command or install.command in Finder opens
Terminal and runs the matching shell script, mirroring what run.bat
provides on Windows.
Apple's bundled Python 3.9 ships Tk 8.5, which opens the access
window but renders no widgets on modern macOS, leaving users with a
silent blank window.

- app.py: check tkinter and Tk >= 8.6 in-process before spawning the
  access window; print an actionable skip notice instead of launching
  a broken window. Helper interpreters (WSL python.exe) are not
  probed since they ship a modern Tk.
- scripts/access_window.py: refuse to build the window below Tk 8.6
  and exit with a hint to use the console Access URL/Token.
- run.sh: recreate an existing venv whose Python is older than 3.10
  (venvs created before the version requirement were silently kept),
  and extend the macOS install guidance with Homebrew python-tk and
  MacPorts alternatives.
@askac
askac force-pushed the fix/macos-tk-access-window branch from 58da548 to 3f610c0 Compare July 8, 2026 18:23
@askac
askac merged commit 7b6cacc into main Jul 8, 2026
2 checks passed
@askac
askac deleted the fix/macos-tk-access-window branch July 8, 2026 18:29
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