Commit graph

67 commits

Author SHA1 Message Date
Daniel Wallace
f8d55c7c2a Bar dropdown: clock guard in BarMenuHover, shared letter fallback
The hover timer resets on a backwards clock (pop-out's own ImGui context) or a frame gap over 0.5 s; the guard is pure and tested. The dropdown's letter fallback uses the same helper as IconFor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:13:35 -08:00
Daniel Wallace
60a7bddf59 Bar: hover dropdown for a plugin window's barMenu
BarMenuHover (pure timer: 0.15 s open, 0.30 s close, switch at once, no reopen after a click until the icon is left), the dropdown drawn under the bar icon, and a barMenu-only plugin reload now reaches the bar (WindowPlan.MenuSignature, refreshed in PluginWindows.Sync without re-registering the panel).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:13:35 -08:00
Daniel Wallace
4cca800a26 Sections: plugin windows' barMenu (v94), parsed and capped
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:13:35 -08:00
Daniel Wallace
2225b90b2c Plugin API v94: renumber the web panel after upstream's v93
Upstream release 2026.11.8.1 took v93 for GetMonsterHealth. The web panel's four slots now follow
GetMonsterHealthFn in the engine table and the SDK's RynthCoreApiNative, and the web panel is v94:
PluginContractVersion.Current, RynthCoreSdkApiVersion, HasWebPanel (Version >= 94), the comments,
docs/WEB_PANEL.md, the changelog and PluginManifestTests (HasWebPanel version cases, slot names).
Still provisional: unmerged upstream branches also use 94.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:13:05 -08:00
Daniel Wallace
6edc196270 Docs: Failed and OpenedInBrowser appear together
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:09:14 -08:00
Daniel Wallace
7e2cf67e30 WebPanel: publish Failed together with the browser-fallback outcome
A plugin polling between Failed and OpenedInBrowser saw Failed with no
flag and, per the docs, opened the page itself: a second open with a
spent code. While the fallback is pending the status keeps its
pre-failure value; after OpenInBrowser (outside the lock) one lock sets
Failed, the error and, when the browser opened, the flag. The
no-fallback path is unchanged. Harness: OpenInBrowser delay mode and a
continuous poll in CreateFailureFallsBack. Show comments reworded as
defensive, not observed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:09:14 -08:00
Daniel Wallace
537a40a430 WebPanel final-review fix: truthful browser fallback, focus gate, docs
- Creation-failure fallback sets OpenedInBrowser and says "opened" only
  when the system browser actually opened; otherwise chat says the
  browser did not open. Harness check CreateFailureBrowserFails.
- FocusPage follows the same in-process foreground rule as
  SetForegroundWindow (Show and controller creation). Harness check
  NoFocusFromAnotherProcess; posted-key checks report UNVERIFIED when
  another process holds the foreground.
- PermissionRequested: SavesInProfile = false.
- WEB_PANEL.md: allowlist empty-entry rule, GetState -4, AOT renumber
  caveat, softened focus claim (also in the Changelog).
- Formatting: ChatCommandReplyTests brace, /rc layout comment,
  PluginContract blank line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:09:14 -08:00
Daniel Wallace
3f75a9711a Docs: web panel dialogs claim marked unconfirmed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:09:14 -08:00
Daniel Wallace
6918e6736f Docs: web panel API
Plugin contract (docs/WEB_PANEL.md) and changelog for the v93 web panel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:09:14 -08:00
Daniel Wallace
4e30b16bf5 WebPanel fix round 1: close reply by code, loader PE check, no-open scan, drop Core.xml
- RynthCoreChatCommands: each method keeps its own summary; /rc webpanel close answers by the Close code (closing / already closed / could not close); verb added to the class header list.
- Build-Installer.ps1: Assert-PeMachine throws unless Runtime\WebView2Loader.dll is x86 (0x14C).
- ChatCommandReplyTests: HandleWebPanelCommand has no Open(, Navigate( or ShellExecute.
- Engine csproj: Microsoft.Web.WebView2.Core.xml is not copied (with the other dropped WebView2 copies).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:09:14 -08:00
Daniel Wallace
9797db14a3 Ship WebView2 Core and the x86 loader in Runtime; installer checks; notices
Build-Installer.ps1 now requires Runtime\Microsoft.Web.WebView2.Core.dll and
Runtime\WebView2Loader.dll in a CoreCLR staging tree. THIRD-PARTY-NOTICES.md
gains the Microsoft WebView2 SDK entry with the licence copied from the package's
LICENSE.txt. A scratch EngineOnly publish put both DLLs at the target root, the
loader is x86 (0x14C), and no runtimes\ folder or WinForms/Wpf DLL is present, so
no csproj change was needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:09:14 -08:00
Daniel Wallace
bfb87aba04 /rc webpanel status|close
Status prints one redacted line (WebPanelApi.Describe plus the address space);
close closes the live panel. Neither opens a URL. WebPanelHost.Describe now
reports visible/focused/in-browser instead of raw flags; the stacked test-hook
summaries are put back on their own members. ChatCommandReplyTests covers the verb.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:09:14 -08:00
Daniel Wallace
ba7d96c7d9 WebPanel: fix round 2 (unresponsive reset, foreground gate, clipboard, Open rollback)
- Reset the unresponsive counter on teardown, on each new open and on
  navigation completed; harness check UnresponsiveCountResetsPerOpen.
- Show only calls SetForegroundWindow when our process holds the foreground.
- ClipboardRead permission is denied for about:blank.
- Open rolls back live handle and status fields if the STA thread fails to start.
- State struct minimum size is 28 on both platforms; test asserts it unguarded.
- Harness Escape message reports game key count as informational.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:09:14 -08:00
Daniel Wallace
388f3fd908 Web panel host fix round 1: non-fatal process kinds, late failures, thread restart, focus and permission guards
- ProcessFailed: only BrowserProcessExited (teardown) and RenderProcessExited (about:blank, recreate on the next Open) fail the panel, as WebView2's docs describe the kinds; GPU, utility, sandbox, PPAPI and frame-only renderer exits are logged only. RenderProcessUnresponsive fails it at 3 reports within 30 s. The handler acts on the panel being served now.
- Fail decides "ignored" under the lock first and hides the panel only when the failure is live: a late failure for a superseded handle no longer hides the newer panel.
- The panel thread's finally restarts the thread when an Open is still queued and the host is not shutting down; _threadDone goes false only after StartStaThread returns.
- Show takes the foreground only when a window of this process (or of this panel's WebView2 browser process) holds it, never while the foreground is null. The visibility rule counts the browser process (CoreWebView2.BrowserProcessId) as ours, so the page's own dialogs do not hide the panel.
- ClipboardRead is allowed only for an allowlisted origin. NavigationStarting and NewWindowRequested fail closed on an exception.
- WebPanelApiRules: the ABI glue's pure parts (refusals, GetState Size check, state write), tested in WebPanelTests with WebPanelNativeArgs. WebPanelApi.LiveHandle and the browser pid in Describe for Task 4.
- Harness: GpuProcessCrashKeepsPanel and LateFailureForSupersededHandle (both RED before the fix), UnloadWhileVisibleCollected reports UNVERIFIED when the window was not visible, the game-side key count is informational. EngineSettingsTests: WebPanel default-on round trip and setter case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:09:14 -08:00
Daniel Wallace
f130be3d2b Web panel host: STA thread, WebView2 lifetime, allowlist, focus, visibility; offline harness
WebPanelHost (CoreCLR engine only): one unowned WS_POPUP over the game client area on its own STA thread and GetMessage loop, lifted from the 2026-11-07 spike's popup-free path. Open/Navigate/Close/GetState never block: they validate, update the caller-visible state under a lock, queue work and post WM_APP+1 to the host window. WebView2Loader.dll is loaded by full path from the shim's Runtime folder; the runtime probe on the panel thread decides RuntimeMissing, any later creation failure is CreateFailed. Navigation guard (NavigationStarting incl. redirects, NewWindowRequested, LaunchingExternalUriScheme): off-list http/https goes to the system browser, anything else is dropped; logs carry only Redact()ed URLs or hosts. Escape via AcceleratorKeyPressed unless PageKeepsEscape. Visibility by the PID rule on a 50 ms timer plus a foreground WinEvent; raises only when below the game; layout remembered in layout.json. Shutdown unhooks, closes the controller, destroys the window and unregisters the class before the collectible context unloads.

WebPanelNativeArgs copies every string out of the caller's (stack or pooled) buffers before anything is queued. WebPanelApi is the ABI glue (AOT keeps the Unavailable stub). engine.json "WebPanel" (default true) is the kill switch. EngineLifecycle shuts the panel down after EndSceneHook.Uninstall. The WebView2 package's WinForms/WPF references are dropped before reference resolution.

Deviations from the brief: IWebPanelEnvironment gains BrowserExecutableFolderForTests (the harness forces a creation failure with it) and is excluded from the AOT build with the host; Show only takes the foreground when it is already in this process (or none).

tools\WebPanelHarness (x86 exe) + tools\WebPanelHarness.Payload: fake game thread, fake 16 ms pump, collectible context mirroring EngineLoadContext, local virtual hosts, posted input only. 17 ok, 0 FAIL, 4 UNVERIFIED offline (Escape via posted input never raises AcceleratorKeyPressed; visibility needs the foreground): owner in-game checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:09:14 -08:00
Daniel Wallace
2841df63be Web panel ABI: x86 struct assertions, restore v93 divider encoding
WebPanelStructsMatch now asserts 48 bytes / Reserved at 32 on x86 for engine and SDK types when run 32-bit. PluginContract.cs v93 divider was double-encoded (cp1252 read of UTF-8); restored to box-drawing chars.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:09:14 -08:00
Daniel Wallace
28d480c90a Plugin API v93: web panel table fields and SDK wrappers (number provisional)
Four appended table slots (WebPanelOpen/Navigate/Close/GetState), native structs and code enums in engine and SDK, a WebPanelApi stub answering Unavailable (CoreCLR flavour only; AOT leaves the slots zero), SDK OpenWebPanel/NavigateWebPanel/CloseWebPanel/GetWebPanelState with HasWebPanel gated on Version >= 93, parity tests in PluginManifestTests. Also adds the missing System usings to the Task 1 WebPanel files, which did not compile in the engine project (no ImplicitUsings).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:08:57 -08:00
Daniel Wallace
0d5b9700db Web panel tests: back to invariant globalization, add lone-surrogate check
Matches the shipped engine; the surrogate host discriminates the IdnHost try/catch under invariant mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:07:33 -08:00
Daniel Wallace
e428f65c4d Web panel: IsAllowed fails closed on invalid IDN hosts
Uri.IdnHost throws UriFormatException for hosts like c<U+2100>; catch and reject. Test project now runs with ICU so the case is covered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:07:33 -08:00
Daniel Wallace
0b0d2cb072 Web panel: URL, window and profile policies with offline tests
Pure C# policies (allowlist/redaction, visibility/layout, profile folder) plus tools/WebPanelTests (107 assertions).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 13:07:33 -08:00
c68204f160 RynthCore as of 2026-11-08 (internal 9297e93): release 2026.11.8.1 2026-11-08 15:48:45 -05:00
418d80bafb RynthCore as of 2026-11-05 (internal 6f1a2ed): release 2026.11.3.2 2026-11-05 07:42:35 -05:00
abe0cee4de RynthCore as of 2026-11-03 (internal b7778bc): release 2026.11.3.1 2026-11-03 07:37:24 -05:00
5ad460080c RynthCore as of 2026-11-02 (internal 3263c88): release 2026.11.2.2 2026-11-02 20:34:03 -05:00
00ee01167e Snapshot for release 2026.11.2.1 (internal 8d9795d) 2026-11-02 03:33:33 -05:00
b1c182b05d Snapshot for release 2026.10.31.4 (internal 34cea02) 2026-11-01 18:47:28 -05:00
057bb66426 Snapshot for release 2026.10.31.3 (internal 136d99a) 2026-10-31 19:26:44 -04:00
2546497f37 Snapshot for release 2026.10.31.1 (internal 69b244e) 2026-10-31 15:01:58 -04:00
8cb74c7685 Snapshot for release 2026.10.29.2 (internal f1e8d4e) 2026-10-29 07:19:17 -04:00
0bfe184288 Snapshot for release 2026.10.28.3 (internal 1eeafca) 2026-10-28 23:23:39 -04:00
f9ae10d692 Snapshot for release 2026.10.28.2 (internal 4a5e2d7) 2026-10-28 19:47:17 -04:00
8728446a27 Snapshot for release 2026.10.28.1 (internal de8d80b) 2026-10-28 06:36:37 -04:00
f4246dbbd0 Snapshot for release 2026.10.27.1 (internal ed07fd7) 2026-10-27 08:41:02 -04:00
539a7a3e64 Snapshot for release 2026.10.23.1 (internal 4204305) 2026-10-23 16:34:00 -04:00
2be3668232 Snapshot for release 2026.10.22.2 (internal 466f796) 2026-10-22 16:42:32 -04:00
c4efe5821d Snapshot for release 2026.10.21.3 (internal 04b831a) 2026-10-21 21:03:43 -04:00
b059db4ca2 Snapshot for release 2026.10.21.2 (internal dd171ba) 2026-10-21 12:04:02 -04:00
5defb009a6 Snapshot for release 2026.10.21.1 (internal 6556f92) 2026-10-21 09:35:06 -04:00
286abd1445 Snapshot for release 2026.10.20.1 (internal e05e9a8) 2026-10-20 21:28:16 -04:00
7439236e1d Snapshot for release 2026.10.19.2 (internal 01e8aab) 2026-10-20 04:54:13 -04:00
44074df011 Snapshot for release 2026.10.19.1 (internal fa7a8f6) 2026-10-19 09:11:20 -04:00
605ec6f0e6 Snapshot for release 2026.10.18.1 (internal 0b612bf) 2026-10-18 19:44:48 -04:00
8330793300 Snapshot for release 2026.10.17.1 (internal e8271dd) 2026-10-17 00:41:01 -04:00
a57049d931 Snapshot for release 2026.10.15.6 (internal 6fd9478) 2026-10-15 23:44:38 -04:00
aba17a9834 Snapshot for release 2026.10.15.3 (internal ea85b68) 2026-10-15 21:40:00 -04:00
516ad2bdf2 Snapshot for release 2026.10.15.2 (internal 9094d68) 2026-10-15 20:32:34 -04:00
8bb1c3aa23 Snapshot for release 2026.10.15.1 (internal 4b7e805) 2026-10-15 09:27:14 -04:00
67574b56e6 Snapshot for release 2026.10.13.3 (internal c8b9b39) 2026-10-13 18:52:40 -04:00
401a8613cd Snapshot for release 2026.10.13.2 (internal fa01751) 2026-10-13 15:07:08 -04:00
1d86acdf27 Snapshot for release 2026.10.13.1 (internal 90a2f4a) 2026-10-13 14:25:48 -04:00