Skip to content

add dim_mode enable checkbox and dim mode color filter selection.#709

Merged
tavdog merged 1 commit intomainfrom
dim_mode_filter
Feb 2, 2026
Merged

add dim_mode enable checkbox and dim mode color filter selection.#709
tavdog merged 1 commit intomainfrom
dim_mode_filter

Conversation

@tavdog
Copy link
Member

@tavdog tavdog commented Jan 31, 2026

Instead of deleting dim mode time to disable add an enable checkbox and model field.
add dimmode color filter selection.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @tavdog, 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 refines the dim mode functionality by introducing explicit control and enhanced customization. Instead of relying on the absence of a dim time to disable the feature, a dedicated enable/disable checkbox has been added. Furthermore, users can now specify a unique color filter for dim mode, allowing for a more tailored visual experience during low-light conditions. These changes provide users with more granular control over their device's behavior and appearance.

Highlights

  • Explicit Dim Mode Control: Introduced a new DimModeEnabled boolean field in the Device model and a corresponding checkbox in the UI. This replaces the previous implicit method of disabling dim mode by leaving the DimTime field empty, providing clearer control over dim mode activation.
  • Dim Mode Color Filter: Added a DimColorFilter field to the Device model, allowing users to select a specific color filter to be applied when dim mode is active. This enhances customization options for the dim mode experience.
  • Logic Updates for Dim Mode: Updated the GetDimModeIsActive function to respect the new DimModeEnabled flag. The getEffectiveFilters utility now correctly applies the DimColorFilter when dim mode is active, ensuring the selected filter is rendered.
  • UI and Backend Integration: Integrated the new DimModeEnabled checkbox and DimColorFilter selection into the device update form (update.html) and the backend handler (handlers_device.go) for saving and loading these settings. Legacy device import functionality was also updated to support the new DimColorFilter.
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 an enable/disable checkbox for the dim mode feature, as well as a color filter selection for it. The changes span across the data model, server handlers, and frontend templates. The implementation is mostly correct, but I've found a bug where the DimModeEnabled setting is not handled during device configuration import, which would lead to data loss on import. Additionally, several new localization keys used in the UI are missing from the translation file. My review includes comments on these issues.

@tavdog tavdog merged commit 28b93e9 into main Feb 2, 2026
11 checks passed
@IngmarStein IngmarStein deleted the dim_mode_filter branch February 2, 2026 06:32
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.

1 participant