Skip to content

Improve safety, dependencies, and developer setup#36

Merged
srea merged 1 commit into
masterfrom
cursor/ribs-treeviewer-improvements-e1d0
May 31, 2026
Merged

Improve safety, dependencies, and developer setup#36
srea merged 1 commit into
masterfrom
cursor/ribs-treeviewer-improvements-e1d0

Conversation

@srea
Copy link
Copy Markdown
Owner

@srea srea commented May 31, 2026

Summary

Improvements from a repo review: Swift client robustness, WebSocket relay cleanup, Browser toolchain upgrades, and clearer setup docs.

Changes

Swift (RIBsTreeViewerClient)

  • Validate webSocketURL instead of force-unwrapping URL(string:)
  • Use [weak self] in the monitoring interval (avoids retain/crash risk from unowned)
  • Avoid force-unwrap on UTF-8 JSON encoding; log serialization errors in DEBUG
  • Modernize WebSocketClientDelegate to AnyObject

WebSocket relay (WebSocketServer)

  • Upgrade ws to v8 and remove mistaken yarn npm dependency
  • Forward messages only to other clients (avoids echo to sender)
  • Add npm start script and PORT env support

Browser viewer

  • Upgrade webpack 5, jQuery 3.7, jqTree 1.8
  • Remove unused deps; fix broken start script
  • Safer JSON parse: [JSON.parse(e.data)]
  • npm audit: 145 → 2 issues (devDependencies only)

Docs / DX

  • README: correct WebSocket server and Browser build steps
  • Makefile: websocket-server and browser-build targets

Follow-ups (not in this PR)

Swift client: validate WebSocket URL, avoid unowned captures in the
monitoring interval, and surface JSON serialization failures in DEBUG.
WebSocket relay: upgrade to ws v8, drop the erroneous yarn dependency,
and forward messages only to other connected clients. Browser: upgrade
webpack 5 and jQuery/jqTree, fix broken npm scripts, and reduce npm audit
findings from 145 to 2 (dev-only). README and Makefile document the
correct install and start flow.
@srea srea merged commit 813de57 into master May 31, 2026
@srea srea deleted the cursor/ribs-treeviewer-improvements-e1d0 branch May 31, 2026 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant