Commit graph RynthServers/Plugins/Shared/ServerPack/ServerWebOpen.cs
Author SHA1 Message Date
Daniel Wallace
0ba3b5909e ServerPack: use the engine's web panel when it has one
OpenWeb now opens the page in RynthCore's in-game web panel (plugin API v93)
and falls back to the system browser only when the panel refused before
navigating. A handle from OpenWebPanel only means queued, so the open is
answered from OnTick (PollWeb), which reads GetWebPanelState until it decides:
Loading/Ready opened; Failed+OpenedInBrowser the engine opened the browser
(do nothing more); Failed+ProcessFailed spent; Failed+RuntimeMissing or
CreateFailed with no browser and no navigation falls back. A 20 s poll
timeout answers NoAnswer (neutral, no fallback). done fires exactly once.

ServerWebPanel.cs is pure (an int/string engine seam), so the mappings and
the once-only answer are tested with a fake engine. Every SDK web-panel name
sits in four NoInlining helpers in ServerPackWeb.cs, each called inside
catch (MissingMethodException) and catch (TypeLoadException); a source scan
pins that, the poll's place in OnTick, and the absence of locks. CloseWeb
closes only the handle this plugin opened.

Builds only against a RynthCore SDK with the web panel (0ef12d7); against
418d80b the helpers do not compile (8 errors, all in ServerPackWeb.cs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:37:49 -08:00
Daniel Wallace
8dda4fdf96 ServerPack web open: a request never prints its URL; Windows error wording
WebOpenRequest is a record, so its generated ToString printed the URL, which
can carry a one-time code. It now names the title only. The browser failure
reads "Couldn't open your browser (Windows error N)."

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:18:45 -08:00
Daniel Wallace
c085c16e15 ServerPack web open: fall back only before the panel navigates
PanelResult + pure FallbackToBrowser; guard TryOpenPanel throws; guard done callbacks;
hand ShellExecuteW the validated absolute URI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:18:45 -08:00
Daniel Wallace
dd80216933 ServerPack: open a web page in the engine's panel, else the browser
Pure allowlist/route rules (ServerWebOpen) plus the host opener (ServerPackWeb):
ShellExecuteW on a background STA thread; panel seams stubbed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:18:45 -08:00