Conversation
This library will now get the initial URL/Token information from Serial Join 1 via the CIP Websocket when the URL contains a query parameter, `zoomRoom`, set to true. This allows a Mobile Control application using this library to be used in the Crestron App for Zoom Rooms on a Zoom Room Controller.
There was a problem hiding this comment.
Pull request overview
This PR extends the core library with Zoom Room Controller (ZRC) / WebXPanel support and Trilist (CrComLib join) integration, while improving connection diagnostics and startup error reporting surfaced through Redux/UI.
Changes:
- Added a
webXPanelservice + Redux slice/selectors/hooks to initialize and monitor WebXPanel/ZRC connection status and errors. - Enhanced startup/connect flow with
ConnectionStageand more descriptive HTTP/network error messages. - Added an auto-applied Trilist Redux plugin to subscribe to control system joins (online/IP/mcAppUrl/reload), plus updated docs and dependencies.
Reviewed changes
Copilot reviewed 24 out of 27 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Removes typeRoots config and keeps baseUrl setting. |
| src/lib/types/classes/app-config.ts | Formatting updates and type literal normalization for config-related types. |
| src/lib/store/webXPanel/webXPanel.slice.ts | New WebXPanel Redux slice for connection state and last error. |
| src/lib/store/webXPanel/webXPanel.selectors.ts | New selectors for WebXPanel slice state. |
| src/lib/store/webXPanel/webXPanel.hooks.ts | New hooks wrapping WebXPanel selectors. |
| src/lib/store/ui/ui.slice.ts | Adds ConnectionStage and stores current stage in UI slice. |
| src/lib/store/ui/ui.selectors.ts | Adds selector for connectionStage. |
| src/lib/store/ui/ui.hooks.ts | Adds hook for connectionStage. |
| src/lib/store/touchPanel/touchPanel.slice.ts | New touch panel slice for online state and join-derived URL/IP values. |
| src/lib/store/touchPanel/touchPanel.selectors.ts | New selectors for touch panel slice state. |
| src/lib/store/store.ts | Wires new reducers and auto-applies Redux plugins on store creation. |
| src/lib/store/plugins/trilist.ts | New Trilist plugin subscribing to CrComLib joins and reload pulse logic. |
| src/lib/store/plugins/index.ts | Adds applyReduxPlugins() wrapper to attach plugins to a store. |
| src/lib/store/middleware/websocketMiddleware.ts | Adds Zoom Room token sourcing from join 1 + improved staged error reporting and reconnection behavior. |
| src/lib/store/index.ts | Re-exports new selectors/hooks/actions/types and plugin entrypoint. |
| src/lib/store/appConfig/appConfig.slice.ts | Formatting/cleanup and minor typing alignment. |
| src/lib/shared/MobileControlProvider/MobileControlProvider.tsx | Initializes WebXPanel at module-load and normalizes imports/formatting. |
| src/lib/shared/disconnectedMessage/DisconnectedMessage.tsx | Shows connection stage + elapsed time and WebXPanel diagnostics on the connecting/disconnected screen. |
| src/lib/services/webXPanel/zoom.ts | New Zoom postMessage handshake to retrieve the WebXPanel websocket token. |
| src/lib/services/webXPanel/webXPanel.ts | New WebXPanel initializer reading query params, doing Zoom handshake, and mirroring status into Redux. |
| src/lib/services/webXPanel/index.ts | Barrel export for the WebXPanel service. |
| src/lib/services/useInitialize.ts | Improves request error messages and starts surfacing them into Redux UI state. |
| src/lib/services/index.ts | Exports the new WebXPanel service. |
| src/lib/global.d.ts | Adds window.CrComLib / window.WebXPanel typing. |
| README.md | Adds “Using this Library in an Existing Application” integration guidance incl. ZRC/WebXPanel note. |
| package.json | Adds WebXPanel/CrComLib deps and updates build tool versions. |
Comments suppressed due to low confidence (2)
src/lib/store/webXPanel/webXPanel.slice.ts:55
- Avoid
console.logside effects inside Redux reducers; reducers should be pure and this will execute on every dispatch. Prefer logging where the events originate (e.g., the WebXPanel service) or behind a debug flag.
setWebXPanelBuildDate: (
state: IWebXPanel,
action: PayloadAction<string>
) => {
state.buildDate = action.payload;
src/lib/store/webXPanel/webXPanel.slice.ts:69
- Avoid
console.logside effects inside Redux reducers; reducers should be pure and this will execute on every dispatch. Prefer logging where the events originate (e.g., the WebXPanel service) or behind a debug flag.
setWebXPanelWsConnected: (
state: IWebXPanel,
action: PayloadAction<boolean>
) => {
state.wsConnected = action.payload;
|
🎉 This PR is included in version 1.25.0-add-zoom.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.25.0-add-zoom.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.25.0-add-zoom.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.25.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This pull request introduces significant improvements to the integration and reliability of the Mobile Control React app core library, focusing on error handling, WebXPanel/Zoom Room Controller (ZRC) support, and developer documentation. The most important changes are summarized below.
WebXPanel and Zoom Room Controller (ZRC) Support:
webXPanelservice (src/lib/services/webXPanel/webXPanel.ts) that automatically initializes a WebXPanel/CIP connection when the app is loaded as a Zoom Room Controller (?zoomRoom=truein the URL). The service reads configuration from URL query parameters, handles Zoom websocket token handshakes, and mirrors connection status/errors into Redux for diagnostics.webXPanelservice from the main services index for easy access throughout the app. [1] [2]Error Handling and Initialization:
useInitializefunction to provide user-friendly error messages for failed HTTP requests (such as SSL certificate issues or unreachable servers), and to surface these errors in the UI via Redux. [1] [2]Documentation and Developer Experience:
README.mdwith a new section detailing how to integrate the library into an existing React app, including installation steps, configuration, router setup, context providers, and use of interface hooks. Also documented automatic WebXPanel/ZRC support.Dependency Updates:
package.jsonfor improved compatibility and security, including new versions oflodash,typescript,vite, and others; added@crestron/ch5-webxpaneland@pepperdash/ch5-crcomlib-liteas regular dependencies. [1] [2]These changes together make the library more robust, easier to integrate, and better suited to environments requiring WebXPanel/Zoom Room Controller support.