Skip to content

Add validation signature-aware edit locks in MotorEditor#75

Draft
Copilot wants to merge 5 commits into
mainfrom
copilot/add-validation-signature-support
Draft

Add validation signature-aware edit locks in MotorEditor#75
Copilot wants to merge 5 commits into
mainfrom
copilot/add-validation-signature-support

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 5, 2026

Motor files must respect validation signatures: motor properties, drive/voltage data, and curve series should become read-only when signed; unsigned sections remain editable.

  • Editability rules

    • Compute and cache signature validity via DataIntegrityService; expose CanEditMotorProperties, CanEditSelectedDriveAndVoltages, and CanEditSelectedSeries.
    • Block mutation paths (motor/drive/voltage/series edits, add/remove, lock toggles) when signatures are valid, with user feedback.
  • UI enforcement

    • Disable motor property inputs and units section when a valid motor signature exists.
    • Disable drive/voltage inputs and add/remove controls when the selected drive is signed.
    • Prevent curve series rename/lock/delete and percent/RPM lock toggles when a series is signature-locked; keep data grid aware of locked series.
  • Data grid safety

    • Track signature-locked series in CurveDataTableViewModel to honor read-only status across table interactions.
  • Samples for QA

    • Added samples/motor-with-signatures.json and samples/motor-without-signatures.json to exercise signed vs unsigned scenarios.

Example:

// Guard edits when motor is signed
if (!EnsureMotorEditingAllowed())
{
    return;
}

// UI binding
<TextBox Text="{Binding DriveNameEditor}"
         IsEnabled="{Binding CanEditSelectedDriveAndVoltages}" />
Original prompt

This section details on the original issue you should resolve

<issue_title>Add Validation Signature support to MotorEditor application</issue_title>
<issue_description>Add support for the new Validation Signatures to the MotorEditor application.

Requirements:

  • All motor files shall be checked for a validation sig upon opening.

  • Where valid validation sigs exist, that portion of the motor data shall not be editable within the MotorEditor application.

    • Per Curve
      • Affects curve series
    • Per Drive
      • Affects drive and voltage properties (not including curves)
    • Per Motor
      • Affects motor properties
  • Where valid validation sigs do not exist, those portions of the motor data shall be editable within the MotorEditor application.

  • We will add a UI to manage validation signatures in the future. This will allow the user to add and remove validation sigs for the motor file. Perform all work with this in mind.

</issue_description>

Comments on the Issue (you are @copilot in this section)

Custom agent used: C# Expert
An agent designed to assist with software development tasks for .NET projects.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Jan 5, 2026
Copilot AI and others added 3 commits January 5, 2026 05:40
Co-authored-by: jordanrobot <119146+jordanrobot@users.noreply.github.com>
Co-authored-by: jordanrobot <119146+jordanrobot@users.noreply.github.com>
Co-authored-by: jordanrobot <119146+jordanrobot@users.noreply.github.com>
Copilot AI changed the title [WIP] Add validation signature support to MotorEditor application Add validation signature-aware edit locks in MotorEditor Jan 5, 2026
Copilot AI requested a review from jordanrobot January 5, 2026 06:15
@jordanrobot
Copy link
Copy Markdown
Owner

@copilot
Id like to do some UI testing. Please create two sample files, one that has validation signatures and one that does not. I will use these two files to verify the new functionality.

Co-authored-by: jordanrobot <119146+jordanrobot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 5, 2026

@copilot
Id like to do some UI testing. Please create two sample files, one that has validation signatures and one that does not. I will use these two files to verify the new functionality.

Added sample files for your UI checks in samples/: motor-with-signatures.json (signed motor/drive/curve) and motor-without-signatures.json (unsigned). Commit 4b9c940.

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.

Add Validation Signature support to MotorEditor application

2 participants