Skip to content

Integrate Flutter CLI connection gateway - #985

Open
LuckZAE wants to merge 45 commits into
mainfrom
feature_dartCli
Open

LuckZAE wants to merge 45 commits into
mainfrom
feature_dartCli

Conversation

@LuckZAE

@LuckZAE LuckZAE commented Oct 10, 2026

Copy link
Copy Markdown

Description

  • Adds the connection-gateway runtime, process management, HTTP/WebSocket transport, JSON-RPC protocol, account adapter, and device adapter used by the Flutter CLI integration.
  • Routes device, account, and pre-print workflows through Snapmaker Connect while removing the obsolete direct SSWCP/login/dialog paths.
  • Adds platform packaging, bundle staging, installer cleanup, and gateway regression coverage.
  • Hardens service lifecycle, JSON-RPC parsing, error conversion, device URL encoding, and empty filament-slot rendering.

Screenshots/Recordings/Graphs

Not applicable; this is primarily a runtime/integration change without a new user-facing screen.

Tests

  • cmake --build build --target gateway_tests --config Release
  • ctest --test-dir build -C Release -R "^gateway:" --output-on-failure
  • Result: 49/49 gateway tests passed.
  • Windows installer generation was completed locally. Manual install, gateway launch, and uninstall validation is still pending in an interactive Windows session.

@LuckZAE
LuckZAE force-pushed the feature_dartCli branch 3 times, most recently from b63f7ef to 12ea688 Compare October 12, 2026 11:56
LuckZAE and others added 27 commits October 13, 2026 01:46
- New Utils/GatewayDevice: device-facing queries per the snapmaker_connection API contract (WS machine.system_info), no SSWCP/PrintHost dependency; home for future interface migrations
- GatewayService: add request_sync() synchronous JSON-RPC whose callback completes on the websocket thread, safe from any thread including the UI thread
- GUI_App: m_gateway_service now shared_ptr, gateway_service() accessor
- Plater: nozzle-sync and filament-sync entry points query machine info via the gateway and accept a gateway-connected device in their guards
- SSWCP untouched: the legacy connect flow keeps SSWCP::query_machine_info
Consume gateway machine snapshots for active-device state, filament and nozzle info, including building snapshots from device print-task config objects, with protocol/service/snapshot tests.

Remove the legacy device paths this replaces: AppConfig DeviceInfo storage, the MQTT-agent, machine-manage and cache WCP bridges, the WebSocket debug server, Bonjour machine find, and the runtime Flutter web resource updater/import flow.
- Resolve the CLI executable name per platform and architecture
- Report the configured executable name in process manager errors
- Ignore locally placed CLI binaries under resources/
The token-keepalive core of 0ffba32 (#809) was already replaced by the gateway account subscription; this drops its two now-unused zh_CN strings and the login-confirmation dark-mode color mapping. The unrelated flutter-web URL refactor and websocket cleanup from that commit stay.
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