mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-21 01:18:43 +00:00
Both fields were in Preferences › Integrations and in prefs::HIDDEN_UNTIL_IMPLEMENTED: nothing read them, so the only way to open the control channel was --control (or PHOTOCRAFT_CONTROL_PORT). They now do what their doc comments describe. Control Port, when it is not 0, is the port this launch listens on; --control still wins over it. Allow Agent Control off refuses both, and when --control asked for a port it says so on stderr instead of dropping the flag silently — an ignored --control with no message is the shape #2449 was about. A port outside 1..=65535, which only a hand-edited file can hold, is refused and named the same way. integrations() reads the saved preferences before the window opens, the way custom_titlebar() already does for System Title Bar; a missing or unreadable file keeps the defaults. The defaults are unchanged (allow on, port 0), so a launch that touches neither preference behaves exactly as before. Checked against a release build, each case with its own PHOTOCRAFT_CONFIG_DIR: preferences --control listens on (none) - nothing controlPort 7878 - 7878 controlPort 7878 9000 9000 allowAgentControl false 9000 nothing, with the warning allowAgentControl false, port 7878 - nothing controlPort 70000 - nothing, with the warning Two tests cover the decision table and the file reading (absent, unparseable, valid). docs/scorecard.md regenerated: settings that do nothing, 30 -> 28.