Skip to content

Drop activations whose end has passed, even when a refresh cannot reach the tenant - #201

Merged
FrodeHus merged 3 commits into
mainfrom
fix/drop-lapsed-activations
Sep 24, 2026
Merged

FrodeHus merged 3 commits into
mainfrom
fix/drop-lapsed-activations

Conversation

@FrodeHus

@FrodeHus FrodeHus commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Problem

After a long sleep, a loopback (browser sign-in) account could not renew its sign-in silently. The background refresh never prompts, so it kept the tenant's last-known rows — including activations that had already ended. They stayed in Active now with no countdown and a Deactivate button that could only fail, until a manual Refresh signed in again.

The timer itself was fine: the unified log showed refreshes every minute after wake, all succeeding for the other tenants.

Fix

  • ActiveAssignment.hasLapsed(at:) (Core): active or scheduled rows whose end has passed; requests and failures never lapse.

  • AppModel.dropLapsedAssignments() runs on the 30 s clock tick and drops rows a minute past their end (the grace lets the "expired" notification, due 5 s after the end, fire before the reschedule withdraws it). Independent of whether the refresh can reach the tenant.

  • Tenant header: "Sign-in needed to refresh" now shows an orange warning triangle (was the grey info glyph shared with plain limitations); VoiceOver reads "Sign-in needed".

Tests

  • New LapsedAssignmentTests; Core suite 448 passing; app builds.
  • Not verified: the real overnight-sleep scenario (debug build running for that).

Not in this PR

  • Why the silent renewal fails for this account after a long sleep (Graph 401s during dark wakes; possibly a sign-in frequency policy).
  • No refresh on wake, although a comment in refreshAll says there is one.

…ch the tenant

A background refresh that cannot renew a sign-in silently keeps the tenant's
known rows. After a long sleep those rows outlived their activations and
stayed in Active now with a Deactivate button that could only fail. The
clock tick now drops active and scheduled rows a minute past their end.
The hint shared the grey info glyph with plain limitations, so a tenant whose
rows had gone stale looked fine.
@FrodeHus
FrodeHus enabled auto-merge (squash) September 24, 2026 05:00
@FrodeHus
FrodeHus merged commit 803917c into main Sep 24, 2026
13 checks passed
@FrodeHus
FrodeHus deleted the fix/drop-lapsed-activations branch September 24, 2026 05:02
FrodeHus added a commit that referenced this pull request Sep 24, 2026
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.
FrodeHus added a commit that referenced this pull request Sep 24, 2026
… 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".
FrodeHus added a commit that referenced this pull request Sep 24, 2026
* Core and CLI: drop activations whose end has passed

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.

* Windows: drop activations whose end has passed on the clock tick

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.

* Windows: show a tenant that needs a sign-in to refresh with a caution 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".

* Changelog: Windows sign-in hint

* Windows: use the macOS orange for the sign-in hint

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.

* Windows: state what the sign-in hint shows in high contrast

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.
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