Add remote config system (MCED-Remote) for server file management#7
Open
Add remote config system (MCED-Remote) for server file management#7
Conversation
Implements a two-component remote configuration editing system: **MCED-Remote (Java Server Agent)** - Standalone Java 17 JAR, platform-independent (no Fabric/Forge/Paper dependency) - Embedded HTTP server using Java's built-in com.sun.net.httpserver - REST API: GET/PUT/DELETE /api/v1/file, GET /api/v1/files, /status, /info - API key authentication via X-API-Key header - Path traversal protection via canonical path checking - File extension whitelist (.toml, .json, .json5, .yml, .yaml, .cfg, .properties) - Auto-generates mced-remote.properties with a UUID API key on first run - Maven build: mvn package → mced-remote.jar **MCED Client Integration** - RemoteConfigService.ts: Node.js fetch-based HTTP client with timeout/error handling - IPC handlers in index.ts: remote:connect, listFiles, readFile, writeFile, deleteFile, etc. - API keys stored encrypted via electron.safeStorage (fallback: plaintext) - Preload bridge extended with all remote: API methods - Shared TypeScript types in remote.types.ts https://claude.ai/code/session_01JK8L3K1rDjTudkw7Et6XTm
…tegration Completes the MCED-Remote client-side UI layer: **New Components** - RemoteConnectDialog: Add/edit connections with name, host, port, API key fields; includes test-before-save and auto-connect on save - RemoteConnectionManager: Panel listing saved connections with connect/ disconnect/edit/delete actions, active connection status dot, server info - RemoteFileBrowser: Two-pane layout with collapsible directory tree on the left and a plain-text editor on the right; Ctrl+S to save, delete with confirmation dialog **State Management** - remoteConnectionStore: Zustand store tracking UI connection state (idle/connecting/connected/error), active connection ID, cached server info, and the saved-connection list from the main process **App Integration** - Added "remote" view mode to useAppStore (alongside "mods" and "kubejs") - MainPanel: renders the two-pane remote layout when viewMode === "remote" - Header: Server button toggles remote mode; shows green dot when connected https://claude.ai/code/session_01JK8L3K1rDjTudkw7Et6XTm
**Monaco Editor in RemoteFileBrowser** - Replace plain textarea with @monaco-editor/react Editor component - Language detection: JSON → json, TOML/cfg/properties → ini, YAML → yaml - Theme follows app settings (dark/light) - Ctrl+S bound via editor.addCommand for native feel - Footer shows language, file size, and save hint **30s Heartbeat Polling** - remoteConnectionStore polls remoteGetInfo every 30 seconds - On failure: sets connectionStatus to "error" with a "Connection lost" message - Poll stops automatically on disconnect or connection error - Uses module-level interval ref (startPolling/stopPolling) to avoid closure issues **Standalone Remote Mode (no local instance required)** - MainPanel: remote check moved before the `!currentInstance` early return - App.tsx: renders full app shell (Header + MainPanel) when viewMode === "remote" even without a local instance loaded - Landing page: "Remote Config" button added below "Open Instance" to enter remote mode directly from the start screen https://claude.ai/code/session_01JK8L3K1rDjTudkw7Et6XTm
Adds automated build, release, and platform upload for the mced-remote.jar:
**mced-remote/pom.xml**
- Added maven-assembly-plugin to produce a versioned release JAR
(mced-remote-{version}.jar) alongside the plain mced-remote.jar
- Added Implementation-Version/Title to JAR manifest
- Added explicit maven-compiler-plugin (Java 17)
- Two output artifacts: mced-remote.jar (server deploy) + mced-remote-{version}.jar (releases)
**New: .github/workflows/build-mced-remote.yml**
- Triggers on: branch pushes that touch mced-remote/**, version tags (v*), manual dispatch
- Job 1 (build): resolves version from tag/input/pom.xml, sets it via versions:set,
builds with Maven, stores both JARs as workflow artifacts (30-day retention)
- Job 2 (github-release): publishes to GitHub Releases with setup instructions in body
- Job 3 (modrinth): uploads via Modrinth v2 API when MODRINTH_PROJECT_ID var is set
- Job 4 (curseforge): uploads via CurseForge API when CURSEFORGE_PROJECT_ID var is set
- Modrinth/CurseForge jobs are opt-in via repository variables (no secrets = skipped)
**Updated: .github/workflows/release.yml**
- New job (build-java): builds MCED-Remote JAR before the Electron release matrix
- New job (attach-jar): uploads both JARs to the same GitHub Release as the Electron apps
- JAR build only runs once (ubuntu-latest), keeping the Electron matrix unchanged
**package.json**
- build:java — runs mvn package for the Java agent
- build:all — runs build + build:java together
### Required GitHub secrets/variables for platform uploads
| Name | Type | Purpose |
|------|------|---------|
| MODRINTH_TOKEN | Secret | Modrinth API token |
| MODRINTH_PROJECT_ID | Variable | Modrinth project slug/ID |
| CURSEFORGE_TOKEN | Secret | CurseForge API token |
| CURSEFORGE_PROJECT_ID | Variable | CurseForge project numeric ID |
https://claude.ai/code/session_01JK8L3K1rDjTudkw7Et6XTm
- Add `permissions: contents: read` to build, modrinth, and curseforge jobs in build-mced-remote.yml (principle of least privilege) - Remove unused `connectionStatus` destructure in MainPanel.tsx https://claude.ai/code/session_01JK8L3K1rDjTudkw7Et6XTm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a complete remote configuration management system that allows users to connect to and edit Minecraft server configuration files from the MCED desktop application. It includes a standalone Java HTTP agent (mced-remote) that runs on the server, and corresponding UI/API integration in the Electron app.
Key Changes
Remote Agent (Java - mced-remote/)
/api/v1/statusendpoint returning server info and version/api/v1/infoendpoint with server detection (Fabric, Forge, Paper, etc.)/api/v1/filesendpoint for listing files with optional recursion/api/v1/fileendpoint for reading, writing, and deleting individual filesDesktop App (TypeScript/React)
Integration
Notable Implementation Details
https://claude.ai/code/session_01JK8L3K1rDjTudkw7Et6XTm