Skip to content

Offer to run setup on the first run without wtp - #31

Merged
yoavain merged 3 commits into
mainfrom
ux
Nov 29, 2026
Merged

yoavain merged 3 commits into
mainfrom
ux

Conversation

@yoavain

@yoavain yoavain commented Nov 29, 2026

Copy link
Copy Markdown
Owner
  • Add an offer to run setup when the shell has no wtp command. npm install -g cannot show this step to the user.
  • Ask only before the TUI, list, ls, assign and switch, and only in a terminal. Skip --json and assign --no-cd.
  • Save wtp.setupPrompt false in the global git config after a clear "n". Ctrl+C exits with code 130 and saves nothing.
  • Delete wtp.setupPrompt on setup and on setup --remove.
  • Skip the offer when the profile has the wtp function but the shell has not loaded it. Setup adds nothing there.
  • Skip the offer when setup cannot give the shell a wtp command.
  • Ignore the node_modules/.bin folders on PATH. npx adds its own worktree-pool there. Setup must not write launchers into these folders.
  • Do not ask when stderr is not a terminal. The user cannot see the question there.
  • End a successful setup with one "Next:" line. Hide the other hints about the shell in that run.
  • Add askAnswer under askYesNo. The offer must tell a clear no from Ctrl+C and from other input.
  • Update the install section of the README with two steps. Keep the step labels outside the code block. cmd passes a # comment to npm as arguments.
  • Add tests for the offer, the answers and wtp.setupPrompt.
  • Stub resetPrompt in the setup tests. The real function changes the global git config of the developer.

* Add an offer to run setup when the shell has no wtp command. npm install -g cannot show this step to the user.
* Ask only before the TUI, list, ls, assign and switch, and only in a terminal. Skip --json and assign --no-cd.
* Save wtp.setupPrompt false in the global git config after a clear "n". Ctrl+C exits with code 130 and saves nothing.
* Delete wtp.setupPrompt on setup and on setup --remove.
* Skip the offer when the profile has the wtp function but the shell has not loaded it. Setup adds nothing there.
* Skip the offer when setup cannot give the shell a wtp command.
* Ignore the node_modules/.bin folders on PATH. npx adds its own worktree-pool there. Setup must not write launchers into these folders.
* Do not ask when stderr is not a terminal. The user cannot see the question there.
* End a successful setup with one "Next:" line. Hide the other hints about the shell in that run.
* Add askAnswer under askYesNo. The offer must tell a clear no from Ctrl+C and from other input.
* Update the install section of the README with two steps. Keep the step labels outside the code block. cmd passes a # comment to npm as arguments.
* Add tests for the offer, the answers and wtp.setupPrompt.
* Stub resetPrompt in the setup tests. The real function changes the global git config of the developer.
@codecov

codecov Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.77465% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.75%. Comparing base (815018a) to head (a10b46a).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/cli/first-run.ts 94.73% 1 Missing and 1 partial ⚠️
src/cli/commands/setup.ts 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #31      +/-   ##
==========================================
+ Coverage   84.23%   84.75%   +0.52%     
==========================================
  Files          57       58       +1     
  Lines        1605     1660      +55     
  Branches      531      555      +24     
==========================================
+ Hits         1352     1407      +55     
- Misses        121      122       +1     
+ Partials      132      131       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

* Set sourceMap to false in tsconfig.build.json. The package does not ship the src files for the maps.
* Add a prebuild script to delete dist. A build does not remove old files, so npm pack includes them.
* Add rimraf 6.1.4 for this script. Snyk rates it Healthy. Sibling projects use it too.
@yoavain
yoavain merged commit 8f287c4 into main Nov 29, 2026
12 checks passed
@yoavain
yoavain deleted the ux branch November 29, 2026 12:05
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