ServerPack: card actions, web open, usage lines #1

Open
AwfulWaffle wants to merge 6 commits from AwfulWaffle/RynthServers:serverpack-web-open 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.

First of four stacked PRs for DreamWeave's website links. Order: this one, then dreamweave-web-panel, then serverpack-web-panel-engine, then dreamweave-bar-menu.

What this adds (ServerPack, shared by every server plugin)

Three small hooks a server plugin can use. None of them changes a server that doesn't use them.

  • Card actions. A server can draw its own buttons on its card (DrawCardActions). No separator is added for it.
  • Open a web page. ServerWebOpen opens a URL in the engine's web panel when the engine has one, else in the system browser.
    • Only hosts on the server's own allowlist are opened (https, default port, exact host).
    • It falls back to the browser only before the panel has navigated, so one request never opens twice.
    • A request never prints its URL: launch codes ride in the query string.
    • Windows errors are reported in plain words.
  • Usage lines. ServerUsageLines lets a server add its own /rserver usage lines to the help.

How it was tested

Tools\RynthServerPack.Tests    76 test(s), 2705 check(s): 76 passed
all 18 plugins                  0 Error(s) (the 2 NU1903 ILCompiler advisory warnings are pre-existing)

This was rebased from 2026.10.28.3 onto 2026.11.8.1 and merged cleanly.

🤖 Generated with Claude Code

Stack (apply in order): RynthCore #12, RynthCore #13, RynthServers #1, RynthServers #2, RynthServers #3, RynthServers #4. RynthCore first; the RynthServers PRs build against it. First of four stacked PRs for DreamWeave's website links. Order: this one, then dreamweave-web-panel, then serverpack-web-panel-engine, then dreamweave-bar-menu. ## What this adds (ServerPack, shared by every server plugin) Three small hooks a server plugin can use. None of them changes a server that doesn't use them. - **Card actions.** A server can draw its own buttons on its card (`DrawCardActions`). No separator is added for it. - **Open a web page.** `ServerWebOpen` opens a URL in the engine's web panel when the engine has one, else in the system browser. - Only hosts on the server's own allowlist are opened (https, default port, exact host). - It falls back to the browser only before the panel has navigated, so one request never opens twice. - A request never prints its URL: launch codes ride in the query string. - Windows errors are reported in plain words. - **Usage lines.** `ServerUsageLines` lets a server add its own `/rserver` usage lines to the help. ## How it was tested ``` Tools\RynthServerPack.Tests 76 test(s), 2705 check(s): 76 passed all 18 plugins 0 Error(s) (the 2 NU1903 ILCompiler advisory warnings are pre-existing) ``` This was rebased from 2026.10.28.3 onto 2026.11.8.1 and merged cleanly. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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>
This pull request has changes conflicting with the target branch.
  • Plugins/Shared/ServerPack/ServerPackPlugin.cs
  • Plugins/Shared/ServerPack/ServerPackWeb.cs
  • Plugins/Shared/ServerPack/ServerPlugin.props
  • Plugins/Shared/ServerPack/ServerWebOpen.cs
  • Tools/RynthServerPack.Tests/Program.cs
  • Tools/RynthServerPack.Tests/RynthServerPack.Tests.csproj
  • Tools/RynthServerPack.Tests/ServerPackCommandsTests.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 serverpack-web-open:AwfulWaffle-serverpack-web-open
git switch AwfulWaffle-serverpack-web-open

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-serverpack-web-open
git switch AwfulWaffle-serverpack-web-open
git rebase main
git switch main
git merge --ff-only AwfulWaffle-serverpack-web-open
git switch AwfulWaffle-serverpack-web-open
git rebase main
git switch main
git merge --no-ff AwfulWaffle-serverpack-web-open
git switch main
git merge --squash AwfulWaffle-serverpack-web-open
git switch main
git merge --ff-only AwfulWaffle-serverpack-web-open
git switch main
git merge AwfulWaffle-serverpack-web-open
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!1
No description provided.