Skip to content

Commit aa852ff

Browse files
committed
Merge remote-tracking branch 'origin/dev' into darora1/218/ui-tour
Brings in Multiplayer v2 (Glueball). Nine files conflicted; several more auto-merged across the same areas. Resolution decisions: PreferenceTypes.ts - Took dev's MultiplayerHost/Port/Secure and dropped MultiplayerClientID, which dev deliberately removed in the v2 rewrite. Kept HasSeenOnboardingTour. Synthesis.tsx - Kept dev's Stack that groups DragModeIndicator with MultiplayerHUD, and wrapped the tree in TourProvider with TourOverlay after PortraitOverlay. MirabufLoader.ts / LibrarySpawnActions.ts - This branch moved spawnCachedMira out to LibrarySpawnActions.ts, so dev's edits to the old copy were ported by hand rather than merged: - added the "Cannot spawn a second field!" guard for multiplayer sessions - renamed newObject payload sceneObjectKey to sceneObjectId - dropped the bodyIds payload field - broadcast is no longer async, so broadcastSpawn no longer awaits it - retargeted the import from multiplayer/types to multiplayer/MultiplayerTypes - Kept dev's consolePrefixer logger in MirabufLoader.ts. SceneRenderer.ts - Kept both sides: this branch's captureAssemblyThumbnail and dev's optional id parameter on registerSceneObject. Took dev's relocated components/overlays/SceneOverlayEvents path. MobileHUD.tsx (moved by dev to components/overlays/) - Took dev's import paths for the new location and dev's globalOpenModal multiplayer flow, which supersedes the startWorldCallback prop this branch was passing. Kept LibraryModal in place of ImportMirabufPanel. TopBar.tsx / ConfigurePanel.tsx - Additive import unions only. Kept dev's setCloseModal and MatchModeType alongside the tour imports. ImportMirabufPanel.tsx - Deleted. This branch replaced it with LibraryModal, and dev's only change to it was an import path rewrite, so nothing behavioural was lost. No references remain. biome.json (only deliberate deviation from dev) - Added an overrides entry disabling the linter and formatter for src/systems/multiplayer/bindings, matching how src/proto is already handled. dev's existing "!src/systems/multiplayer/bindings" sits in the formatter includes only, so the generated glueball bindings were still linted and formatted and blocked the pre-commit hook. Verified after resolution: tsc clean, biome clean on source, 817 unit tests pass, production build succeeds.
2 parents da8483d + fb8957b commit aa852ff

126 files changed

Lines changed: 7487 additions & 1571 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: "Setup Fission Bun"
2+
runs:
3+
using: composite
4+
steps:
5+
- name: Bun Setup
6+
uses: oven-sh/setup-bun@v2
7+
with:
8+
bun-version: ${{ env.BUN_VERSION }}
9+
10+
- name: Cache Node Dependencies
11+
uses: actions/cache@v6
12+
with:
13+
key: "${{runner.os}}-npm-fission-${{hashFiles('fission/bun.lock')}}"
14+
path: "fission/node_modules"
15+
restore-keys: |
16+
${{runner.os}}-npm-fission-
17+
${{runner.os}}-npm
18+
19+
- name: Install Dependencies
20+
shell: bash
21+
run: bun install --frozen-lockfile
22+
working-directory: "fission"

.github/workflows/FissionBiome.yml

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,20 @@ jobs:
1111
runBiomeValidationScript:
1212
name: Biome Validation
1313
runs-on: ubuntu-latest
14+
defaults:
15+
run:
16+
working-directory: "fission"
1417
steps:
1518
- name: Checkout Code
1619
uses: actions/checkout@v7
17-
- name: Bun Runtime Setup
18-
uses: oven-sh/setup-bun@v2
19-
with:
20-
bun-version: latest
2120

22-
- name: Cache Node Dependencies
23-
uses: actions/cache@v6
24-
with:
25-
key: "${{runner.os}}-npm-fission-${{hashFiles('fission/bun.lock')}}"
26-
path: "fission/node_modules"
27-
restore-keys: |
28-
${{runner.os}}-npm-fission-
29-
${{runner.os}}-npm
30-
31-
- name: Install Dependencies
32-
run: |
33-
cd fission
34-
bun install
21+
- name: Setup Fission Bun
22+
uses: ./.github/actions/FissionSetup
3523

3624
- name: Lint
37-
id: lint-validation
3825
if: ${{ always() }}
39-
run: |
40-
cd fission
41-
bun run lint --diagnostic-level=error
26+
run: bun run lint --diagnostic-level=error
4227

4328
- name: Format
44-
id: format-validation
4529
if: ${{ always() }}
46-
run: |
47-
cd fission
48-
bun run fmt
30+
run: bun run fmt

.github/workflows/FissionBuild.yml

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,10 @@ jobs:
1212
steps:
1313
- name: Checkout Code
1414
uses: actions/checkout@v7
15-
- name: Bun Runtime Setup
16-
uses: oven-sh/setup-bun@v2
17-
with:
18-
bun-version: latest
1915

20-
- name: Cache Node Dependencies
21-
uses: actions/cache@v6
22-
with:
23-
key: "${{runner.os}}-npm-fission-${{hashFiles('fission/bun.lock')}}"
24-
path: "fission/node_modules"
25-
restore-keys: |
26-
${{runner.os}}-npm-fission-
27-
${{runner.os}}-npm
28-
29-
- name: Install Dependencies
30-
run: |
31-
cd fission
32-
bun install
16+
- name: Setup Fission Bun
17+
uses: ./.github/actions/FissionSetup
3318

3419
- name: Build Fission
35-
run: |
36-
cd fission
37-
bun run build && echo "Build Passed" || (echo "Build Failed" && exit 1)
20+
working-directory: "fission"
21+
run: bun run build && echo "Build Passed" || (echo "Build Failed" && exit 1)

.github/workflows/FissionPackage.yml

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,16 @@ jobs:
1212
steps:
1313
- name: Checkout Code
1414
uses: actions/checkout@v7
15-
- name: Bun Runtime Setup
16-
uses: oven-sh/setup-bun@v2
17-
with:
18-
bun-version: latest
15+
16+
- name: Setup Fission Bun
17+
uses: ./.github/actions/FissionSetup
1918

2019
- name: Get date
2120
id: date # this is used on variable path
2221
run: |
2322
echo "timestamp=$(date +'%Y-%m-%dT%H-%M-%S')" >> $GITHUB_OUTPUT
2423
25-
- name: Cache Node Dependencies
26-
uses: actions/cache@v6
27-
with:
28-
key: "${{runner.os}}-npm-fission-${{hashFiles('fission/bun.lock')}}"
29-
path: "fission/node_modules"
30-
restore-keys: |
31-
${{runner.os}}-npm-fission-
32-
${{runner.os}}-npm
33-
34-
- name: Install Dependencies
35-
run: |
36-
cd fission
37-
bun install
24+
3825

3926
- name: Get package info
4027
id: info
@@ -44,8 +31,8 @@ jobs:
4431

4532
- name: Build
4633
id: build
34+
working-directory: "fission"
4735
run: |
48-
cd fission
4936
bun run build:prod
5037
bun run build:dev
5138

.github/workflows/FissionUnitTest.yml

Lines changed: 134 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ on:
1111
branches: [prod, dev]
1212

1313
jobs:
14-
runUnitTests:
15-
name: Playwright Unit Tests
16-
container:
17-
image: mcr.microsoft.com/playwright:v1.61.0-noble
14+
setupCaches:
15+
name: Prepare Assetpack
1816
runs-on: ubuntu-latest
1917
defaults:
2018
run:
@@ -23,44 +21,52 @@ jobs:
2321
- name: Checkout Code
2422
uses: actions/checkout@v7
2523

26-
- name: Install System Dependencies
24+
- name: Remove zstd for gzip cache compatibility with container jobs # This is super scuffed but that's just how the oil gushes
2725
run: |
28-
apt-get update
29-
apt-get install -y git-lfs unzip
30-
31-
- name: Bun Setup
32-
uses: oven-sh/setup-bun@v2
33-
with:
34-
bun-version: ${{ env.BUN_VERSION }}
26+
sudo apt-get remove -y zstd
27+
sudo rm /usr/local/bin/zstd
28+
zstd --help || true
3529
3630
- name: Cache Unzipped Synthesis Assets
3731
id: cache-assets
3832
uses: actions/cache@v6
3933
with:
4034
path: fission/public/Downloadables
41-
key: ${{ runner.os }}-assets-${{hashFiles('fission/public/assetpack.zip')}}
35+
key: assets-${{hashFiles('fission/public/assetpack.zip')}}
4236

4337
- name: Download Synthesis assetpack if not cached
4438
if: steps.cache-assets.outputs.cache-hit != 'true'
4539
run: |
4640
cd ..
4741
git config --global --add safe.directory `pwd`
4842
git lfs pull
49-
43+
5044
cd fission
5145
unzip -o public/assetpack.zip -d public/ || echo
5246

53-
- name: Cache Node Dependencies
54-
uses: actions/cache@v6
55-
with:
56-
key: "${{runner.os}}-npm-fission-${{hashFiles('fission/bun.lock')}}"
57-
path: "fission/node_modules"
58-
restore-keys: |
59-
${{runner.os}}-npm-fission-
60-
${{runner.os}}-npm
6147

62-
- name: Install Dependencies
63-
run: bun install --frozen-lockfile
48+
runUnitTests:
49+
name: Playwright Unit Tests
50+
needs: setupCaches
51+
container:
52+
image: mcr.microsoft.com/playwright:v1.61.0-noble
53+
runs-on: ubuntu-latest
54+
defaults:
55+
run:
56+
working-directory: "fission"
57+
steps:
58+
- name: Checkout Code
59+
uses: actions/checkout@v7
60+
61+
- name: Setup Fission Bun
62+
uses: ./.github/actions/FissionSetup
63+
64+
- name: Restore Unzipped Synthesis Assets
65+
uses: actions/cache/restore@v6
66+
with:
67+
fail-on-cache-miss: true
68+
path: fission/public/Downloadables
69+
key: assets-${{hashFiles('fission/public/assetpack.zip')}}
6470

6571
- name: Run Tests
6672
run: |
@@ -69,7 +75,7 @@ jobs:
6975
7076
runAssetpackTests:
7177
name: Assetpack Tests
72-
needs: runUnitTests
78+
needs: setupCaches
7379
container:
7480
image: mcr.microsoft.com/playwright:v1.61.0-noble
7581
runs-on: ubuntu-latest
@@ -80,35 +86,118 @@ jobs:
8086
- name: Checkout Code
8187
uses: actions/checkout@v7
8288

83-
- name: Install System Dependencies
84-
run: |
85-
apt-get update
86-
apt-get install -y unzip
89+
- name: Setup Fission Bun
90+
uses: ./.github/actions/FissionSetup
8791

88-
- name: Bun Setup
89-
uses: oven-sh/setup-bun@v2
90-
with:
91-
bun-version: ${{ env.BUN_VERSION }}
92-
93-
- name: Cache Unzipped Synthesis Assets
92+
- name: Restore Unzipped Synthesis Assets
9493
id: cache-assets
95-
uses: actions/cache@v6
94+
uses: actions/cache/restore@v6
9695
with:
96+
fail-on-cache-miss: true
9797
path: fission/public/Downloadables
98-
key: ${{ runner.os }}-assets-${{hashFiles('fission/public/assetpack.zip')}}
98+
key: assets-${{hashFiles('fission/public/assetpack.zip')}}
9999

100-
- name: Cache Node Dependencies
101-
uses: actions/cache@v6
102-
with:
103-
key: "${{runner.os}}-npm-fission-${{hashFiles('fission/bun.lock')}}"
104-
path: "fission/node_modules"
105-
restore-keys: |
106-
${{runner.os}}-npm-fission-
107-
${{runner.os}}-npm
108100

109101
- name: Run Assetpack Tests
110102
run: |
111103
HOME=/root bun run test src/test/mirabuf/DefaultAssets.test.ts 2>&1 | tee output.txt
112104
grep -q "GH ACTIONS VITEST PASSED" output.txt
113105
env:
114106
VITE_RUN_ASSETPACK_TEST: true
107+
runMultiplayerTests:
108+
name: Multiplayer Tests
109+
needs: setupCaches
110+
container:
111+
image: mcr.microsoft.com/playwright:v1.61.0-noble
112+
runs-on: ubuntu-latest
113+
defaults:
114+
run:
115+
working-directory: "fission"
116+
steps:
117+
- name: Checkout Code
118+
uses: actions/checkout@v7
119+
120+
- name: Setup Fission Bun
121+
uses: ./.github/actions/FissionSetup
122+
123+
- name: Restore Unzipped Synthesis Assets
124+
id: cache-assets
125+
uses: actions/cache/restore@v6
126+
with:
127+
fail-on-cache-miss: true
128+
path: fission/public/Downloadables
129+
key: assets-${{hashFiles('fission/public/assetpack.zip')}}
130+
131+
132+
- name: Install linker
133+
run:
134+
apt-get update -y &&
135+
apt-get install -y build-essential
136+
137+
- name: Setup Rust
138+
uses: actions-rust-lang/setup-rust-toolchain@v1
139+
140+
- name: Build server
141+
shell: bash
142+
working-directory: "glueball"
143+
run: cargo build
144+
145+
- name: Start server
146+
shell: bash
147+
working-directory: "glueball"
148+
run: |
149+
./target/debug/glueball --secure --headless --permanent-room TEST01 > server.log 2>&1 &
150+
echo $! > server.pid
151+
152+
# Wait for server to start
153+
for i in {1..30}; do
154+
if curl --insecure --fail --silent https://localhost:2610/ > /dev/null; then
155+
echo "Server ready"
156+
exit 0
157+
fi
158+
159+
if ! kill -0 "$(cat server.pid)" 2>/dev/null; then
160+
echo "Server exited"
161+
cat server.log
162+
exit 1
163+
fi
164+
165+
sleep 1
166+
done
167+
168+
echo "Timed out while waiting for server startup"
169+
cat server.log
170+
exit 1
171+
172+
- name: Run Multiplayer Tests
173+
run: |
174+
HOME=/root bun run test src/test/multiplayer/ 2>&1 | tee output.txt
175+
grep -q "GH ACTIONS VITEST PASSED" output.txt
176+
env:
177+
VITE_RUN_MULTIPLAYER_TEST: true
178+
179+
- name: Stop server
180+
if: always()
181+
working-directory: "glueball"
182+
shell: bash
183+
run: |
184+
if [[ -f server.pid ]]; then
185+
PID="$(cat server.pid)"
186+
187+
if kill -0 "$PID" 2>/dev/null; then
188+
kill "$PID"
189+
190+
# Wait for clean shutdown
191+
for i in {1..10}; do
192+
kill -0 "$PID" 2>/dev/null || exit 0
193+
sleep 1
194+
done
195+
196+
kill -9 "$PID" 2>/dev/null || true
197+
fi
198+
fi
199+
200+
- name: Show server logs on failure
201+
if: failure()
202+
working-directory: "glueball"
203+
run: cat server.log || true

0 commit comments

Comments
 (0)