Add ADB Commander feature#503
Conversation
Summary of ChangesHello @aldefy, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the desktop application by integrating a robust ADB Commander feature. This new functionality empowers users to directly execute ADB commands, create and manage complex automation flows, and maintain a comprehensive history of their interactions, thereby streamlining device debugging and development workflows. Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
@florent37 Would you mind reviewing this PR? It implements #491 (ADB Commander feature). |
There was a problem hiding this comment.
Code Review
This pull request introduces the comprehensive 'ADB Commander' feature, which is a significant and well-structured addition to the application. The implementation follows a clean architecture, separating concerns across domain, data, and UI layers. My review has identified a few key areas for improvement, primarily focusing on enhancing performance in data retrieval from the database, correcting a logic issue with timestamp updates, and improving state management within the ViewModel for better robustness. Addressing these points will further solidify the feature's foundation.
rteyssandier
left a comment
There was a problem hiding this comment.
try to not use hardcoded strings
|
@florent37 suggested to make a menu on the left, like for Database. Would be easier to switch between commands |
|
Great suggestion, will tackle the sidebar layout (like Database) as a follow-up. The current PR uses tabs, but a left panel with collapsible sections (Saved Commands, Flows, Quick Commands, History) alongside an always-visible console would be a better UX. Will open a separate issue/PR for this or would you prefer to have it planned on this PR? |
|
Just checking in if this PR needs any more changes , happy to fix/add changes |
|
thanks :) I'm testing and reviewing when I have time |
|
better now :) you can rebase & merge when you want, I approved ! |
Adds a new ADB Commander screen to the desktop app with three tabs: - Runner: execute arbitrary ADB commands with console output - Library: saved commands, automation flows, and 47 built-in quick commands - History: timestamped log of all executed commands Supports automation flows (multi-step ADB command sequences with delays), works with or without a Flocon-paired device.
Use Room's @relation annotation to eagerly fetch flow steps instead of issuing a separate getFlowSteps query per flow.
Fetch existing entity before update to retain the original createdAt value for both saved commands and flows.
Replace mutable side-effect property with a dedicated StateFlow for more robust and predictable reactive state management.
Use 'in setOf()' for status checks and hoist SimpleDateFormat to a top-level val to avoid repeated instantiation.
Replace individual callback parameters with a single onAction: (AdbCommanderAction) -> Unit across all composables. ViewModel dispatches actions via onAction(action) method.
Move all user-facing strings in ADB Commander views to strings.xml for localization support.
Replace tab-based layout (Runner/Library/History) with a two-panel layout matching the Database feature: left panel (340dp) shows command library as expandable tree, right side shows prominent multi-line command input with toolbar and always-visible runner output. - Add CommandLibraryPanel with tree structure for saved commands, flows, and quick command categories - Add CommandInputView with toolbar (save/copy/history/clear) and multi-line input field with Cmd+Enter shortcut - Remove tab system entirely, history moves to toolbar dropdown - One-click command execution from library panel
892ca59 to
67c5fea
Compare
|
Rebased , but guessing need that second review approval to merge |









Summary
Details
Test plan
shell echo hello→ Run → verify output in console