fix: setup UX improvements (#114) #115

Merged
xiaomo merged 1 commits from fix/114-setup-ux into main 2026-06-05 15:45:03 +00:00
Owner

What

Address all 6 feedback items from #114.

Changes

🔴 Main fixes

  1. setup validates adapterwhich uwf-<agent> + which hermes (for uwf-hermes), prints install command if missing
  2. PATH guidance shell-agnostic — lists common shell configs (bashrc/zshrc/profile/fish), no hardcoded file
  3. ENOENT friendly error"uwf-hermes" not found in PATH. Run: which uwf-hermes instead of raw spawn error

🟡 Minor fixes

  1. SQLite warning suppressedNODE_OPTIONS=--disable-warning=ExperimentalWarning injected into spawned adapter processes
  2. VERSION bug fixed — bootstrap was reading util package version (0.1.2), now reads cli package version. Uses walk-up search to work from both src/ and dist/
  3. setup prints config pathConfig saved to ~/.uwf/config.yaml ✓ on stderr after successful write

Tests

806/806 passing

Ref

Fixes #114

## What Address all 6 feedback items from #114. ## Changes ### 🔴 Main fixes 1. **setup validates adapter** — `which uwf-<agent>` + `which hermes` (for uwf-hermes), prints install command if missing 2. **PATH guidance shell-agnostic** — lists common shell configs (bashrc/zshrc/profile/fish), no hardcoded file 3. **ENOENT friendly error** — `"uwf-hermes" not found in PATH. Run: which uwf-hermes` instead of raw spawn error ### 🟡 Minor fixes 4. **SQLite warning suppressed** — `NODE_OPTIONS=--disable-warning=ExperimentalWarning` injected into spawned adapter processes 5. **VERSION bug fixed** — bootstrap was reading util package version (0.1.2), now reads cli package version. Uses walk-up search to work from both src/ and dist/ 6. **setup prints config path** — `Config saved to ~/.uwf/config.yaml ✓` on stderr after successful write ## Tests 806/806 passing ✅ ## Ref Fixes #114
xiaomo approved these changes 2026-06-05 15:36:31 +00:00
xiaomo left a comment
Owner

LGTM 6 条反馈全解决,几个亮点:

  • ENOENT → actionable error — 从 Node 底层错误翻译成 "uwf-hermes" not found in PATH,附 which 命令,这个体验差距很大
  • SQLite warningNODE_OPTIONS --disable-warning=ExperimentalWarning 注入到 spawn env 里,前景和后台两个路径都覆盖了,且 filter(Boolean) 正确处理了已有 NODE_OPTIONS 的拼接
  • VERSION walk-up — 从 __dirname 向上找 @united-workforce/cli 的 package.json,兼容 src/ 和 dist/ 两种路径,最多走 5 层,稳妥
  • adapter 校验 — setup 完就查 which uwf-<agent>,hermes 还额外查 which hermes,预警前置
  • PATH 指引 — 不再硬编码 .bashrc,列举常见 shell config 让用户自己对号入座
LGTM ✅ 6 条反馈全解决,几个亮点: - **ENOENT → actionable error** — 从 Node 底层错误翻译成 `"uwf-hermes" not found in PATH`,附 `which` 命令,这个体验差距很大 - **SQLite warning** — `NODE_OPTIONS --disable-warning=ExperimentalWarning` 注入到 spawn env 里,前景和后台两个路径都覆盖了,且 filter(Boolean) 正确处理了已有 NODE_OPTIONS 的拼接 - **VERSION walk-up** — 从 `__dirname` 向上找 `@united-workforce/cli` 的 package.json,兼容 src/ 和 dist/ 两种路径,最多走 5 层,稳妥 - **adapter 校验** — setup 完就查 `which uwf-<agent>`,hermes 还额外查 `which hermes`,预警前置 - **PATH 指引** — 不再硬编码 `.bashrc`,列举常见 shell config 让用户自己对号入座
xiaoju added 1 commit 2026-06-05 15:42:27 +00:00
- setup validates adapter binary availability, prints install command if missing
- setup prints 'Config saved to <path> ✓' on success
- spawn ENOENT gives actionable error with which command
- SQLite ExperimentalWarning suppressed via NODE_OPTIONS
- bootstrap VERSION reads cli package.json (was reading util)
- bootstrap PATH guidance is shell-agnostic

Fixes #114
xiaoju force-pushed fix/114-setup-ux from c0e0e561f3 to fde87b6274 2026-06-05 15:42:27 +00:00 Compare
xiaomo merged commit e5af5e9027 into main 2026-06-05 15:45:03 +00:00
xiaomo deleted branch fix/114-setup-ux 2026-06-05 15:45:03 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shazhou/united-workforce#115