Skip to content

fix(presets): review fixes for preset links and Send to Spoolman - #63

Merged
bloodf merged 2 commits into
mainfrom
fix/preset-link-review
Nov 17, 2026
Merged

bloodf merged 2 commits into
mainfrom
fix/preset-link-review

Conversation

@bloodf

@bloodf bloodf commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Review fixes for #62 (preset links and Send to Spoolman).

Changes

  • Edit Spool, change or clear a link: the page sends the link's previous value as was.*.preset_link, but the plugin read it under orca_filament_preset. Every change therefore looked as if Spoolman had changed meanwhile and was kept. The plugin now reads the key the page sends.

  • Send on your own linked preset: the "Spoolman changed meanwhile" check compared the saved value with Spoolman's. That only means something for a Spooler preset, whose saved values come from Spoolman. For a linked preset the check is skipped. A clash found by the merge just before writing gets a note that fits a preset Spooler doesn't rebuild ("it changed there while you were editing"). The old note ("the preset now has it") was wrong for these presets.

  • Spool detail preselection: the preset open in OrcaSlicer's filament settings comes first, then the selected printer's. The snapshot now records the edited preset's name, read on the UI thread.

  • A spool's own link is not sent: Spoolman keeps settings on the filament, which every spool of it shares, so sending would change the other spools' presets. Send now refuses with a short reason in all six languages. A filament-level link still sends.

  • A link is used only where it fits: on the selected printer, OrcaSlicer's is_compatible; on another, the preset's compatible printers (none listed and no condition means every printer). Both are read with the snapshot on the UI thread. On any other printer, and for a name that isn't one of your presets, the spool keeps Spooler's preset, and Sync makes it there. This fixes a "@voron" link being loaded into U1 slots.

  • _local/... names are rejected as links: linking one would stop Sync from making that preset.

  • Unlinked "nothing to send": on a Spooler preset it now says "{name} has no unsaved changes to send." The "match Spoolman" wording is kept for linked presets, where it is actually checked.

  • parent_configs: it read the edited copy when the parent was the selected filament (the same find_preset() behaviour). It now reads the saved preset.

Test plan

  • ruff check; Python suite 724 tests OK.
  • New tests: change and clear an existing link (spool and filament), a link changed in Spoolman meanwhile is kept, a linked preset's saved value is not a conflict, the clash note for a linked preset, preselection order, spool-own link refused, filament link sends. Also: where a link fits (selected printer, other printer, condition, no restriction, unknown name), the Never updates Filament Profile #38 two-printer case keeping Spooler's preset on the other printer, _local/ names rejected, the unlinked nothing-to-send text, the linked nothing-to-send text, and parent_configs reading the saved parent.
  • CI

- Edit Spool: read the link's previous value under the key the page
  sends (preset_link), so changing or clearing a link no longer always
  reports a conflict.
- Send on your own linked preset: its saved values are yours, not a sign
  that Spoolman changed, so skip that check; clashes found at write time
  get a note that fits a preset Spooler doesn't rebuild.
- Spool detail: the preset open in the filament settings leads, else the
  selected printer's.
- A spool's own link is not sent: Spoolman keeps settings on the filament
  every spool of it shares.
- A link is used on a printer only when the preset fits it: OrcaSlicer's
  is_compatible for the selected printer, its compatible printers for
  another. Elsewhere, and for a name that isn't one of your presets, the
  spool keeps Spooler's preset (Sync makes it there).
- Names of a plugin's presets (_local/...) can't be linked.
- Send on a Spooler preset with no unsaved edits just says so.
- parent_configs reads the selected parent's saved settings, not the
  edited copy find_preset() returns for it.
@bloodf
bloodf merged commit 5e1fa66 into main Nov 17, 2026
6 checks passed
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.

1 participant