Skip to content

Add native client dashboard, unified profiles and virtual worlds - #298

Open
ithyme7 wants to merge 1 commit into
Osiris-Team:masterfrom
ithyme7:codex/autoplug-native-296
Open

ithyme7 wants to merge 1 commit into
Osiris-Team:masterfrom
ithyme7:codex/autoplug-native-296

Conversation

@ithyme7

@ithyme7 ithyme7 commented Oct 4, 2026

Copy link
Copy Markdown

The tray opens a native FlatLaf dashboard with Server Browser, Singleplayer, Profiles, Server Manager and Settings. Play selects a matching local client profile or offers a reviewed clone/migration of a template. Singleplayer starts an isolated dedicated server, waits for its status ping, launches the client at its local port, and stops the server when the client exits. Share is an explicit action with a temporary UPnP TCP lease and a copyable public address; mapping failure retains local play with an explanation.

Implements the native architecture and virtual-world extension clarified in issue #296, starting from master 604c8ec7b9a814c37c7b8f9dbe7c8a9b8bad070d (10.2.0). No HMCL source, branch merge, imports or dependency is included. New implementation uses the repository's MIT license; existing third-party dependencies retain their own licenses.

  • The browser reuses AutoPlug's MineStat status protocol and displays MOTD, version/protocol, players and latency. It automatically imports the default vanilla servers.dat when present. Optional export preserves retained NBT metadata and writes a backup before replacement. Loader selection is an explicit local hint because ordinary pings do not expose a required modpack.
  • Isolated MODS, PLUGINS and MODS_SERVER profiles reuse the existing mod/plugin updater entry points and provider protocols. Active update defaults are separate per type. Shared checksum-addressed JARs, copied mutable configs, staged replacements, rollback/recovery and explicit disabling review support upgrades and downgrades without replacing a running global server installation.
  • Virtual worlds snapshot a server profile into independent save/config directories. Automatic dedicated-server preparation supports official Paper, Purpur and Fabric endpoints; other loaders can use an explicitly selected matching runnable JAR. Spigot BuildTools is correctly rejected as an installer. Server-mod worlds require an explicit matching client profile rather than copying server-only mods to a client. The Minecraft EULA is accepted only by an explicit per-world user action.
  • The world lifecycle owns both child processes, a stable OS file lock and its optional router mapping. It handles readiness failure, client/server exit, cancellation, forced-stop fallback and shutdown. Loopback local play never requests UPnP. Sharing requires online authentication and an explicit action; settings can disable UPnP or select a fixed available port. SOAP requests remain on the discovered gateway, avoid overwriting existing mappings, verify ownership, renew a finite lease and delete only the owned mapping.
  • The native launcher implements Mojang manifests/assets/libraries/natives, official Fabric/Quilt profiles and Forge/NeoForge installer metadata/processors. Managed runtimes include Java 25 from the captured Minecraft 26.3 manifest. Per-major local overrides are verified. Launch arguments use ProcessBuilder without a shell; interrupted preparation cannot start a late client, and cancelled installer processors are terminated.
  • Microsoft device authentication follows Microsoft, Xbox, XSTS, entitlement and Minecraft profile flows using an owner-registered public application. Tokens stay in memory. Cancelled or replaced sign-ins cannot overwrite a newer account/preference choice. Client/profile/world-only startup preserves periods in versions and hostnames and skips legacy server/background initialization; a headless world launch waits for its client and cleans up before exiting.

Validation: the final selected deterministic suites passed 112 tests with zero failures, errors or skips in an offline Maven package run (network disabled). The resulting packaged JAR then passed the real Windows CLI smoke, exit 0, in an isolated temporary home/working directory. The CLI verified three independent profile defaults, version periods, world creation/client attachment and unaccepted EULA state without starting the legacy server or contacting an owner account/router. The deterministic suites cover manifests, actual installer metadata, runtime/OS rules, migration and rollback, NBT, MineStat wire responses, account cancellation, world process ownership, CLI cleanup and UPnP ownership/lease failures. Original compiled fixture clients, an original installer processor and original dedicated-server/client child JVMs run through actual production ProcessBuilder paths. Production Java metadata GET probes for Modrinth/Bukkit and read-only Paper/Purpur/Fabric captures succeeded; they used no account and executed no game/server artifact. Fixture provenance records actual URLs, capture times and published checksums or honest absence of a published checksum.

Acceptance limits: the real Minecraft game, final authenticated Microsoft join, native desktop/tray interaction and real router/public-world accessibility have not been exercised. Swing screenshots render the actual four client panels at 800 and 1180 pixels offscreen, excluding Server Manager. UPnP uses an original localhost SOAP fixture; it does not configure the owner's router. Forge/NeoForge official installer metadata is tested, but real installer processors have not run against a real Minecraft JAR. Dedicated-server preparation automatically supports Paper/Purpur/Fabric; loaders needing server installers/argument scripts require an explicitly supplied executable bootstrap/server JAR. The inherited external-network/SteamCMD/download suites are excluded from the deterministic selector. Maintainers perform final live game validation under the issue clarification.

AI disclosure: this contribution was implemented and directly source-reviewed by AI coding agents. Concrete review findings were repaired and exercised with regression tests and actual build/CLI runs. No separate human technical review or owner account login is claimed. No payout address, account secret, game JAR or loader binary is included in the contribution.

See docs/native-client-dashboard.md, docs/unified-profiles.md and src/main/java/com/osiris/autoplug/client/worlds/PROTOCOL.md for commands, provider limits, process cleanup, protocol references and fixture provenance.

Refs #296. This requests maintainer acceptance testing and review; it does not claim the issue is already accepted, merged or paid.

Implemented and source-reviewed with disclosed Codex AI assistance.
Publishes the reviewed source tree 2e6312c.

Refs Osiris-Team#296.
@Osiris-Team

Copy link
Copy Markdown
Owner

@ithyme7 please include screenshots of the UI and the different tabs / actions here, and let me know what you did to achieve great UX?

@ithyme7

ithyme7 commented Oct 4, 2026

Copy link
Copy Markdown
Author

Thanks for the review. The images below render the actual production Swing/FlatLaf components from this PR, with fictional local sample profiles, saved servers and world metadata. They are offscreen component renders, not captures of a live Minecraft session or a native desktop/tray smoke run. No Microsoft account, external server ping or router operation was used for these images.

Server Browser

Fictional saved destinations, explicit local loader hints and Not checked status. The import/export, status and Play controls are visible; no server ping or game launch is claimed.

Server Browser

Singleplayer and address guard

The actual Copy join address handler, with a selected fictional world and no active mapping, displays: Use Play & share first; no public mapping is active. Review EULA remains visible; no world was launched.

Singleplayer and address guard

Profiles and launch guard

The actual Launch client handler with no selected profile displays Select a profile first. The fictional review-client begins with Template No. This render does not show row-selection highlighting.

Profiles and launch guard

Profiles after Toggle template

The actual Toggle template action on review-client persisted Template Yes, refreshed the table and returned Ready. A fresh ProfileStore read confirmed the change; the bounded SwingWorker completed in 191 ms. No launcher or updater callback ran.

Profiles after Toggle template

Settings

The real preference form with fixture defaults, Not signed in, explicit local offline testing and account/runtime explanations. No Microsoft sign-in was attempted.

Settings

Server Manager Console

The genuine additional fifth tab with the inherited command controls and an empty console. No command was executed. Its legacy Existing updates and settings subpanel is not evidenced: that content was blank in the headless layout attempt.

Server Manager Console

The UX choices implemented here are:

  • Task-based tabs: Server Browser for saved multiplayer destinations; Singleplayer for isolated local server worlds; Profiles for version/loader/template management; Settings for account and launch preferences. The tray dashboard also includes the existing Server Manager workflow.
  • Visible context before a launch: profiles show type, Minecraft version, loader and template status; saved servers show an explicit local loader choice because ordinary pings cannot identify a required modpack. The fixture server statuses remain "Not checked" rather than claiming a successful ping.
  • Review before applying updates and destructive changes: Check updates and Apply updates are separate actions. Update and clone/migration flows present the change plan and explicitly describe incompatible files becoming .jar.disabled. A migration creates a separate clone first, retains the source template, and removes the clone on cancellation or failure. Replacing a Minecraft servers.dat list asks for confirmation and preserves retained tags with a backup. Profile/world deletion is separately confirmed; it is not backed up automatically.
  • Local play and sharing are separate actions. The world table exposes "Review EULA" and the selected server/client profile. Play & share has an explicit confirmation explaining network access and the temporary router mapping; copying an address without an active public mapping produces an explanation instead of a fabricated join address.
  • Background feedback: launch preparation, network status checks and updater operations use SwingWorker with completion/error handling on the EDT. The panel status explains the current operation. This does not mean every file read is asynchronous or that every control is disabled while work runs; those are current limitations.
  • Explicit account/runtime settings: the interface distinguishes "Not signed in" and local offline testing, documents that account credentials stay in memory, and allows optional Java runtime overrides. Saved preferences apply to later launch preparation, not to already-running game/server processes.

These are implemented design choices rather than a claim of user-tested "great UX". Native tray interaction, modal keyboard/focus behaviour, real Minecraft/account joins and real router sharing still need live acceptance testing. The contribution remains AI-generated and source-reviewed by AI agents as disclosed in the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants