Skip to content

Fix: subEntityId not passed to app when deeplink clicked from within target channel - #3084

Draft
Prasad-MSFT with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-deeplink-subentityid-issue
Draft

Fix: subEntityId not passed to app when deeplink clicked from within target channel#3084
Prasad-MSFT with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-deeplink-subentityid-issue

Conversation

Copilot AI commented Jul 10, 2026

Copy link
Copy Markdown

On Teams desktop/web, clicking a deeplink (with subEntityId in context) from within the same channel where the tab is already open causes the host to send a load message to the running tab rather than doing a full reload. The SDK's LoadContext interface lacked a subEntityId field, so the value was silently dropped — leaving context.page.subPageId undefined. Mobile always does a full reload, so it was unaffected.

Main changes in the PR:

  1. ResumeContext — added subPageId?: string so apps using registerOnResumeHandler receive the sub-page navigation target
  2. LoadContext (deprecated) — added subEntityId?: string for parity; documented to point consumers toward ResumeContext.subPageId
  3. convertToResumeContext (handlers.ts) — maps loadContext.subEntityIdresumeContext.subPageId

Before / after (app using registerOnResumeHandler):

// Deeplink clicked from within the same channel — previously subPageId was undefined
app.lifecycle.registerOnResumeHandler((context: ResumeContext) => {
  console.log(context.subPageId); // Before: undefined  |  After: "some-value"
  app.notifySuccess();
});

Validation

Validation performed:

  1. Ran full test suite (9249 tests pass; only pre-existing umdExportParity failures due to missing build artifact)

Unit Tests added:

Yes — added tests in teamsAPIs.spec.ts and app.spec.ts covering:

  • registerOnLoadHandler receives subEntityId from the load message
  • registerOnResumeHandler receives subPageId mapped from subEntityId (framed and frameless)
  • subPageId is undefined when subEntityId is absent from the load context

End-to-end tests added:

No

Additional Requirements

Change file added:

No

Next/remaining steps:

  • The Teams desktop/web host must actually include subEntityId in the load message payload when resuming a tab via a deeplink. This SDK change is a necessary precondition, but the fix is only effective once the host sends the field.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

… deeplink navigation within same channel

When a deeplink with subEntityId is clicked from within the same channel on Teams
desktop/web, the host sends a 'load' message instead of doing a full reload.
The SDK's LoadContext didn't have subEntityId, so it was being ignored.

- Add `subEntityId` to `LoadContext` interface
- Add `subPageId` to `ResumeContext` interface
- Update `convertToResumeContext` to map `subEntityId` → `subPageId`
- Add tests for new fields in teamsAPIs.spec.ts and app.spec.ts

Closes #3083
Copilot AI changed the title [WIP] Fix subEntityId not passed in deep link from target channel Fix: subEntityId not passed to app when deeplink clicked from within target channel Jul 10, 2026
Copilot AI requested a review from Prasad-MSFT July 10, 2026 12:54
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.

Channel tab deeplink subEntityId not passed when clicked from within the target channel (desktop & web; works on mobile)

2 participants