Replace the broken folder picker with a console hint - #81
Conversation
"Use existing folder" opened a native macOS-only picker over an osascript call, which cannot work when moi is served to another device — in the web UI it was simply broken. The button stays as the signpost, permanently inert, with a tooltip pointing at `moi init` in the console. Removes the whole picker path: the `/api/workspaces/choose-folder` route and its same-origin guard, the `canChooseFolder` setup flag, the `useChooseFolder` hook, the create dialog's import branch, and the single-folder discovery helper that only fed the picker. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LWqAg4T2q7n46i7jdo7nNY
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9844ab16cd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <span className="text-center"> | ||
| Not supported yet — run{' '} | ||
| <code className="rounded-xs bg-accent px-1 py-0.5 font-mono whitespace-nowrap"> | ||
| moi init |
There was a problem hiding this comment.
Preserve provider selection in the console fallback
When a user wants to import an existing folder with Codex but the folder is absent from discovery—for example, Codex has never run there or its session falls outside the 400-file scan—this instruction registers the wrong harness. The init command in server/cli.ts provisions and registers every non-OpenClaw target as claude-code, while the removed import flow allowed the user to select codex; it also cannot be corrected by rerunning initialization because registerWorkspace returns an existing entry without updating its type. Provide a provider-aware CLI option or retain another manual import path instead of directing all users to plain moi init.
Useful? React with 👍 / 👎.
"Use existing folder" opened a native macOS-only picker over an osascript
call, which cannot work when moi is served to another device — in the web
UI it was simply broken. The button stays as the signpost, permanently
inert, with a tooltip pointing at
moi initin the console.Removes the whole picker path: the
/api/workspaces/choose-folderrouteand its same-origin guard, the
canChooseFoldersetup flag, theuseChooseFolderhook, the create dialog's import branch, and thesingle-folder discovery helper that only fed the picker.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01LWqAg4T2q7n46i7jdo7nNY