Skip to content

Comments

Improve example app#210

Merged
fotiDim merged 5 commits intomainfrom
Improve-example-app
Jan 23, 2026
Merged

Improve example app#210
fotiDim merged 5 commits intomainfrom
Improve-example-app

Conversation

@fotiDim
Copy link
Contributor

@fotiDim fotiDim commented Jan 19, 2026

This pull request introduces significant enhancements to the BLE peripheral details UI, focusing on improved interactivity, filtering, and navigation. The main changes include refactoring widgets to stateful components, adding characteristic property filtering, enabling navigation between characteristics, and improving user actions like copying and clearing logs.

UI Interactivity and Navigation Improvements:

  • Refactored ServicesListWidget and ServicesSideWidget from stateless to stateful widgets, enabling advanced state management for expansion, filtering, and navigation. Added navigation buttons to move between characteristics and ensured scroll-to-selected-characteristic behavior. [1] [2] [3] [4]
  • Added navigation logic in ServicesSideWidget to allow users to move to the previous or next characteristic in the filtered list, with UI buttons reflecting navigation availability.

Filtering and Property Selection:

  • Introduced characteristic property filtering in both ServicesListWidget and ServicesSideWidget, allowing users to filter characteristics by selected properties and clear filters as needed. [1] [2] [3] [4] [5]

User Actions and Usability:

  • Added a "Copy all logs" button to ResultWidget and updated the clear-all icon for consistency. [1] [2] [3]
  • Improved the favorite toggle and service copying logic to use the updated widget structure and state. [1] [2] [3]

Internal Refactoring and Code Structure:

  • Moved logic for expansion, scrolling, and filtering into widget state classes, improving maintainability and code organization. [1] [2] [3]

These changes collectively provide a more interactive, user-friendly, and maintainable BLE peripheral details interface.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @fotiDim, 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 upgrades the user experience of the BLE peripheral details interface by transitioning key UI components to stateful widgets, offering more dynamic and responsive interactions. Users can now efficiently navigate through characteristics, apply property-based filters to narrow down their view, and gain better insights into characteristic values with improved formatting. These changes collectively make the BLE example app more intuitive and powerful for exploring peripheral capabilities.

Highlights

  • Enhanced UI Interactivity: Refactored ServicesListWidget and ServicesSideWidget to stateful widgets, enabling dynamic state management for service expansion, characteristic selection, and scrolling to selected items.
  • Characteristic Filtering: Introduced the ability to filter characteristics by their properties (e.g., read, write) in both the main view and side panel, improving discoverability and focus.
  • Improved Characteristic Navigation: Added dedicated navigation buttons to move between previous and next characteristics within the filtered list, with visual cues for availability, directly from the selected characteristic card.
  • Comprehensive Data Display: Enhanced the display of BLE characteristic values to include both formatted hex and printable string representations, along with raw data, for better readability and debugging.
  • Bulk Read Functionality: Implemented a 'Read All' feature to simultaneously read values from all readable characteristics, providing a quick overview of device state.
  • Usability Enhancements: Added a 'Copy all logs' button to the result widget for easy log extraction and refined the 'Unpair' button's visibility based on system capabilities.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces significant enhancements to the BLE peripheral details UI, refactoring several widgets to be stateful to support more complex interactions like characteristic filtering and navigation. It also adds new user actions like "Read All" characteristics and "Copy all logs". The code is generally well-structured, but there are some critical issues and opportunities for improvement. I've found several uses of an invalid spacing property on Column and Row widgets that will cause compilation errors. Additionally, there are multiple instances of duplicated logic for data formatting, sorting, filtering, and navigation that should be refactored into shared utilities to improve maintainability.

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

This pull request enhances the BLE peripheral details UI in the example app by refactoring key widgets to stateful components, adding characteristic property filtering, implementing navigation between characteristics, and improving user actions. The changes focus on better state management, enhanced interactivity, and improved user experience for BLE device interaction.

Changes:

  • Converted ServicesListWidget and ServicesSideWidget to stateful widgets with advanced state management for expansion, filtering, and navigation
  • Added characteristic property filtering with UI controls to filter by properties like read, write, notify, etc.
  • Implemented navigation buttons to move between characteristics in the filtered list
  • Enhanced value formatting for BLE read operations with better hex and string representation
  • Added "Read All" and "Copy all logs" functionality

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.

File Description
services_side_widget.dart Refactored to stateful widget; added property filtering UI, navigation controls, and state management for filters
services_list_widget.dart Refactored to stateful widget; added expandable controllers, scroll-to-selected logic, and filtering support
result_widget.dart Added copy all logs button and changed clear icon from clear_all to close
peripheral_detail_page.dart Added Read All functionality, improved value formatting with hex/string display, reorganized UI layout, updated button labels, and conditionally rendered unpair button

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

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.


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

- Introduced utility functions for sorting BLE services and filtering characteristics based on properties.
- Updated the peripheral detail page to support reading all characteristics and improved value formatting for better readability.
- Added navigation functionality for adjacent characteristics and integrated property filters in the services list widget.
- Enhanced the services side widget to manage selected properties and provide a clearer UI for service interactions.
- Implemented copy functionality for logs and improved overall user experience in the peripheral details section.
@fotiDim fotiDim force-pushed the Improve-example-app branch from d7a9760 to 661e5f4 Compare January 21, 2026 11:18
@fotiDim fotiDim force-pushed the Improve-example-app branch from fd4d4a4 to 60239af Compare January 21, 2026 16:01
@fotiDim fotiDim merged commit bcf65e4 into main Jan 23, 2026
2 checks passed
@fotiDim fotiDim deleted the Improve-example-app branch January 23, 2026 06:29
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