The logic for this will go in packages/apollo-shared/src/Changes/AddAssemblyFromFileChange.ts in the executeOnClient method.
The challenge is that to add an assembly in the client, you need the IDs for the assemblies and ref seqs (see the section under the // fetch and initialize assemblies for each of our Apollo internet accounts comment in packages/jbrowse-plugin-apollo/src/session/session.ts). But executeOnClient runs before executeOnServer, so we don't know what the IDs (or even what the ref seqs) are yet.
Maybe the base Change class needs something that can run some code on the client when the change is done. It would be kind of like the notification idea, and would be called by the ChangeManager.
From meeting today, we need some sort of new websocket communication (maybe on a new channel?) that is able to tell the client to do things like look for new assemblies.
The logic for this will go in
packages/apollo-shared/src/Changes/AddAssemblyFromFileChange.ts
in theexecuteOnClient
method.The challenge is that to add an assembly in the client, you need the IDs for the assemblies and ref seqs (see the section under the
// fetch and initialize assemblies for each of our Apollo internet accounts
comment inpackages/jbrowse-plugin-apollo/src/session/session.ts
). ButexecuteOnClient
runs beforeexecuteOnServer
, so we don't know what the IDs (or even what the ref seqs) are yet.Maybe the base
Change
class needs something that can run some code on the client when the change is done. It would be kind of like thenotification
idea, and would be called by theChangeManager
.