Feat: Add search to category view & bulk delete in manage imports#21
Conversation
Implements two UI enhancements in the dashboard: 1. Adds a prompt to search for commands directly from the category exploration view, reducing friction and menu navigation. 2. Updates the manage imports view to support deleting multiple custom imports via a comma-separated list, or clearing all imports with the 'all' command. Co-authored-by: MnemOnicE <170563909+MnemOnicE@users.noreply.github.com>
|
👋 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. |
|
Warning Review limit reached
More reviews will be available in 54 minutes and 18 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughDashboard module enhances category exploration by threading a search callback function through the flow, enabling users to search after browsing categories. Custom import deletion expands from single-command removal to batch operations via comma-separated lists or bulk ChangesDashboard UI Flow Improvements
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsStopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request enhances the dashboard UI by allowing users to search for commands directly from the category exploration view and enabling bulk deletion (including a 'delete all' option) of custom imports. The feedback recommends addressing a redundant pause and case-sensitivity issue in the search functionality, as well as improving encapsulation and duplicate handling during bulk deletion.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| search_choice = input(f"\n{GREEN}➜ {RESET}").strip() | ||
| if search_choice: | ||
| search_command_fn(search_choice.split()[0]) | ||
| else: | ||
| pause() |
There was a problem hiding this comment.
There are two issues here:
- Redundant Pause: When the user presses Enter to return to the menu, they are forced to press Enter again due to the
pause()call. Removing theelseblock allows them to return to the menu immediately as expected. - Case Sensitivity: The search input is not lowercased, which can cause searches to fail if the user types uppercase letters (unlike the main loop which lowercases the input). We should lowercase the command name before passing it to
search_command_fn.
search_choice = input(f"\\n{GREEN}➜ {RESET}").strip()\n if search_choice:\n search_command_fn(search_choice.split()[0].lower())| choice = input(f"\n{GREEN}➜ {RESET}").strip().lower() | ||
| if choice in custom_guide: | ||
| del custom_guide[choice] | ||
| save_json(CUSTOM_DICT_FILE, custom_guide) | ||
| print(f"{YELLOW}Successfully deleted '{choice}'.{RESET}") | ||
| if choice == "all": | ||
| confirm = input(f"{RED}Are you sure you want to delete ALL custom imports? (y/n): {RESET}").strip().lower() | ||
| if confirm == 'y': | ||
| custom_guide.clear() | ||
| save_json(CUSTOM_DICT_FILE, custom_guide) | ||
| print(f"{YELLOW}Successfully deleted all custom imports.{RESET}") | ||
| pause() | ||
| elif choice: | ||
| print(f"{RED}Command not found in custom imports.{RESET}") | ||
| deleted = [] | ||
| not_found = [] | ||
| for cmd in [c.strip() for c in choice.split(",") if c.strip()]: | ||
| if cmd in custom_guide: | ||
| del custom_guide[cmd] | ||
| deleted.append(cmd) | ||
| else: | ||
| not_found.append(cmd) | ||
|
|
||
| if deleted: | ||
| save_json(CUSTOM_DICT_FILE, custom_guide) | ||
| print(f"{YELLOW}Successfully deleted: {', '.join(deleted)}{RESET}") | ||
| if not_found: | ||
| print(f"{RED}Not found in custom imports: {', '.join(not_found)}{RESET}") | ||
| pause() |
There was a problem hiding this comment.
There are two improvement opportunities here:
- Encapsulation: Instead of calling
save_json(CUSTOM_DICT_FILE, custom_guide)directly, we should use thestate_manager.save_custom()method to respect the encapsulation of theStateManagerclass. - Duplicate Handling: If the user inputs duplicate commands in the comma-separated list (e.g.,
ls, ls), the second occurrence will trigger thenot_foundblock and display a confusing message. We can usedict.fromkeysto deduplicate the input list while preserving the user's input order.
choice = input(f"\\n{GREEN}➜ {RESET}").strip().lower()\n if choice == "all":\n confirm = input(f"{RED}Are you sure you want to delete ALL custom imports? (y/n): {RESET}").strip().lower()\n if confirm == 'y':\n custom_guide.clear()\n state_manager.save_custom()\n print(f"{YELLOW}Successfully deleted all custom imports.{RESET}")\n pause()\n elif choice:\n deleted = []\n not_found = []\n for cmd in dict.fromkeys(c.strip() for c in choice.split(\",\") if c.strip()):\n if cmd in custom_guide:\n del custom_guide[cmd]\n deleted.append(cmd)\n else:\n not_found.append(cmd)\n\n if deleted:\n state_manager.save_custom()\n print(f"{YELLOW}Successfully deleted: {', '.join(deleted)}{RESET}")\n if not_found:\n print(f"{RED}Not found in custom imports: {', '.join(not_found)}{RESET}")\n pause()|
@jules commando/ui/dashboard.py gemini-code-assist Bot There are two issues here: Redundant Pause: When the user presses Enter to return to the menu, they are forced to press Enter again due to the pause() call. Removing the else block allows them to return to the menu immediately as expected. gemini-code-assist Bot There are two improvement opportunities here: Encapsulation: Instead of calling save_json(CUSTOM_DICT_FILE, custom_guide) directly, we should use the state_manager.save_custom() method to respect the encapsulation of the StateManager class. |
Addressed both issues. Removed the redundant |
- Remove redundant pause() in explore_category and lowercase search string - Use state_manager.save_custom() for encapsulation in manage_imports - Deduplicate user input list to prevent duplicate 'not found' errors Co-authored-by: MnemOnicE <170563909+MnemOnicE@users.noreply.github.com>
Implements two UI enhancements in the dashboard:
PR created automatically by Jules for task 18382313160809785483 started by @MnemOnicE