Skip to content

Comments

🎨 Palette: Improve interactive file selection UX#800

Open
adolago wants to merge 1 commit intomainfrom
palette-interactive-path-ux-11580466807717561149
Open

🎨 Palette: Improve interactive file selection UX#800
adolago wants to merge 1 commit intomainfrom
palette-interactive-path-ux-11580466807717561149

Conversation

@adolago
Copy link
Owner

@adolago adolago commented Feb 23, 2026

This PR enhances the interactive mode UX (src/cli/interactive.rs) by adding proper validation and usability improvements for file selection.

Changes:

  1. Custom Playbook Selection: Added a "Enter custom path..." option to the playbook selection list, allowing users to select playbooks outside the current directory or playbooks/ folder.
  2. Path Validation: Implemented validation for custom inventory and playbook paths. The CLI now checks if the entered path exists before accepting it, preventing runtime errors later.
  3. Tilde Expansion: Used shellexpand::tilde to support ~/path/to/file syntax in interactive prompts, which is a standard and expected shell behavior.
  4. Empty State Handling: When no playbooks are found, instead of just printing a warning and exiting the menu, the CLI now prompts the user to enter a path manually.

UX Improvements:

  • Prevents Errors: Users get immediate feedback if they type a non-existent path.
  • More Flexible: Users can easily run playbooks/inventories from anywhere on the filesystem without leaving interactive mode.
  • More Intuitive: Supports standard shell tilde expansion for home directories.

Testing:

  • Verified cargo check passes.
  • Code logic uses standard Path::exists() and shellexpand which are reliable.
  • Existing unit tests passed (no regressions).

PR created automatically by Jules for task 11580466807717561149 started by @dolagoartur

…tilde expansion

- Add `✏️ Enter custom path...` option to `select_playbook`
- Implement path existence validation for both inventory and playbook custom inputs
- Use `shellexpand::tilde` to support `~/` home directory expansion in interactive inputs
- Improve "No playbooks found" UX by prompting for manual entry instead of returning immediately
- Update imports in `src/cli/interactive.rs` to include `Path`

Co-authored-by: dolagoartur <146357947+dolagoartur@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b1fe6527b6

ℹ️ 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".

Comment on lines +113 to +114
if path.exists() {
Ok(())

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject directories in custom playbook validation

The new custom playbook validator accepts any existing path via Path::exists(), which also returns true for directories; this lets users submit a directory from interactive mode and only fail later when playbook loading/parsing runs, so the prompt no longer provides the immediate validation it intends to provide. This is reproducible whenever the custom path points to an existing directory (for example . or playbooks/).

Useful? React with 👍 / 👎.

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