Skip to content

fix: improve installer error handling, env var uploads, and port detection - #96

Draft
nicknisi wants to merge 2 commits into
mainfrom
nicknisi/greg-friction-log
Draft

fix: improve installer error handling, env var uploads, and port detection#96
nicknisi wants to merge 2 commits into
mainfrom
nicknisi/greg-friction-log

Conversation

@nicknisi

@nicknisinicknisi commented Mar 16, 2026

Copy link
Copy Markdown
Member

Summary

Fixes several bugs and UX gaps in workos install discovered during internal testing on a real-world Next.js + Vercel project.

  • Fix silent commit failure: emitComplete now emits success: false when commit/push/PR fails, instead of always reporting success. Pre-commit hook stderr/stdout is captured and surfaced.
  • Complete env var coverage for Vercel: WORKOS_COOKIE_PASSWORD and NEXT_PUBLIC_WORKOS_REDIRECT_URI are now included when uploading env vars to Vercel.
  • Improve port detection: Detects PORT=NNNN inline env vars in dev scripts and reads .env/.env.local files as fallback before defaulting to 3000.
  • Existing env var conflict detection: Checks for pre-existing WorkOS env vars in Vercel before prompting upload, warns user about potential conflicts.
  • Enhanced agent spinner: Shows file operations (e.g., "Writing auth/route.ts") and elapsed time during the agent step instead of just animated dots.

Companion PR for the skills repo: workos/skills#10

Test plan

  • pnpm typecheck passes
  • pnpm test passes (81 files, 1165 tests — 16 new)
  • pnpm build passes
  • Manual test: run workos install on a Next.js + Vercel project with pre-commit hooks
  • Manual test: verify spinner shows file operations and elapsed time
  • Manual test: verify Vercel upload includes cookie password and redirect URI

@nicknisinicknisi changed the title fix: address Greg's friction log issues for workos installfix: improve installer error handling, env var uploads, and port detectionMar 16, 2026
- Fix silent commit failure: track postInstallError in state machine
context so emitComplete emits success: false when commit/push/PR fails
- Capture pre-commit hook output: stageAndCommit now pipes stderr/stdout
and includes hook output in error messages
- Include WORKOS_COOKIE_PASSWORD and redirect URI in Vercel env uploads
by reading .env.local after generation
- Improve port detection: detect PORT=NNNN in dev scripts and .env files
- Add existing env var conflict detection before Vercel upload prompt
- Enhance agent spinner with file operation names and elapsed time
- Add tests for post-install, port detection, and env var upload
@nicknisi
nicknisiforce-pushed the nicknisi/greg-friction-log branch from 179fa40 to dae0748CompareMarch 20, 2026 16:35
@nicknisi
nicknisi marked this pull request as draft April 3, 2026 15:38
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@nicknisi