-
Notifications
You must be signed in to change notification settings - Fork 25
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
UI: Implement Procedures and Interface #481
Conversation
packages/cli/src/ui/server.ts
Outdated
|
||
portal.enableLog('*ultralight*, *LightClient*, -OFFER, -ACCEPT, *ultralight:RPC*') | ||
|
||
await portal.start() |
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.
Just to make sure I understand what this is doing, this is just starting an Ultralight client and relaying the messages over WSS to the UI, right?
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.
Yes -- this part starts an Ultralight client inside of the server, where we can hook directly into the typescript, and utilize event listeners.
This is unique to the "HTTP" client mode, which communicates with a CLI node running independently
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.
Ultimately i should probably decouple this, so that running the internal Ultralight instance is optional, or an entirely different script.
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.
This looks great as far as it goes. Should we consider moving the tRPC server instance over to the UI package so we have a clean separation of concerns between the cli
true NodeJS client and then the one specifically designed to be paired with the UI?
👍 |
I moved all of the UI related stuff into the UI package, and everything works fine. This is in a good place to merge now. Some small code additions into the portalnetwork client code as described above, but everything else is contained to the UI package. |
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.
Taking it on faith.
PortalNetwork Browser UI
**quickstart guide in
packages/ui/README.md
**PR Changes:
**ALL tRPC CODE MOVED TO
packages/ui/src/server
**packages/portalnetwork/client/
sentTalkReq
andsentTalkResp
logEvents
option toPortalNetwork
constructor / create functionlogEvents
option set to true will enable logs to the UI subscriptions (websockets)