feat: track all marker property updates with diff detection#87
Conversation
|
Companion extension PR: OCAP2/extension#136 |
Summary of ChangesHello, 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 OCAP system's ability to track dynamic marker changes. By extending the Highlights
Changelog
Activity
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 aims to enhance marker tracking by capturing all property updates and implementing a diff-based approach to minimize network traffic. This is a valuable improvement. However, the current implementation of the diff-checking logic has a critical flaw where client-side code attempts to access a server-only variable, which would lead to script errors. My review includes two related comments that move the diff-checking logic to the server, which will resolve the issue and allow the feature to function as intended.
GVAR(trackedMarkerStates) is a server-only variable. The diff checking was incorrectly placed in the client-side MarkerUpdated EH where clients don't have access to it. Moved to the server-side UPDATED case handler.
Summary
MarkerUpdatedhandler now extracts all mutable marker properties (text, color, size, type, brush, shape) in addition to position/direction/alpha:MARKER:STATE:to the extension when at least one property actually changedCREATEDhandler behavior)Context
Communities use markers that dynamically update text/color during gameplay (e.g., FPS display markers that call
setMarkerText/setMarkerColorevery 15 seconds). Previously OCAP only captured position/direction/alpha onMarkerUpdated— text, color, and other changes were silently discarded.Companion extension PR: OCAP2/extension#new
Test plan