Conversation
…x80070102 and 0x800700CB
…ectronRelativeMouse feat: add viewport/visibility controls
Summary of ChangesHello @s3d-i, 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 introduces a significant new 'Dock Mode' feature, enabling the AIRI application to display an interactive character overlay that dynamically follows a chosen target window. The implementation involves a new modular Electron package for managing the docking behavior, complemented by native Rust bindings for precise Windows API integration. A comprehensive developer interface has been added to facilitate configuration and debugging of this complex window management system. Additionally, theme synchronization has been enhanced to maintain visual consistency across all application windows. Highlights
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
|
There was a problem hiding this comment.
Code Review
This pull request introduces a significant and well-architected "Dock Mode" feature, allowing the AIRI overlay to attach to a target window. The implementation is robust, featuring a new native Windows binding package for accurate window tracking, a comprehensive state controller, and a dedicated devtools page for debugging. The code quality is high, with thoughtful error handling, performance considerations like adaptive polling, and a clean refactoring of theme-related styles into a reusable composable. My review includes a couple of suggestions to further improve the correctness and maintainability of the new dock controller logic.
| const adjustedAboveCount = Math.max(0, realAbove.length - 1) | ||
| const isFrontmost = adjustedAboveCount === 0 |
There was a problem hiding this comment.
The adjustment to realAbove.length is a workaround for a Win32-specific behavior, as noted in the comment. However, it's being applied unconditionally. This will cause isFrontmost to be calculated incorrectly on non-Windows platforms where the fallback tracker is used. To ensure correctness across platforms, this adjustment should only be applied when running on Windows.
const adjustedAboveCount = process.platform === 'win32'
? Math.max(0, realAbove.length - 1)
: realAbove.length;| @@ -0,0 +1,47 @@ | |||
| { | |||
| "name": "@proj-airi/win32-window-bindings", | |||
There was a problem hiding this comment.
cc @sumimakito do we have other naming options here? If more platform native API integrated in, should we keep them all inside of this package? I guess this is not correct? Perhaps... @proj-airi/native-window-win32?
There was a problem hiding this comment.
Yeah. @proj-airi/native-window-win32 sounds better. Maybe we can have @proj-airi/native-window-macos in the future in the @proj-airi/native-window-<platform> pattern.
There was a problem hiding this comment.
Split this into another Pull Request.
|
cc @sumimakito would you mind merge your WIP code first? It seems this PR is more focused on Windows but not macOS. And the handling of Three.js is not included. |
Description
Linked Issues
#938
Additional Context