Skip to content

Decouple underlying libraries from EG UI#509

Merged
JDziurlaj merged 18 commits intoElection-Tech-Initiative:mainfrom
Enhanced-Voting:feature/decouple_UI
Feb 24, 2026
Merged

Decouple underlying libraries from EG UI#509
JDziurlaj merged 18 commits intoElection-Tech-Initiative:mainfrom
Enhanced-Voting:feature/decouple_UI

Conversation

@wilsoaa-ev
Copy link
Copy Markdown
Contributor

Issue

Unable to write a different UI application and still use some of the reusable components of EG.

Description

The construction of EG solution made it such that we could not write our own UI application and still use the underlying features/functionality of EG. These changes primarily refactor several areas of the code to allow for the UI layer to be separate and swapped out by another UI in a different implementation without breaking this UI in this solution.

Copy link
Copy Markdown
Contributor

@JDziurlaj JDziurlaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to build the ElectionGuard project on Windows, sans arm64 target.

There is one broken test, that appears to predate this PR. It is a failing test for Test_Save_TestDataOutput (part of ElectionGuard.Decryption.Tests.dll).

  Error Message:
   Newtonsoft.Json.JsonSerializationException : Error getting value from 'Pad' on 'ElectionGuard.HashedElGamalCiphertext'.
  ----> System.ArgumentNullException : SafeHandle cannot be null. (Parameter 'pHandle')`

The ElectionGuard.UI tests are commented out (prior to this PR) so it is hard to gauge how these changes affect its function.

We can update to .NET 9, but my preference is to only upgrade to .NET 8, which is the LTS version unless we need the features .NET 9 provides.

We will update the remaining .NET projects to the agreed upon .NET version post-merge.

There is a large number of whitespace-only changes in this PR. I am OK with using a linter/formatter, but it needs to be integrated into the build process (please point to where).

Comment thread scripts/build.cake
Comment thread src/electionguard-ui/ElectionGuard.UI/ElectionGuard.UI.csproj
Comment thread src/electionguard-ui/ElectionGuard.UI/ElectionGuard.UI.csproj
@steven-musick
Copy link
Copy Markdown
Contributor

I've gone ahead and updated the PR based on comments provided. Let me know if I missed anything.

The test you mentioned still fails, but as you said if it was previously failing, this isn't something I know enough about to really dig into without spending a good bit of time.

I did also include updates for stuff to .net 10 (current LTS). Build and test still seem to work, though I wouldn't be surprised if there was a failure elsewhere. Note that I did not update the versions of the libraries used because the old versions still seem to work and I thought that would explode the scope way too much, but that's probably a task for the near future.

@JDziurlaj JDziurlaj merged commit 18efe83 into Election-Tech-Initiative:main Feb 24, 2026
10 of 17 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.

5 participants