Repository navigation
fix: Spoolman usage without Spoolman, one network grant per printer, proxy addresses, 2.5 colour sync - #50
Merged
Merged
Conversation
… reporting off (#47)
…afe project sync (#48) - camera and remote screen use one fixed URL each (no ?t= cache-buster): a runtime approval only covers the exact URL, so every frame prompted again - request_permissions(network_http=[scheme://host]) at load for the printers and Spoolman in the settings or used before (remembered, never presets) - printer address keeps scheme, port and path prefix; :7125 fallback only for plain http roots; websocket over TLS for https, under the prefix - sync_project: OrcaSlicer 2.5 refuses filament_colour in a filament preset edit; apply the preset without it instead of failing every slot
Merged
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.
Fixes #47
Fixes #48
Spoolman usage without Spoolman (#47)
Root cause:
remember_jobqueued a usage job whenever reporting was on, even with no Spoolman URL. Booking then failed inSpoolman.connect()("not configured"),_bookput the job back for a retry every 60 s and notified each time, and the job was saved inusage_ledger.json, so it came back after every restart. Turning reporting off later didn't touch jobs already queued.set_target(page open, settings saved) drops waiting and retrying jobs when reporting is off or the URL is empty, silently.report: falseare dropped silently, so users who are already stuck are fixed by the update._bookreturns quietly for a job without a URL, so a "not configured" failure never notifies.Permission prompt per camera frame (#48)
Root cause: the camera and remote-screen requests added
?t=<ms>. OrcaSlicer 2.5 stores a runtime approval for the exact URL it saw, so each frame was a new target and a new prompt. The plugin never declared a network target at load.Cache-Control: no-cache.register_capabilitiespassesnetwork_http=[scheme://host]for the printer and Spoolman set in the settings, plus the origins U1 Control used before. Those are remembered in the settings store when a printer is selected or the printer agent connects. In 2.5.1 a canonicalscheme://hostgrant covers every port and path on that host, raw sockets included. Presets are not read at load because that crashed 2.5.1. If OrcaSlicer doesn't acceptnetwork_http, the plugin falls back to the old call.Printer behind a reverse proxy
Root cause:
normalize_hostdropped the path. Every non-root address also got anhttps://host:7125fallback.ws_callrefused https ("websocket calls need plain http") and always requested/websocketat the root.http(s)://host[:port][/prefix]and bare hostnames/IPs are accepted. The scheme is lowercased, the prefix is kept, and query and fragment are dropped.:7125fallback only applies to a plain http address with no port and no path.<prefix>/websocket, with a proper Host header.base_urlkeeps an https scheme and the path prefix.can't reach the U1 at <base> (<reason>),can't read printer address '<x>').Project filament colours on OrcaSlicer 2.5
Root cause:
sync_projectstagedfilament_colouron the filament preset transaction. In 2.5.0 and 2.5.1,Tab::apply_preset_config_valuesonly accepts filament preset keys, andfilament_colouris a project setting (s_Preset_filament_optionslistsdefault_filament_colouronly). So every commit failed. Neither 2.5.x nor upstream main has a plugin call to set a project slot's colour.default_filament_colourwould edit the shared preset, which is wrong per slot.filament_colour, it applies the preset without it, skips the colour for the remaining slots and logs that once. A colour problem never fails the sync.Tests
tests/test_corrections.py: no URL queues nothing, reporting off / URL cleared drops jobs silently, a job with no URL never notifies, the ledger cleans up on load.tests/test_address_forms.py(new): address forms, the fallback rules, the prefix kept for requests and uploads, wss with the prefix,permission_origin.tests/test_features.py: the camera asks one fixed URL.tests/test_agent.py: the load-timenetwork_httpgrant comes from the remembered origins;base_urlwith a proxy.tests/test_u1control.py: the presets are applied when OrcaSlicer refuses the colour.All of these fail on
mainand pass here. Full suite locally: 460 tests OK.