-
Notifications
You must be signed in to change notification settings - Fork 112
Add WebMC & WS changes #431
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
Conversation
WalkthroughAdds a promoted server entry to config, extends promoteServers and StoreServerItem with an optional name, adds a server example in the connect UI, changes WebSocket URL construction to infer ws/wss from host prefix and append a client_mcraft query param, and surfaces favicon in WebSocket ping results. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant UI as AddServerOrConnect
participant List as ServersListProvider
participant WS as websocket-core
participant Server
User->>UI: Enter/select server
UI->>List: Request server list / connect
List->>List: Build promoted servers (include name)
Note right of List #cfe8ff: When pinging WS servers, include favicon as icon
List->>WS: Connect(host)
rect rgba(230,245,255,0.6)
WS->>WS: Determine protocol: 'ws' if host startsWith "ws://", else 'wss'
WS->>WS: Parse host URL, merge/search params, append client_mcraft
WS->>Server: Open WebSocket to constructed URL
end
Server-->>WS: Handshake / status
WS-->>List: Ping/connection result (text, icon)
List-->>UI: Update UI with name, status, icon
UI-->>User: Show connection/status
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
config.json
(1 hunks)src/appConfig.ts
(1 hunks)src/mineflayer/websocket-core.ts
(1 hunks)src/react/AddServerOrConnect.tsx
(1 hunks)src/react/ServersListProvider.tsx
(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/**/*.ts
📄 CodeRabbit inference engine (.cursor/rules/vars-usage.mdc)
src/**/*.ts
: You may use the global variablebot
directly in any file under thesrc/
directory (e.g.,src/mineflayer/playerState.ts
).
Insrc/
code, you may use the global variableappViewer
fromsrc/appViewer.ts
directly. Do not importappViewer
or usewindow.appViewer
; use the globalappViewer
variable as-is.
Files:
src/appConfig.ts
src/mineflayer/websocket-core.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build-and-deploy
/deploy |
Deployed to Vercel Preview: https://prismarine-59owwgk22-zaro.vercel.app |
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/mineflayer/websocket-core.ts
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/**/*.ts
📄 CodeRabbit inference engine (.cursor/rules/vars-usage.mdc)
src/**/*.ts
: You may use the global variablebot
directly in any file under thesrc/
directory (e.g.,src/mineflayer/playerState.ts
).
Insrc/
code, you may use the global variableappViewer
fromsrc/appViewer.ts
directly. Do not importappViewer
or usewindow.appViewer
; use the globalappViewer
variable as-is.
Files:
src/mineflayer/websocket-core.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build-and-deploy
Can you help fixing minting errors? After that I m merging |
done |
very well done PR 👏 thanks! |
Adds WebMC to the multiplayer server list, allows connecting to local servers for development, fixes icons on websocket servers, and allows servers to see if the client is mcraft or something else.
Summary by CodeRabbit
New Features
Chores