Watch
0
0
Fork
You've already forked hyperhive
0

agent: let the screen page keep reload, the address bar and its own buttons

The page forwarded every key to the remote desktop and cancelled it, so F5 and
Ctrl+R could not reload, though the disconnect message tells the operator to
reload, and Enter or Space on the fit and debug buttons did nothing. F5, F12,
Ctrl/Cmd+R, Ctrl/Cmd+L and any key pressed on a button now go to the browser;
the rest still go to the remote desktop. The filter is a small module with a
test, bundled for the page as static/screen-keys.js, and the agent-page doc
describes it.
This commit is contained in:
iris 2026-11-25 19:24:08 +01:00
commit ff7215a4b1

View file

@ -3,6 +3,7 @@
// dist/screen.html served at GET /screen
// dist/static/agent.css served at /static/agent.css (@import
// resolved from @hive/shared)
// dist/static/screen-keys.js the key filter `screen.html` loads
//
// The in-container Rust binary mounts `dist/` (with per-agent
// `services.hyperhive.agent.frontend.extraFiles` layered on top) as a
@ -37,6 +38,17 @@ for (const entry of ["colors.css", "theme.css", "agent.css"]) {
});
}
// The key filter the screen page loads ahead of its own script, as the global
// `hiveScreenKeys` (the page's script is classic, not a module).
await build({
entryPoints: [src("screen-keys.js")],
outfile: staticDir("screen-keys.js"),
bundle: true,
format: "iife",
globalName: "hiveScreenKeys",
logLevel: "info",
});
copyFileSync(src("screen.html"), dist("screen.html"));
console.log("agent build ok →", dist(""));