Skip to content

Conversation

@Gaubee
Copy link
Contributor

@Gaubee Gaubee commented Feb 3, 2026

Summary

Allow miniapp iframes to request KeyApp context by sending keyapp:context-request message.

Changes

  • Add KeyAppContextRequestMessage type
  • Add getIframeByMessageSource function to find iframe by message source
  • Add handleKeyAppContextRequest handler for context-request messages
  • Add ensureKeyAppContextRequestListener singleton pattern for listener registration

How it works

Miniapp can send:

window.parent.postMessage({ type: 'keyapp:context-request' }, '*');

KeyApp will respond with context via sendKeyAppContext.

Allow miniapp iframes to request KeyApp context by sending
'keyapp:context-request' message. The listener finds the iframe
by message source or appId and sends context back.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Gaubee Gaubee merged commit fc2d7b5 into main Feb 3, 2026
5 checks passed
@Gaubee Gaubee deleted the feat/miniapp-context-request branch February 3, 2026 14:38
Gaubee added a commit that referenced this pull request Feb 3, 2026
## Changes
- feat(miniapp-runtime): add context-request message listener (#379)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Gaubee Gaubee mentioned this pull request Feb 3, 2026
Gaubee added a commit that referenced this pull request Feb 3, 2026
## Changes
- feat(miniapp-runtime): add context-request message listener (#379)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
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