Skip to content

feat: connection policy layer, offline mode, static GH Pages deploy#3

Merged
madjin merged 2 commits intodevfrom
feat/connection-policy-layer
Mar 18, 2026
Merged

feat: connection policy layer, offline mode, static GH Pages deploy#3
madjin merged 2 commits intodevfrom
feat/connection-policy-layer

Conversation

@madjin
Copy link
Copy Markdown
Owner

@madjin madjin commented Mar 18, 2026

Summary

  • Adds a connection policy layer with offline/solo mode support — world boots without a WebSocket server, useful for static previews and local exploration
  • Folds OfflineNetwork null-object class into ClientNetwork (4 small conditionals, one fewer file)
  • Fixes static asset resolution on GitHub Pages sub-paths (/hyperfy/) using new URL('./', location.href) as the base
  • Adds GitHub Actions workflow to build and push static files to gh-pages branch on every dev merge
  • Bumps all GitHub Actions dependencies to latest major versions

Test plan

  • npm run dev — loads in offline mode when no PUBLIC_WS_URL set, world spawns with ground + sky
  • ?mode=offline — forces offline mode regardless of env
  • /connect ws://... chat command — navigates to connected mode
  • GitHub Pages: https://madjin.github.io/hyperfy/ — ground and HDR sky render correctly

🤖 Generated with Claude Code

madjin and others added 2 commits March 17, 2026 20:28
actions/checkout v4 → v6
actions/setup-node v4 → v6
docker/login-action v3 → v4
docker/metadata-action v5 → v6
docker/setup-qemu-action v3 → v4
docker/setup-buildx-action v3 → v4
docker/build-push-action v6 → v7

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Compute an absolute base URL (new URL('./', location.href)) for offline
mode so bare filenames and /absolute paths don't break when the site is
served at a sub-path like /hyperfy/. Passes assetsUrl into world.init so
updateSky fires with the correct HDR URL. Removes redundant explicit HDR
load since ClientEnvironment handles it via baseEnvironment.hdr.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@madjin madjin merged commit 9d18d34 into dev Mar 18, 2026
@madjin madjin deleted the feat/connection-policy-layer branch March 18, 2026 00:38
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