feat: Hook up UI components to websocket for chat#2081
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
dankim214
commented
Feb 18, 2026
| queryKey: ['trollboxConnectedAddresses'], | ||
| queryFn: async (): Promise<number> => { | ||
| const response = await fetch(CONNECTED_ADDRESSES_URL); | ||
| if (!response.ok) throw new Error('Failed to fetch connected addresses'); |
Collaborator
Author
There was a problem hiding this comment.
react-query will by default return the last stale response on Error which is probably what we want here (rather than defaulting to 0 or something)
…tocol/v4-web into dkim/hook-up-web-socket-trollbox
Contributor
qardpeet
reviewed
Feb 19, 2026
| shape={ButtonShape.Square} | ||
| action={ButtonAction.Base} | ||
| state={{ isDisabled: isEmpty(inputValue.trim()) }} | ||
| state={{ isDisabled: isEmpty(inputValue.trim()) || isOverLimit }} |
Contributor
There was a problem hiding this comment.
we should either keep this or the toast, if we disable the button the max char limit toast never shows
Collaborator
There was a problem hiding this comment.
possibly have validation + disabled state instead of waiting for handleSend?
Collaborator
Author
There was a problem hiding this comment.
hmmm i think having both is still good imo
- the toast is to give an obvious response in the event the user hits enter to submit the message since they might not be looking at the send button
- the disabled button is to be able to quickly tell whether the message is still a valid size per keystroke (without having to try to hit enter to check)
Contributor
There was a problem hiding this comment.
cool, I assumed the enter key wasn't working as well when the btn was disabled
jaredvu
reviewed
Feb 19, 2026
jaredvu
reviewed
Feb 19, 2026
jaredvu
reviewed
Feb 19, 2026
qardpeet
approved these changes
Feb 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Screen.Recording.2026-02-18.at.4.55.58.PM.mov