stjude / proteinpaint

Data visualization and analysis framework focused on phenotype-molecular data integration at cohort level.
https://proteinpaint.stjude.org/
Other
14 stars 3 forks source link

Notify browser of dev events, including live-reload #1827

Closed siosonel closed 2 weeks ago

siosonel commented 2 weeks ago

Description

... to help minimize confusion of when bundling has completed or not.

TODO: also trigger tsc type check and GDC API IP address notifications.

To test:

  1. Open any pp url, a green notification should pop up. Screenshot 2024-07-10 at 1 23 06 PM

  2. Then select a client-side code to edit with a syntax error, like a randomly placed if keyword, then save. The browser should show a red notification.

Screenshot 2024-07-10 at 1 24 53 PM

  1. Undo the syntax error, and the green notification should show up again and automatically trigger a browser refresh/reload.

Checklist

Check each task that has been performed or verified to be not applicable.

creilly8 commented 2 weeks ago

This is what I'm seeing loading any track from url.html

https://github.com/stjude/proteinpaint/assets/20135430/00d1e4ed-01c4-4ecb-92b8-604718e30f70

It's the same output in the server console over and over again:

/sse    2024-07-10T18:44:53.595Z    127.0.0.1   {}
46 [{"key":"client","message":"success, esbuild ok","status":"ok","color":"green","duration":2500,"reload":true}]
Client closed.
/sse    2024-07-10T18:44:53.652Z    127.0.0.1   {}
46 [{"key":"client","message":"success, esbuild ok","status":"ok","color":"green","duration":2500,"reload":true}]
Client closed.
/sse    2024-07-10T18:44:53.692Z    127.0.0.1   {}
46 [{"key":"client","message":"success, esbuild ok","status":"ok","color":"green","duration":2500,"reload":true}]
Client closed.
/sse    2024-07-10T18:44:53.780Z    127.0.0.1   {}
46 [{"key":"client","message":"success, esbuild ok","status":"ok","color":"green","duration":2500,"reload":true}]
Client closed.
siosonel commented 2 weeks ago

@creilly8 and @congyu-lu could you pull the new commit and try again? @creilly8, if it doesn't work, please share the URL that you used to test.

xzhou82 commented 2 weeks ago

wow this is great. thanks!