LearnNewsExamplesServices
Frontmatter
id7847
titleEnhance WindowPosition Addon with Adaptive Tracking
stateClosed
labels
enhancementstaleai
assignees[]
createdAtNov 21, 2025, 8:23 PM
updatedAtMar 7, 2026, 4:27 AM
githubUrlhttps://github.com/neomjs/neo/issues/7847
authortobiu
commentsCount3
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMar 7, 2026, 4:27 AM

Enhance WindowPosition Addon with Adaptive Tracking

Closed v12.1.0 enhancementstaleai
tobiu
tobiu commented on Nov 21, 2025, 8:23 PM

Refactor src/main/addon/WindowPosition.mjs to support high-frequency, adaptive position tracking. This replaces the legacy mouseout polling with a robust focus/blur strategy, enabling real-time window tracking for the "Infinite Canvas" feature.

Tasks:

  1. Adaptive Loop: Implement startTracking() (on focus) and stopTracking() (on blur) methods.
  2. Loop Logic: In the tracking loop (~16ms), check window.screenX/Y and outerWidth/Height.
  3. Delta Updates: Only send windowPositionChange messages to the App Worker if the values have effectively changed.
  4. Cleanup: Deprecate or refactor the legacy mouseout logic to rely on this new, more reliable strategy.
  5. Configurability: Ensure this behavior is active for all windows (or configurable via Neo.config).

Note: This enhancement is the "Client-Side Reporter" for the multi-window coordinate system.

tobiu added the enhancement label on Nov 21, 2025, 8:23 PM
tobiu added the ai label on Nov 21, 2025, 8:23 PM
tobiu cross-referenced by #7846 on Nov 21, 2025, 8:23 PM
tobiu
tobiu Nov 21, 2025, 8:29 PM

Input from Gemini 2.5:

Architecture Update:

The user has provided a "Heuristic Tracking" strategy to further optimize the polling mechanism. We will implement this inside Neo.main.addon.WindowPosition.

Logic:

  1. Blur: Stop all tracking (Idle).
  2. Focus (Content): Slow polling (1Hz) to catch keyboard shortcuts (Win+Arrows) or non-mouse movements.
  3. MouseOut (Top): Fast polling (rAF) because the user likely grabbed the title bar.
  4. MouseEnter: Revert to Slow polling.

This replaces the simpler "Focus=Fast" logic originally proposed.

@github-actions - 2026-02-20T03:42:14Z

This issue is stale because it has been open for 90 days with no activity.

  • 2026-02-20T03:42:15Z @github-actions added the stale label

@github-actions - 2026-03-07T03:27:46Z

This issue was closed because it has been inactive for 14 days since being marked as stale.

  • 2026-03-07T03:27:47Z @github-actions closed this issue