Skip to content

feat: add installer-first onboarding and pre-download Linux browser checks - #387

Merged
abrichr merged 1 commit into
mainfrom
growth/installer-first
Aug 22, 2026
Merged

feat: add installer-first onboarding and pre-download Linux browser checks#387
abrichr merged 1 commit into
mainfrom
growth/installer-first

Conversation

@abrichr

@abrichr abrichr commented Aug 22, 2026

Copy link
Copy Markdown
Member

Summary

  • Add scripts/install.sh: installs uv if needed, provisions Python 3.12 (managed interpreter only when no suitable system Python exists), installs openadapt[browser] with the bracket quoting handled internally, and ends with a doctor-style environment check (OS / Python / command / browser status) plus the next command. POSIX sh, macOS + Linux, idempotent (upgrade in place). Pattern ported from the existing openadapt.ai installer.
  • README quickstart becomes installer-first (curl … | sh); the pip two-command path stays as the fallback directly below; short Requirements line added: Python 3.10–3.12 (3.13+ not yet supported — installer provisions a suitable interpreter). No other sections restructured.
  • _browser_setup.py: before downloading Chromium on Linux, probe required shared libraries via ctypes.util.find_library (cheap, offline). If any are missing, print the exact remedy FIRST (sudo python -m playwright install-deps chromium + apt alternative line) and abort cleanly — no wasted download followed by a launch failure.
  • Offline / CDN-blocked install error now includes: manual install command, HTTPS_PROXY hint, cache-copy fallback, and the OPENADAPT_FLOW_NO_AUTO_INSTALL=1 opt-out.

Files changed

  • scripts/install.sh (new, +x)
  • openadapt_flow/_browser_setup.py
  • README.md (quickstart section only)
  • tests/test_browser_setup.py (focused new tests; probes monkeypatched, no network)

Verification

  • Worktree verified at origin/main (583041f) after git fetch before branching
  • ruff check + ruff format --check on changed files: pass
  • pytest tests/test_browser_setup.py tests/test_install_playwright_browser.py: 36 passed, 4 skipped
  • Tutorial-adjacent suites (test_cli_tutorial_break_it.py, test_cli_tutorial_next_steps.py): 23 passed
  • mypy openadapt_flow/_browser_setup.py: no issues
  • python -c "import openadapt_flow": clean
  • sh -n scripts/install.sh: syntax OK; env-check block exercised locally on macOS arm64

Notes / deviations

  • pyproject.toml: requires-python bounds untouched as instructed; no in-package version-check messaging exists (pip itself surfaces the bound), so nothing to improve there.
  • No get-started/install docs exist under docs/ in this repo on main; the installer-first docs surface lives in openadapt-maintenance (docs.openadapt.ai), which is outside this PR's scope.

…hecks

Make the first run survive the five most common fresh-machine failures:

- Add scripts/install.sh (ported from the openadapt.ai installer pattern):
  installs uv if needed, provisions Python 3.12 (managed interpreter only
  when no suitable system Python exists), installs 'openadapt[browser]'
  without any shell quoting on the user's side, and ends with an
  environment check (OS / Python / command / browser status) plus the next
  command. POSIX sh; macOS + Linux.
- README quickstart becomes installer-first; the pip two-command path stays
  as the fallback directly below, with a short Requirements line
  (Python 3.10-3.12).
- _browser_setup.py now probes Chromium's shared libraries via
  ctypes.util.find_library before downloading on Linux; when libraries are
  missing it prints the exact remedy first ('sudo python -m playwright
  install-deps chromium' plus the apt alternative) and aborts cleanly, so
  fresh machines no longer waste a full download on a browser that cannot
  launch.
- The offline/CDN-blocked install error now names the manual command, the
  HTTPS_PROXY hint, the cache-copy fallback, and the
  OPENADAPT_FLOW_NO_AUTO_INSTALL opt-out.

requires-python bounds are unchanged.
@abrichr
abrichr merged commit abac2bb into main Aug 22, 2026
15 checks passed
@abrichr
abrichr deleted the growth/installer-first branch August 22, 2026 21:06
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