Skip to content

Windows: drop activations whose end has passed - #204

Merged
FrodeHus merged 8 commits into
mainfrom
fix/lapsed-activations-windows
Sep 24, 2026
Merged

FrodeHus merged 8 commits into
mainfrom
fix/lapsed-activations-windows

Conversation

@FrodeHus

@FrodeHus FrodeHus commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Closes #202 (Windows app part; Core and CLI are #203).

Stacked on #203 — it needs ActiveAssignment.HasLapsed from there. Merge #203 first; GitHub then retargets this PR to main.

Change

AppModel.DropLapsedAssignmentsAsync(now) in Elevate.App.Model, called from the 30 s clock tick: drops active and scheduled rows a minute past their end (grace so the "expired" toast, due 5 s after the end, is not withdrawn by the reschedule), stops their propagation watches and reschedules the toasts. Same behaviour as the macOS fix in #201.

Tests

  • New AppModelLapsedAssignmentTests (drops lapsed rows and keeps live and pending ones; keeps a row inside the one-minute grace).
  • Windows app tests 182 passing, run on macOS with -p:EnableWindowsTargeting=true.
  • Not verified on Windows: the WinUI app itself was not built or run. No view code changed.

Sign-in hint (tenant header)

Port of the macOS change in #201. PanelGroup.AwaitingSignIn turns the issues glyph into the warning triangle in a new app theme brush, ElevateWarningBrush: the macOS system orange (#FF9500 light, #FF9F0A dark), so the warning looks the same on both platforms; Fluent's caution colour would turn yellow in dark mode. Errors stay red, plain limitations stay the grey info glyph. Screen reader label "Sign-in needed".

Verified on the Windows 11 ARM64 VM: solution and arm64 app build, Core 565 and App 182 tests pass, and a throwaway build forcing the state showed the orange triangle on the account header in both light and dark theme.

High contrast: the glyph renders in the window text colour whatever brush is set (a throwaway build with a literal magenta also showed white), so in high contrast errors, the sign-in hint and limitations differ by glyph shape only, as the platform intends. The theme dictionary's HighContrast entry names the window text colour so the code matches what shows and the lookup always resolves.

Port of the macOS fix in #201. ActiveAssignment.HasLapsed in the C# Core;
ElevateSession.DropLapsedAssignments, called by 'elevate watch' before every
redraw, so a failed re-read no longer leaves ended activations in the table.
Port of the macOS fix in #201, using ActiveAssignment.HasLapsed from #203. A
refresh that cannot read a tenant keeps its known rows; the 30 s clock tick
now drops rows a minute past their end, stops their propagation watches and
reschedules the toasts.
Base automatically changed from fix/lapsed-activations-core-cli to main September 24, 2026 05:10
… warning

Port of the macOS change in #201. The hint shared the grey info glyph with
plain limitations, so a tenant whose rows had gone stale looked fine; it now
shows the warning triangle in the caution colour, and the screen reader says
"Sign-in needed".
Fluent's caution colour turns yellow in dark mode; an app theme brush with the
macOS system orange keeps the warning the same on both platforms.
On the VM the header glyph renders in the window text colour in high contrast
whatever brush is set (a literal magenta did not show), so the entry now names
that colour instead of the highlight colour it never displayed.
@FrodeHus
FrodeHus enabled auto-merge (squash) September 24, 2026 05:43
@FrodeHus
FrodeHus merged commit 14e0c95 into main Sep 24, 2026
13 checks passed
@FrodeHus
FrodeHus deleted the fix/lapsed-activations-windows branch September 24, 2026 05:46
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.

Parity: drop activations whose end has passed when a refresh cannot reach the tenant (Windows, CLI)

1 participant