🎨 Palette: Improve interactive setup prompts#100
🎨 Palette: Improve interactive setup prompts#100google-labs-jules[bot] wants to merge 1 commit intomainfrom
Conversation
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Merging to
|
| TOKEN = t_input | ||
| try: | ||
| if not profile_ids: | ||
| print(f"{Colors.CYAN}ℹ Profile ID is missing.{Colors.ENDC}") |
Check notice
Code scanning / Bandit (reported by Codacy)
The input method in Python 2 will read from standard input, evaluate and run the resulting string as python source code. This is similar, though in many ways worse, then using eval. On Python 2, use raw_input instead, input is safe in Python 3. Note
| try: | ||
| if not profile_ids: | ||
| print(f"{Colors.CYAN}ℹ Profile ID is missing.{Colors.ENDC}") | ||
| print(f"{Colors.CYAN} (Found in your Profile URL: https://controld.com/dashboard/profiles/<ID>){Colors.ENDC}") |
Check warning
Code scanning / Pylint (reported by Codacy)
Line too long (127/100) Warning
| profile_ids = [p.strip() for p in p_input.split(",") if p.strip()] | ||
|
|
||
| if not TOKEN: | ||
| print(f"{Colors.CYAN}ℹ API Token is missing.{Colors.ENDC}") |
Check warning
Code scanning / Pylint (reported by Codacy)
Line too long (103/100) Warning
| try: | ||
| if not profile_ids: | ||
| print(f"{Colors.CYAN}ℹ Profile ID is missing.{Colors.ENDC}") | ||
| print(f"{Colors.CYAN} (Found in your Profile URL: https://controld.com/dashboard/profiles/<ID>){Colors.ENDC}") |
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Line too long (127/100) Warning
| if p_input: | ||
| profile_ids = [p.strip() for p in p_input.split(",") if p.strip()] | ||
|
|
||
| if not TOKEN: |
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Import outside toplevel (getpass) Warning
| profile_ids = [p.strip() for p in p_input.split(",") if p.strip()] | ||
|
|
||
| if not TOKEN: | ||
| print(f"{Colors.CYAN}ℹ API Token is missing.{Colors.ENDC}") |
Check warning
Code scanning / Pylintpython3 (reported by Codacy)
Line too long (103/100) Warning
|
Superseded: Interactive prompt improvements already in main. |
Understood. Acknowledging that this work is superseded. I will revert these changes and look for a different UX improvement to contribute. |
Improved the interactive setup experience by adding contextual hints on where to find the Profile ID and API Token.
Also added graceful handling for KeyboardInterrupt (Ctrl+C) during the input phase to prevent ugly tracebacks.
💡 What: Helpful hints in CLI prompts + Graceful exit on cancel
🎯 Why: Reduces cognitive load for users setting up the tool for the first time
♿ Accessibility: Clearer instructions and better error handling improve the CLI experience
PR created automatically by Jules for task 14623510157442368974 started by @abhimehro