DreamWeave: website links in the bar icon's dropdown #4

Open
AwfulWaffle wants to merge 29 commits from AwfulWaffle/RynthServers:dreamweave-bar-menu into main
First-time contributor

Stack (apply in order): RynthCore #12, RynthCore #13, RynthServers #1, RynthServers #2, RynthServers #3, RynthServers #4. RynthCore first; the RynthServers PRs build against it.

Stacks on serverpack-web-panel-engine. Last of four. Pairs with the RynthCore bar-menu PR (plugin API v95).

What this adds

  • ServerPack. An optional ServerBarMenu hook. A server can give its bar icon a hover dropdown, which becomes the manifest's "barMenu" on the server's window. BuildSectionsJson takes it as an optional last parameter, so every other server pack's manifest is byte-for-byte what it was.
  • DreamWeave. Hovering the DreamWeave bar icon drops down Market, Suit Builder and Ability Planner icons. Their tooltips name the link. Each one runs the same /rserver verb as the card button. Clicking the DreamWeave icon still opens the card.
  • Older engines. On an engine before v95, the card keeps its three buttons. On v95+ the buttons go, since the dropdown has them. This is checked at draw time from Host.Version, never from the compile-time SDK version. BarMenuEngineApi is pinned by test to the engine's PluginContractVersion.BarMenu.

The last commit only renumbers 94 to 95, following the RynthCore renumber.

How it was tested

Tools\RynthServerPack.Tests    110 test(s), 3837 check(s): 110 passed
all 18 plugins                  0 Error(s)

Tested in game on DreamWeave stage with the bar-menu engine:

  • the dropdown opens on hover and stays while moving into it;
  • each icon opens its page, logged in;
  • the card no longer shows the three buttons.

🤖 Generated with Claude Code

The abilities link now opens DreamWeave's live class ability page (/play/abilities), where a character raises and lowers its class abilities in place, instead of the retired planner (/tools/abilities). It is renamed "Class Abilities" and listed first in the dropdown, the card buttons, the usage line and the feature text. The tests pin the new label, order and launch URL.

Stack (apply in order): RynthCore #12, RynthCore #13, RynthServers #1, RynthServers #2, RynthServers #3, RynthServers #4. RynthCore first; the RynthServers PRs build against it. Stacks on serverpack-web-panel-engine. Last of four. Pairs with the RynthCore bar-menu PR (plugin API v95). ## What this adds - **ServerPack.** An optional `ServerBarMenu` hook. A server can give its bar icon a hover dropdown, which becomes the manifest's `"barMenu"` on the server's window. `BuildSectionsJson` takes it as an optional last parameter, so every other server pack's manifest is byte-for-byte what it was. - **DreamWeave.** Hovering the DreamWeave bar icon drops down Market, Suit Builder and Ability Planner icons. Their tooltips name the link. Each one runs the same `/rserver` verb as the card button. Clicking the DreamWeave icon still opens the card. - **Older engines.** On an engine before v95, the card keeps its three buttons. On v95+ the buttons go, since the dropdown has them. This is checked at draw time from `Host.Version`, never from the compile-time SDK version. `BarMenuEngineApi` is pinned by test to the engine's `PluginContractVersion.BarMenu`. The last commit only renumbers 94 to 95, following the RynthCore renumber. ## How it was tested ``` Tools\RynthServerPack.Tests 110 test(s), 3837 check(s): 110 passed all 18 plugins 0 Error(s) ``` Tested in game on DreamWeave stage with the bar-menu engine: - the dropdown opens on hover and stays while moving into it; - each icon opens its page, logged in; - the card no longer shows the three buttons. 🤖 Generated with [Claude Code](https://claude.com/claude-code) ## Update: Class Abilities link (6570ff1, a82d0f9) The abilities link now opens DreamWeave's live class ability page (`/play/abilities`), where a character raises and lowers its class abilities in place, instead of the retired planner (`/tools/abilities`). It is renamed "Class Abilities" and listed first in the dropdown, the card buttons, the usage line and the feature text. The tests pin the new label, order and launch URL.
Adds partial void ServerCardActions(), drawn at the top of the server card under RynthCore's verdict (render thread). ServerPackUi takes an optional cardActions delegate; the plugin passes DrawCardActions (a delegate cannot bind an unimplemented partial, CS0762).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hookless servers render exactly as before: call _cardActions?.Invoke() after RenderVerdict and let the existing separator close the block. Test now pins the RenderBody separator count and restores the trailing CRLF.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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>
An optional hook, collected once in the constructor. ServerPackCommands.Usage
appends a server's lines (trimmed, blanks dropped) after the shared two, and
"/rserver help" and an unknown word print them all. A server without the hook
prints exactly the two lines it always has (pinned on Coldeve).
ServerProjectsTests.PluginsDir is internal so other tests can share it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
DreamWeaveWeb (constants-only destinations and launch URL) and LaunchWire
(/weblogin request, [WEB] reply parser that refuses player-authored copies).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The plugin project did not compile (ChatSource not linked). LaunchWire now treats any line starting with the success stem as success-shaped: malformed, it is dropped, never returned as refusal text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Code-shaped refusals are replaced, self-expiry in Begin, Reset keeps the throttle,
late valid codes are eaten as Stale within the code lifetime, thread contract documented.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the _expired flag with _staleUntilMs, raised by every started Begin and never
lowered, so an earlier request's late code is eaten after overlap, Cancel or Reset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Restore blank line before the pending-destination doc comment, fix the stale-window test comment, and pin that a refused Begin does not extend the stale window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WebProfile.Key(serverId, account) = serverId/ + 32 lowercase hex of SHA-256 over the server id and the trimmed, lower-cased account; null without an account. Keys pass ServerWebOpen.IsValidProfileKey.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Golden pins for dreamweave/coldeve alice keys, a Busy-Begin stale-window pin, and Key returns null when the result fails ServerWebOpen.IsValidProfileKey.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DreamWeaveWebTools.cs wires the launcher into the ServerPack hooks: the card
buttons (render thread, draw only, a click queues StartLaunch with RunOnTick),
the /rserver market|suit|abilities verbs, the /weblogin reply read off chat
(Code, Refused and Stale eat the line; Stale does nothing else), the 10 s
timeout polled every tick, and Reset at login, logout and shutdown. Every
launcher call is under lock (Gate); Send, OpenWeb, Reply and the log are
always outside it. OpenWeb's answer replaces the "Opening X..." status.
WebButtons.cs draws the buttons and is the only ImGui code in the web tools.
A source-scan test pins the thread rules.

Rebased onto release 2026.11.8.1, which ships its own DreamWeavePlugin.cs
(bank check, Bank page) and DreamWeaveSkills.cs (Skills and Character
panels, /rserver skills). Those files keep the one implementation of each
shared hook and call the web tools' Web* method first; the web code lives
in DreamWeaveWebTools.cs. The ImGui scan covers the web tools' own files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ServerChatText reads every line through the launcher, with no Active
  gate first: a code answering our request is eaten whatever the world is
  now, and opens nothing when the world is no longer DreamWeave.
- WebLauncher: a generation token (Begin when Started, Reset) and
  SetResult(generation, status), which replaces the status compare and
  the use of Cancel as a status setter. The no-panel note is once per
  login epoch, so an answer from an earlier login can't spend it.
- An open failure reads "Market: Couldn't open your browser (code N)."
- StartLaunch's catch answers "Couldn't start the web open."
- ServerUsageLines: an optional shared hook for a server's own usage
  lines; DreamWeave lists market | suit | abilities. Hookless servers
  print the same two lines as before (pinned on Coldeve).
- The source scan is allow-lists: every lock is on the launcher's Gate
  and calls only its members, the Stale arm is exactly eat = true, Draw
  calls only ImGui, SafeImGui and click. Comments are stripped without
  touching string literals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Calls: one CallPattern for the lock and Draw allow-lists, which also
  reads "?." member chains and a type-argument list before "(", so
  Reply?.Fail( and Notify<int>( count as non-launcher calls.
- Monitor is banned in WebButtons.cs and DreamWeaveWebTools.cs; the host
  takes the launcher's lock in exactly 9 places, and each lock body is
  pinned exactly (no host property read under it either).
- ServerChatText: everything before its first lock is pinned exactly
  (declarations only), so no gate, return or throw can come before the
  launcher reads the line.
- WebLauncher.cs holds no Action, Func or delegate; any scanned file
  with a raw string literal fails, since the scan does not model them.
- Usage: "Market, Suit Builder or Ability Planner". The shared two lines
  are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- LaunchWire.IsSuccessShaped: a server line starting "[WEB] Launch code",
  well formed or not. OnChatLine keeps a malformed one out of chat: a
  pending request takes it as Refused with the unexpected-reply message;
  otherwise Stale inside the stale window, NotOurs after. TryParse and
  its pins are unchanged.
- An empty "[WEB] " refusal is an unexpected reply too.
- Wording: "an unexpected reply (is RynthDreamWeave up to date?)",
  "Wait a few seconds between website opens.", "Couldn't open the
  website."
- Tests: the raw-string guard covers only the DreamWeave files the scan
  parses; the scan test's name says its catch logs through LogTagged;
  the directory walkers added on this branch use
  ServerProjectsTests.PluginsDir().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The csproj declared nothing, so ServerPlugin.props defaulted it to 66, and a
release build (RynthPluginSharedSdk=true) raises any declared value under 88 to
the SDK's API (95): the plugin would then load on no current engine.

Audit of every RynthCore SDK member the plugin compiles against (DreamWeave's
own code, the shared ServerPack and the RynthSuite files it links). "Isolated"
means called only from a [MethodImpl(NoInlining)] method behind its Has* check,
which an older Runtime\PluginShared SDK copy cannot fail; a Has* check inside an
ordinary method does not protect it.

Not isolated, so the minimum must cover them:
- v90 RynthAcPanel: type of the static field MainAcPanels (DreamWeaveSkills.cs)
- v90 IsAcPanelOpen, AcPanel, RynthAcPanelOp, HasAcPanels: DreamWeaveSkills.cs
  (HasAcPanels checked in the same method)
- v90 PanelScale, PanelDragWithLastItem, GetIconTexture, RynthIconKind:
  DreamWeave/SkillsPanel.cs
- v90 HasFramelessWindows: ServerPackPlugin.BuildSectionsJson
- v89 SetPanelOpen, HasSetPanelOpen, RynthPanelOpen: ServerPackPlugin.SetWindow,
  DreamWeaveSkills.cs, SkillsPanel.cs (Has* checked in the same method)
- v79 HasTraining, TryGetTrainingInfo, TrainSkill: DreamWeave/SkillsReader.cs
  (HasTraining checked in the same method)
- v78 HasServerMessages, SetServerMessageInterest: ServerPackPlugin.Initialize;
  RynthCore.PluginSdk.Net.ServerMessage: DreamWeaveSkills.ServerMessage
- before v62 (table fields ahead of the v62 append marker in
  RynthCoreApiNative.cs): Log, WriteToChat, InvokeChatParser, TryGetWorldName,
  TryGetAccountName, TryGetObjectName, TryGetPlayerVitals,
  TryGetObjectIntProperty, TryGetObjectQuadProperty, GetPlayerId, ImGuiContext,
  Version and their Has* checks

Isolated, so they do not count:
- v94 HasWebPanel, OpenWebPanel, GetWebPanelState, CloseWebPanel and the
  WebPanel* types: only in ServerPackWeb.cs's NoInlining *Core methods, which
  catch MissingMethodException and TypeLoadException (from
  pr/serverpack-web-panel-engine on)
- the bar menu (v95) uses no SDK member: it compares Host.Version to
  DreamWeaveWeb.BarMenuEngineApi

Highest non-isolated API: 90. Declared 90.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
AfterPanel now asks ServerWebOpen.FallbackToBrowser first and opens the
browser only there; the RefusedBeforeNavigate switch arm is gone. A source
scan pins OpenInBrowser(r, done) to exactly two places (OpenWeb's browser
route and right after the guard), so a browser open added to another arm
(a spent code opened twice) fails the tests. Checked by mutation: an extra
arm gives 3, a moved call fails the guard check.

A newer Open answers the older waiting open Closed only once the engine has
queued it; a refused or throwing second open leaves the first waiting (test
added, RED against the old order). The SDK-name scan also covers the
WebPanel*Fn table slots. Trailing newlines restored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The engine's web panel landed as plugin API v94 (was v93 provisional on
up/web-panel; renumbered after upstream's v93). Only comments named the
number: the panel is found through RynthCoreHost.HasWebPanel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Link the engine's PluginContractVersion into the tests and compare the plugin's
BarMenuEngineApi to PluginContractVersion.BarMenu instead of a literal 94. Reword
the plugin description: links in the bar icon dropdown, card buttons on older
RynthCore.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The engine's barMenu manifest key landed as plugin API v95 (was v94 on
up/bar-menu; renumbered after the web panel's v94). BarMenuEngineApi and the
comments follow; the test still pins the const to the engine's own
PluginContractVersion.BarMenu.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On engines that draw the bar menu the card has no link buttons, so the
card's info line now says the links open from the bar icon's menu, or
this card on older RynthCore.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The third bar-menu item (and card button on older engines) now opens
/play/abilities, the live class ability panel, labelled Class Abilities.
/rserver abilities keeps its verb.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bar dropdown, the card buttons on older engines and the /rserver
usage line now list Class Abilities, then Market, then Suit Builder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This pull request has changes conflicting with the target branch.
  • Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeave/DreamWeaveWeb.cs
  • Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeavePlugin.cs
  • Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeaveSkills.cs
  • Plugins/RynthCore.Plugin.RynthDreamWeave/DreamWeaveWebTools.cs
  • Plugins/RynthCore.Plugin.RynthDreamWeave/RynthCore.Plugin.RynthDreamWeave.csproj
  • Plugins/RynthCore.Plugin.RynthDreamWeave/ServerData.cs
  • Tools/RynthServerPack.Tests/DreamWeaveWebTests.cs
  • Tools/RynthServerPack.Tests/Program.cs
  • Tools/RynthServerPack.Tests/ServerPackModelTests.cs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u dreamweave-bar-menu:AwfulWaffle-dreamweave-bar-menu
git switch AwfulWaffle-dreamweave-bar-menu

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff AwfulWaffle-dreamweave-bar-menu
git switch AwfulWaffle-dreamweave-bar-menu
git rebase main
git switch main
git merge --ff-only AwfulWaffle-dreamweave-bar-menu
git switch AwfulWaffle-dreamweave-bar-menu
git rebase main
git switch main
git merge --no-ff AwfulWaffle-dreamweave-bar-menu
git switch main
git merge --squash AwfulWaffle-dreamweave-bar-menu
git switch main
git merge --ff-only AwfulWaffle-dreamweave-bar-menu
git switch main
git merge AwfulWaffle-dreamweave-bar-menu
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rynth/RynthServers!4
No description provided.