You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: increase unit test coverage across untested core server and frontend modules #515
While the test suite currently passes all existing tests, several critical core modules in both the server engine and frontend hooks have zero or minimal unit test coverage.
Adding unit tests for these modules will prevent regressions, improve CI reliability, and ensure overall codebase stability.
src/server/InputHandler.ts (Partial coverage - only pinch-zoom is tested)
High-frequency event throttling (8ms window for move/scroll), coordinate sanitization, input payload validation, and button type constraints.
src/hooks/useTrackpadGesture.ts (0% coverage)
Touch tracking state management, multi-touch threshold detection (single/two/three-finger taps), and two-finger scroll calculations.
Proposed Implementation Plan (Small & Focused PRs)
In accordance with AGENTS.md guidelines ("Keep pull requests tightly focused on a single feature or fix"), I plan to break the implementation down into small, modular PRs to keep each review lightweight and easy to merge:
PR 1: Unit tests for keyMap.ts (tests/server/keyMap.test.ts)
Test Windows VK codes, extended key set membership, scancode mappings, and Linux/macOS keysym dictionaries.
PR 2: Unit tests for configHelper.ts (tests/utils/configHelper.test.ts)
Test directory fallbacks, environment variable precedence, and atomic write operations.
PR 3: Unit tests for InputHandler.ts (tests/server/inputHandler.test.ts)
Test 8ms move/scroll throttling with fake timers, input sanitization boundaries, and valid mouse button routing.
PR 4: Unit tests for useTrackpadGesture.ts (tests/hooks/useTrackpadGesture.test.ts)
Test touch gesture handling, tap classification (left/right/middle click), and scroll delta generation via @testing-library/react.
Expected Benefits
Guarantees cross-platform key mapping and input stability.
Prevents configuration and directory path regressions across different OS environments.
Increases test suite coverage without impacting runtime performance.
Activity
github-actions commentedon Nov 22, 2026
Discussions are carried on Discord.
Instead of commenting here, go to the Discord channel.
macOS and macOS-related issues are not supported at the moment. We are looking for funding to support macOS and would appreciate sponsorships.
If you find this project useful, a GitHub star would be appreciated.
amankv1234 commentedon Nov 22, 2026
@PinJinx , please assign it to me avoid the duplicate effort