GMOD / Apollo3

JBrowse 2 plugin for editing annotations on an Apollo server
Apache License 2.0
6 stars 4 forks source link

Make assembly available after adding without refreshing the page #245

Open garrettjstevens opened 12 months ago

garrettjstevens commented 12 months ago

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.

garrettjstevens commented 12 months ago

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.