-
Notifications
You must be signed in to change notification settings - Fork 0
%spin hint bar #8
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments. Haven't run this yet. May request additional review from a client dev.
useEffect(() => { | ||
console.log('spin: setting up...'); | ||
let available = false; | ||
const spin = new EventSource('/~_~/spin', { withCredentials: true }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth noting that, with this and the /~_~/slog
endpoint, and of course the eyre channel for herm subscriptions, this page now opens three SSE connections to your ship's domain, which iirc browsers limit to some max amount per domain (not per tab/window).
Of course, multi-tab urbiters are already hurting because of this, but this will hurt them even more.
Wonder if it's necessary, or if there even is some way we could demux/unify these connections somehow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just make it toggleable and off by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a way to run it, but code seems fine, besides what @Fang- commented on
This adds a %spin stack bar to webterm.