ERMAIN-411: Mac 'pin the add-in' hint for the unpinned/frozen task pane#784
Open
bdart wants to merge 4 commits into
Open
Conversation
… (#5575) Detect the silently-undefined item dead state (prior read item went falsy, stayed gone past a settle window) and show a dismissible Retry banner; leave the legitimate contextless state untouched. Also remove the registered handler (not a throwaway) in mailbox cleanup.
The real symptom is an unpinned pane on new Outlook Mac freezing on the first-opened mail (no ItemChanged), not the #5575 undefined-item case. Revert the dead-state detection/banner wiring; keep the removeHandlerAsync cleanup fix and park the banner for a future 'pin to follow' hint. Add SupportsMultiSelect so Mac auto-pins (office-js #5921) and tracks mail navigation.
Revert SupportsMultiSelect (Mac auto-pin only applies to a multi-select launch, not single-message nav). Add AddinPinHintBanner shown only on Outlook for Mac desktop (platform === 'Mac'), and hidden once the selected item actually changes to a *different* message — a real navigation, which only a pinned/tracking pane observes. The host's initial same-item bind event is ignored (otherwise the hint flashed and cleared the instant the first message loaded). Dismiss is persisted. No API to pin or detect pin state (office-js #1691/#4187), so nudging is the only fix.
…ractionRequiredAuthError ctor CI installs the add-in with --no-frozen-lockfile, so the ^5.2.0 range floated to msal-browser 5.15.0 / msal-common 16.10.0, which made AuthError's errorCode + a new correlationId required (2-8 args) — breaking the untouched entraAuthSource typecheck. Pin to the installed versions and pass the required correlationId (detection is instanceof, so the value is cosmetic). Unblocks CI lint.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On new Outlook for Mac (desktop), an unpinned add-in task pane stays open (Mac never auto-closes it) but is bound to the message it was opened from and never receives
ItemChanged— so the chat silently freezes on that first mail while the user keeps navigating. This adds a Mac-only, self-clearing "pin this add-in" hint that nudges the user to pin (the one thing that makes the pane track), plus a small handler-cleanup fix.Resolves ERMAIN-411.
Why a hint, and not an automatic fix
This was investigated heavily (see the ticket for the full trail). The short version, all confirmed against current office-js issues / MS docs:
SupportsMultiSelectdoes not help. Its Mac auto-pin applies only to the multi-select launch scenario, not single-message navigation (it was prototyped and reverted).isPinnedAPI (office-js #1691); Microsoft acknowledges the exact gap in #4187. On Mac the signals you'd infer it from are broken (getSelectedItemsAsync→ 5001,SelectedItemsChangedunreliable).So the realistic, vendor-consensus mitigation is to teach the user to pin, shown only where the problem exists.
What's in this PR
AddinPinHintBanner— dismissible, non-blocking banner ("Pin to follow your mail …"), inline SVGs, theme-warning styling.OutlookMailItemProvider.hasItemChangedFired— drives the self-clear. Set true only when the resolved item identity actually changes (a real navigation, which only a pinned/tracking pane observes). The host's initial same-item bind event is deliberately ignored — otherwise the hint flashed and cleared the instant the first message loaded.AddinChatwiring — banner shows only whenplatform === "Mac" && !hasItemChangedFired && !pinHintDismissed.platform === "Mac"is the desktop client only (OWA =OfficeOnline, Windows =PC/OfficeOnline), so every unaffected platform is excluded. Dismiss persists inlocalStorage.removeHandlerAsyncnow receives the registered handler instead of a throwaway() => {}(was a StrictMode leak).officeAddin.pinHint.*added and translated for de/es/fr/pl (en source filled).No manifest changes ship in this PR (the
SupportsMultiSelectprototype was fully reverted; net manifest diff is zero).Behavior
Testing
typecheck✅ ·lint:strict(max-warnings=0) ✅ ·prettier✅ ·i18n:extract:check✅hasItemChangedFired(only a different item does), banner render/dismiss, andremoveHandlerAsyncpassing the registered handler.Known limitations / follow-ups
internetMessageIdcan come back empty on re-read) could in theory clear it early; fallback would be "show on Mac until dismissed."