Skip to content

test(e2e): check macros and the jiggler end to end on the host - #1689

Merged
adamshiervani merged 2 commits into
devfrom
test/e2e-hid-profiles
Sep 30, 2026
Merged

adamshiervani merged 2 commits into
devfrom
test/e2e-hid-profiles

Conversation

@adamshiervani

@adamshiervani adamshiervani commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem

No e2e spec checks keyboard macros or the mouse jiggler on the host. The existing specs check the settings through the RPC at most, so a macro that is saved but never typed, or a jiggler schedule that is stored but never moves the mouse, would pass.

Fix

The new spec ui/e2e/remote-agent/ra-hid-profiles.spec.ts runs in the remote-agent project and reads the host side through the remote agent, as the other ra-* specs do. Its five tests run in order on the shared session:

  1. A macro (one F24 key) and a custom jiggler schedule entered in the settings are saved exactly as entered: the macro's steps, and a jiggler config of every second, after one second without input, no random delay, UTC.
  2. Both survive a reboot, in the RPC results and in the settings pages.
  3. With no browser session connected, the jiggler moves the host's relative mouse on both axes.
  4. The macro bar types the macro on the host: one F24 press, then one release.
  5. Deleting the macro and disabling the jiggler in the settings take effect, and the original macros are left in their order.

The file restores the original jiggler state and config, and removes only the macro it created, also when a test fails. To know that the session is closed before test 3, it polls /webrtc/stats on a device that answers it with JSON (the JetKVM Mini, a smaller JetKVM with its own firmware that serves this UI). A device without the endpoint answers 404 or, like the JetKVM, serves the UI's HTML for the unknown path; there the spec waits a fixed 5 s.

The spec comes from the JetKVM Mini's suite (kvm-mini e2e/mini/hid-profiles.spec.ts), where it has run since September. The jiggler config fields, the six-field cron schedule with seconds and the relative mouse movement it checks are the same in this repository's jiggler.go.

Testing

The e2e type check, oxlint --deny-warnings and oxfmt --check pass on dev, and playwright test --list --project=remote-agent lists the five tests. On the Ethernet JetKVM Mini with its remote host, all five passed in 35.5 s. It was not run on a JetKVM.

A macro and a jiggler schedule entered in the settings are saved as
entered and survive a reboot; the jiggler moves the host's mouse while no
session is connected, the macro bar types the macro on the host, and
deleting both in the settings takes effect. The host side is read through
the remote agent.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3b75fa744a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ui/e2e/remote-agent/ra-hid-profiles.spec.ts Outdated
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-30T21:44:15.030873Z 3b75fa7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3b75fa7. Configure here.

Comment thread ui/e2e/remote-agent/ra-hid-profiles.spec.ts
The JetKVM has no /webrtc/stats; its catch-all route serves the UI's HTML
with status 200 for it, so the 404 check never took the fixed wait. Only a
JSON answer is polled for the session state now.
@adamshiervani
adamshiervani merged commit bb345a4 into dev Sep 30, 2026
5 checks passed
@adamshiervani
adamshiervani deleted the test/e2e-hid-profiles branch September 30, 2026 21:54
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