Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support passing data to AA Copilot via postMessage #7104

Closed
twschiller opened this issue Dec 12, 2023 · 0 comments · Fixed by #7109
Closed

Support passing data to AA Copilot via postMessage #7104

twschiller opened this issue Dec 12, 2023 · 0 comments · Fixed by #7109
Assignees
Labels
customer Required for a customer projct enhancement New feature or request enterprise
Milestone

Comments

@twschiller
Copy link
Contributor

twschiller commented Dec 12, 2023

Considerations

  • AA Copilot frame only messages its direct parent
    • Our IFrame brick can embed directly, or introduce a layer of indirection to workaround host-page CSP constraints
  • IFrame must have "name" field for AA Copilot to message
  • Need to use querySelector to get the frame, can't use name
  • There appears to be a 30-40ms window in which the host page must respond to the data request message. So the information needs to be available in the parent frame to immediately respond

Implementation Sketch

  • Add name field affordance to IFrame brick
  • Create a "Set AA Copilot Process Data" brick:
    • Given a process id, sets the data for the process
    • Messages our sidebar.html and frame.html tiny page to set the data
  • Add logic to sidebar.html and frame.html to listen for the AA Copilot message and respond with the host data if set
@twschiller twschiller self-assigned this Dec 12, 2023
@twschiller twschiller added this to the 1.8.5 milestone Dec 12, 2023
@twschiller twschiller added customer Required for a customer projct enhancement New feature or request enterprise labels Dec 12, 2023
grahamlangford pushed a commit that referenced this issue Dec 13, 2023
…7109)

* [WIP] AA co-pilot data

* Pass all data to the frame parent

* Fix messenging to frame

* Force running in top level frame

* Get data from top-level content script on frame load

* Improve filename

* Fix promise callsites

* Fix acronym

* Make ID and acryonym

* Add link to dicussion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer Required for a customer projct enhancement New feature or request enterprise
Development

Successfully merging a pull request may close this issue.

1 participant