Skip to content

Conversation

@ryanbonial
Copy link
Member

@ryanbonial ryanbonial commented Sep 4, 2025

Description

Implemented cross-iframe query forwarding between Dashboard and SDK apps using SharedWorker. This allows SDK apps running in iframes to execute queries through the parent Dashboard application, enabling centralized query execution and caching.

The implementation uses a combination of:

  • Comlink for iframe communication
  • SharedWorker for query execution and caching
  • Message passing protocol for query requests and responses

What to review

  • The communication flow between Dashboard and SDK app iframes
  • SharedWorker query execution and caching implementation
  • Query forwarding detection in the SDK app
  • Error handling and connection management
  • Performance implications of the query caching mechanism

Testing

Tested by:

  • Running the Dashboard and SDK app locally
  • Verifying query forwarding works when SDK app is loaded in an iframe
  • Checking that query results are properly cached in the SharedWorker
  • Confirming that the same queries reuse cached results

Fun gif

share

@ryanbonial ryanbonial requested a review from a team as a code owner September 4, 2025 19:51
@ryanbonial ryanbonial requested a review from binoy14 September 4, 2025 19:51
@vercel
Copy link

vercel bot commented Sep 4, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
sdk-docs Ready Ready Preview Comment Sep 4, 2025 8:15pm
sdk-kitchensink-react Ready Ready Preview Comment Sep 4, 2025 8:15pm

@ryanbonial ryanbonial changed the title (feat) implement actual shared worker (feat) implement real shared worker Sep 4, 2025
@ryanbonial ryanbonial changed the base branch from main to 08-14-feat_add_shared_worker_store_and_script September 4, 2025 19:53
@ryanbonial ryanbonial removed the request for review from binoy14 September 4, 2025 19:53
@ryanbonial ryanbonial changed the title (feat) implement real shared worker feat: implement real shared worker Sep 4, 2025
@ryanbonial ryanbonial marked this pull request as draft September 4, 2025 20:15
@ryanbonial ryanbonial changed the base branch from 08-14-feat_add_shared_worker_store_and_script to graphite-base/612 September 4, 2025 20:18
@ryanbonial ryanbonial changed the base branch from graphite-base/612 to 09-04-feat_add_query_deduplication_cache September 4, 2025 20:19
Copy link
Member Author

ryanbonial commented Sep 4, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ryanbonial ryanbonial merged commit bbfe6c5 into 09-04-feat_add_query_deduplication_cache Sep 4, 2025
11 of 20 checks passed
@ryanbonial ryanbonial deleted the 09-04-feat_implement_actual_shared_worker branch September 4, 2025 20:34
@ryanbonial ryanbonial restored the 09-04-feat_implement_actual_shared_worker branch September 4, 2025 20:36
@ryanbonial ryanbonial deleted the 09-04-feat_implement_actual_shared_worker branch September 4, 2025 21:12
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