Skip to content

fix: show the Compliance version the app reports without a case event - #1490

Merged
renemadsen merged 4 commits into
stablefrom
claude/5482-eform-backendconfiguration-plugin
Nov 5, 2026
Merged

renemadsen merged 4 commits into
stablefrom
claude/5482-eform-backendconfiguration-plugin

Conversation

@renemadsen

Copy link
Copy Markdown
Member

Problem

The Compliance column of the workers list (IndexDeviceUser) reads Units.eFormVersion. The SDK only wrote that column when a case was retrieved or completed, so after a worker updated the eForm app and synced, the list kept showing the old version and flagged it as needing an update.

Fix

Together with the flutter-eform change (the app now sends its installed version on every sync after an update), the new version shows on the workers list right after the worker pulls to refresh.

Regression test

PropertyWorkersAppVersionsTests.IndexDeviceUser_ShowsTheComplianceVersionMicrotingReports_WithoutACaseEvent: the unit is stored on 3.2.1 while the (fake) Microting server reports the latest Compliance version (HttpFake.ReportedUnits); the index must show the latest version and not flag it. Without the refresh the stored 3.2.1 is shown and flagged. The existing tests are unaffected: the SDK fake reports units as stored unless a test overrides them.

Testing

Built locally (dotnet build); the integration tests run in CI.

Kanban card #5482

🤖 Generated with Claude Code

The Compliance column of the workers list reads Units.eFormVersion, which
the SDK only wrote when a case was retrieved or completed. After a worker
updated the app and synced, the list kept showing the old version and
flagged it as needing an update.

IndexDeviceUser now calls Core.Advanced_UnitsRefreshFromRemote (new in
Microting.eForm 10.0.44) before reading the units, so the version Microting
has from the latest sync is shown. A failing refresh is logged and the list
is shown from the stored units as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 28, 2026 13:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The refresh can expose credentials, delay requests, overwrite newer snapshots, and risk incompatibility with the current host SDK, while repeated full refreshes add unnecessary load.

5 open issues
What changed in this PR

Updates the backend worker list to refresh Compliance app versions from Microting, so app updates can appear without waiting for a case event.

Changes:

  • Upgrades Microting.eForm to 10.0.44 for the remote unit-refresh API.
  • Refreshes units before reading worker app details, logging failures and falling back to stored data.
  • Adds a regression test for a remotely reported version newer than the stored version.
File Description
eFormAPI/​Plugins/​BackendConfiguration.Pn/​BackendConfiguration.Pn/​Services/​BackendConfigurationAssignmentWorkerService/​BackendConfigurationAssignmentWorkerService.cs Adds remote unit refresh before worker-list reads.
eFormAPI/​Plugins/​BackendConfiguration.Pn/​BackendConfiguration.Pn/​BackendConfiguration.Pn.csproj Updates the SDK dependency to 10.0.44.
eFormAPI/​Plugins/​BackendConfiguration.Pn/​BackendConfiguration.Pn.Integration.Test/​PropertyWorkersAppVersionsTests.cs Tests version freshness and update status without a case event.

Review effort: Balanced

@renemadsen
renemadsen changed the base branch from master to stable November 4, 2026 17:20
IndexDeviceUser fetched every unit from Microting on each request, including
searches, sorting and the worker pickers that share the endpoint, and an
outage at Microting could hold the list for as long as the SDK retries.

The refresh now runs only when the request sets RefreshAppVersions, which
the workers page does on its first list request after it loads. The list
waits at most 5 seconds; a slower refresh finishes in the background and
the stored versions are shown meanwhile. Concurrent page loads share one
refresh, and one still running after 20 minutes is replaced.

The regression test passes the flag; a new test checks that without it the
stored version is shown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 4, 2026 17:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Overlapping refresh tasks can overwrite newer device details with stale data, while concurrent table requests can display rows that no longer match the selected filters.

2 open issues
5 resolved since last review

Review effort: Balanced

Take the package versions from stable (Microting.eForm 10.0.47, which
provides Advanced_UnitsRefreshFromRemote).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 5, 2026 07:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The frontend request adds an unsupported property that breaks TypeScript compilation, while the refresh cutoff permits concurrent tasks to overwrite newer app versions with stale data.

3 open issues

Review effort: Balanced

…r ones

- The properties service takes the host DeviceUserRequestModel, which has
  no refreshAppVersions; widen its parameter so the client compiles, and
  drop the unused field from the plugin model copy.
- Cancel the previous table load before starting a new one, and send the
  refresh flag until one load has completed.
- Share a running units refresh until it completes instead of starting a
  second one after 20 minutes, so two refreshes never write units at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 5, 2026 07:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Regression coverage is missing for refresh timeouts, failure fallback, and shared in-flight requests, leaving the five-second stored-version fallback and single-refresh behavior unverified.

2 open issues
2 resolved since last review

Review effort: Balanced

@renemadsen
renemadsen merged commit 0d04446 into stable Nov 5, 2026
35 checks passed
@renemadsen
renemadsen deleted the claude/5482-eform-backendconfiguration-plugin branch November 5, 2026 07:48
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.

2 participants