Skip to content

feat: fall back to selector when no target matches - #62

Merged
liangmiQwQ merged 2 commits into
liang/claude/repo-spec-rfcfrom
liang/claude/selector-fallback-rfc
Oct 1, 2026
Merged

liangmiQwQ merged 2 commits into
liang/claude/repo-spec-rfcfrom
liang/claude/selector-fallback-rfc

Conversation

@liangmiQwQ

@liangmiQwQ liangmiQwQ commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #61.

When mo cd, mo edit, or mo open gets a target with no match, it prints No matching directory found and exits.

This PR makes these commands open the selector with a prefilled search instead.

  • If the repository spec resolver from feat: resolve repository specs from urls and free text #61 finds a spec, the input is prefilled with <owner>/<repo>. The footer then shows the existing Ctrl+R / Ctrl+E hotkeys, so a missing repo can be forked or cloned in one keypress.
  • Otherwise, the input is prefilled with the raw target, so users can refine it.

The fallback only happens when stdin and stdout are a TTY. Scripts and agent sessions keep the current error, so they never hang. . never falls back.

The selector component gets an optional initialQuery prop, and the selector mounting code is extracted so the no-target and fallback paths share it. The RFCs (cd.md, edit.md, open.md, SELECTOR.md) describe the new behavior, and the broken selector.md link in cd.md is fixed.

🤖 Generated with Claude Code

@liangmiQwQ
liangmiQwQ added this pull request to stack #63 October 1, 2026 00:16
@liangmiQwQ
liangmiQwQ force-pushed the liang/claude/selector-fallback-rfc branch 2 times, most recently from ba418a6 to f4157df Compare October 1, 2026 00:37
@liangmiQwQ
liangmiQwQ force-pushed the liang/claude/selector-fallback-rfc branch from f4157df to f8b1a52 Compare October 1, 2026 00:47
@liangmiQwQ liangmiQwQ changed the title docs(rfc): fall back to selector when no target matches feat: fall back to selector when no target matches Oct 1, 2026
@liangmiQwQ
liangmiQwQ marked this pull request as ready for review October 1, 2026 01:12
@liangmiQwQ
liangmiQwQ merged commit 3501a28 into main Oct 1, 2026
3 checks passed
@liangmiQwQ
liangmiQwQ deleted the liang/claude/selector-fallback-rfc branch October 1, 2026 01:12
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