Skip to content

Comments

bug: fix onboarding softlock / add dynamic input accepting. Fix grammatical issues.#439

Open
nolan-at-pieces wants to merge 1 commit intomainfrom
fix_onboarding
Open

bug: fix onboarding softlock / add dynamic input accepting. Fix grammatical issues.#439
nolan-at-pieces wants to merge 1 commit intomainfrom
fix_onboarding

Conversation

@nolan-at-pieces
Copy link

Fix for issue(s) #438. This adds the ability to type whatever you want on that step.

This also fixes a few grammatical issues in onboarding.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes onboarding Step 5 chat softlock (issue #438) by relaxing command validation to accept dynamic pieces ask ... inputs, and polishes several onboarding strings for grammar/casing consistency.

Changes:

  • Add prefix_match support to OnboardingCommandStep to validate commands by prefix (used for pieces ask).
  • Update onboarding Step 5 prompt/expected command to allow any question text.
  • Apply multiple grammar/casing fixes across onboarding step text.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

def _is_valid(self, user_input: str) -> bool:
if self.prefix_match:
s = user_input.strip()
return s.startswith(self.predicted_text) and len(s) > len(self.predicted_text)
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

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

In prefix_match mode, _is_valid requires len(s) > len(self.predicted_text), which rejects pieces ask (no query) even though the CLI supports running ask without args and then prompting for a query. This can still leave users stuck if they try the shorter valid command; consider allowing an exact match as valid (and/or validating based on parsed tokens rather than a raw string prefix).

Suggested change
return s.startswith(self.predicted_text) and len(s) > len(self.predicted_text)
return s.startswith(self.predicted_text) and len(s) >= len(self.predicted_text)

Copilot uses AI. Check for mistakes.
Comment on lines +224 to 225
"Starting a session allows you to run multiple commands without having to start the Pieces CLI every time. "
"Start a session with `pieces run`. To exit your session, use `exit`.",
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

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

There’s an extra trailing space at the end of the first sentence ("every time. "), which results in an unintended double-space in the rendered onboarding text when concatenated with the next string.

Suggested change
"Starting a session allows you to run multiple commands without having to start the Pieces CLI every time. "
"Start a session with `pieces run`. To exit your session, use `exit`.",
"Starting a session allows you to run multiple commands without having to start the Pieces CLI every time."
" Start a session with `pieces run`. To exit your session, use `exit`.",

Copilot uses AI. Check for mistakes.
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.

2 participants