Skip to content

feat(settings): edit the OPC UA address in the settings window - #146

Merged
mrcsin merged 1 commit into
masterfrom
opc-settings
Oct 21, 2026
Merged

mrcsin merged 1 commit into
masterfrom
opc-settings

Conversation

@mrcsin

@mrcsin mrcsin commented Oct 21, 2026

Copy link
Copy Markdown
Member

Problem

The opc/ section added by #145 had no editor. A site moving the SCADA's OPC UA server had to edit
opc/opc.yaml by hand. The startup-failure window offered the settings dialog on an opc/ failure, but the
dialog could not edit opc/.

What changed

  • SettingsSave reads and saves a third section through OpcUaConnectionLoader. The sections travel as one
    ordered IReadOnlyList<SectionRead>.
  • The dialog gains an "OPC UA connection" block after the database block, with host (the IPv4 rule) and port
    (1-65535).
  • The existing rules hold: only keys that already exist are edited, each in the file that owns it, and only
    the keys the operator changed. A staged copy is validated before any file is replaced. A change takes effect
    at the next start.
  • The OPC fields have their own invalid messages, SettingsOpcHostInvalid and SettingsOpcPortInvalid,
    because the message line sits beside the buttons. SettingsKeyAbsent now names the section, because host
    and port exist in two sections.
  • StartupFailureViewModel offers the dialog only when all three sections read and carry every key the dialog
    edits.
  • Docs: AGENTS.md, overview.md, data-integration.md, ui-text.md, ui-theme.md (the measured message
    widths), charting.md, readme.md. backlog.md gets one entry: split SettingsViewModel, now 512 lines.

How it was verified

  • dotnet build SemiPlot.slnx: 0 errors, only the AppHost's two NU1902. dotnet format --verify-no-changes
    and dotnet terse exit 0.
  • SemiPlot.Tests.Unit: 2529/2529. SemiPlot.Tests.Integration: 205/205.
  • The opc-missing-directory failure-window case failed before the gate change and passes after it.
  • The dialog was measured headless with real Skia and HarfBuzz drawing. It is 640 x 575 px in both languages,
    and no message is trimmed. The tightest line is the English SettingsKeyAbsent with the OPC UA header:
    445.6 of 457 px.
  • Not run: the manual smoke steps and the docs/img/settings.png recapture. The automated suites stand in
    for them in this unattended roadmap run.

The opc/ section had no editor, so a site moving the SCADA's OPC UA
server had to edit opc/opc.yaml by hand, and the startup-failure
window offered a settings dialog that could not fix an opc/ failure.

The settings window gains an OPC UA block after the database block,
with host and port under the existing rules: only keys that already
exist, each in the file that owns it, only the keys the operator
changed, validated by OpcUaConnectionLoader on a staged copy, effective
at the next start. The OPC fields carry their own invalid messages,
because the message line sits beside the buttons. The startup-failure
window offers the dialog only when all three sections read and carry
every key it edits. The absent-key message now names its section,
because host and port exist in two.
@mrcsin
mrcsin marked this pull request as ready for review October 21, 2026 03:05
@mrcsin
mrcsin merged commit 1c67536 into master Oct 21, 2026
2 checks passed
@mrcsin
mrcsin deleted the opc-settings branch October 21, 2026 03:10
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