Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cicadas/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
]
}
]
}
}
7 changes: 2 additions & 5 deletions .cicadas/registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@
"branches": {
"feat/service-infrastructure": {
"intent": "Set up backend services for LLM-powered editing",
"modules": [
"apps/client/vite.config.ts",
"scripts/"
],
"modules": ["apps/client/vite.config.ts", "scripts/"],
"owner": "unknown",
"created_at": "2026-02-18T18:14:17.470766+00:00",
"initiative": "stage-1-editing"
}
}
}
}
70 changes: 35 additions & 35 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,61 +12,61 @@ jobs:
name: Commit name
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
- run: npm ci
- run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --verbose
node-version: 22
- run: pnpm install --frozen-lockfile
- run: pnpm exec commitlint --from ${{ github.event.pull_request.base.sha }} --verbose
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
- run: npm ci
- run: npx nx run lint
node-version: 22
- run: pnpm install --frozen-lockfile
- run: pnpm --filter @zolver/core build
- run: pnpm --filter @zolvery/server lint
prettier:
name: Code style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
- run: npm ci
- run: npx nx run prettier
node-version: 22
- run: pnpm install --frozen-lockfile
- run: pnpm prettier --check .
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
- run: npm ci
- run: npx nx run test
node-version: 22
- run: pnpm install --frozen-lockfile
- run: pnpm --filter @zolver/core test
- run: pnpm --filter @zolvery/server test
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
- run: npm ci
- name: Build
run: npx nx run build
- name: Examples
run: npx run examples:build
- name: E2E
run: npx run e2e:test
node-version: 22
- run: pnpm install --frozen-lockfile
- name: Build core
run: pnpm --filter @zolver/core build
- name: Build server
run: pnpm --filter @zolvery/server build
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ dist
_bmad
.github/agents/bmd*

pnpm-lock.yaml

# Generated during build
apps/client/public/apps
apps/client/public/esbuild.wasm
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
access = public
link-workspace-packages = deep
shamefully-hoist = true
24 changes: 12 additions & 12 deletions .vscode/mcp.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"servers": {
"context7": {
"url": "https://mcp.context7.com/mcp",
"type": "http"
},
"grep": {
"url": "https://mcp.grep.app",
"type": "http"
}
},
"inputs": []
}
"servers": {
"context7": {
"url": "https://mcp.context7.com/mcp",
"type": "http"
},
"grep": {
"url": "https://mcp.grep.app",
"type": "http"
}
},
"inputs": []
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"editor.formatOnSave": true
"editor.formatOnSave": true
}
31 changes: 13 additions & 18 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "CDK Build",
"type": "shell",
"command": "npm",
"args": [
"run",
"build"
],
"group": "build",
"isBackground": false,
"problemMatcher": [
"$tsc"
]
}
]
}
"version": "2.0.0",
"tasks": [
{
"label": "CDK Build",
"type": "shell",
"command": "npm",
"args": ["run", "build"],
"group": "build",
"isBackground": false,
"problemMatcher": ["$tsc"]
}
]
}
8 changes: 2 additions & 6 deletions apps/client/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { useGamesCatalog, type GameEntry } from './src/hooks/use-games-catalog';
import { GameCatalog } from './src/components/game-catalog';
import { GameSetup, type GameConfig } from './src/components/game-setup';
import { GameLobby, type GameLobbyConfig } from './src/components/game-lobby';
import { initPreloadInjector } from './src/services/preload-injector';

import './style.css';

Expand Down Expand Up @@ -498,8 +497,5 @@ function App() {
);
}

// Initialize preload injector before rendering (for mobile/offline support)
initPreloadInjector().then(() => {
const root = createRoot(document.getElementById('root')!);
root.render(<App />);
});
const root = createRoot(document.getElementById('root')!);
root.render(<App />);
2 changes: 1 addition & 1 deletion apps/client/postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ export default {
tailwindcss: {},
autoprefixer: {},
},
}
};
8 changes: 0 additions & 8 deletions apps/client/public/peerjs.min.js

This file was deleted.

58 changes: 31 additions & 27 deletions apps/client/public/sw.js
Original file line number Diff line number Diff line change
@@ -1,60 +1,64 @@
importScripts(
'https://storage.googleapis.com/workbox-cdn/releases/7.3.0/workbox-sw.js'
'https://storage.googleapis.com/workbox-cdn/releases/7.3.0/workbox-sw.js',
);

// This is your Service Worker, you can put any of your custom Service Worker
// code in this file, above the `precacheAndRoute` line.

// When widget is installed/pinned, push initial state.
self.addEventListener('widgetinstall', (event) => {
event.waitUntil(updateWidget(event));
event.waitUntil(updateWidget(event));
});

// When widget is shown, update content to ensure it is up-to-date.
self.addEventListener('widgetresume', (event) => {
event.waitUntil(updateWidget(event));
event.waitUntil(updateWidget(event));
});

// When the user clicks an element with an associated Action.Execute,
// handle according to the 'verb' in event.action.
self.addEventListener('widgetclick', (event) => {
if (event.action == "updateName") {
if (event.action == 'updateName') {
event.waitUntil(updateName(event));
}
}
});

// When the widget is uninstalled/unpinned, clean up any unnecessary
// periodic sync or widget-related state.
self.addEventListener('widgetuninstall', (event) => {});

const updateWidget = async (event) => {
// The widget definition represents the fields specified in the manifest.
const widgetDefinition = event.widget.definition;
// The widget definition represents the fields specified in the manifest.
const widgetDefinition = event.widget.definition;

// Fetch the template and data defined in the manifest to generate the payload.
const payload = {
template: JSON.stringify(await (await fetch(widgetDefinition.msAcTemplate)).json()),
data: JSON.stringify(await (await fetch(widgetDefinition.data)).json()),
};
// Fetch the template and data defined in the manifest to generate the payload.
const payload = {
template: JSON.stringify(
await (await fetch(widgetDefinition.msAcTemplate)).json(),
),
data: JSON.stringify(await (await fetch(widgetDefinition.data)).json()),
};

// Push payload to widget.
await self.widgets.updateByInstanceId(event.instanceId, payload);
}
// Push payload to widget.
await self.widgets.updateByInstanceId(event.instanceId, payload);
};

const updateName = async (event) => {
const name = event.data.json().name;
const name = event.data.json().name;

// The widget definition represents the fields specified in the manifest.
const widgetDefinition = event.widget.definition;
// The widget definition represents the fields specified in the manifest.
const widgetDefinition = event.widget.definition;

// Fetch the template and data defined in the manifest to generate the payload.
const payload = {
template: JSON.stringify(await (await fetch(widgetDefinition.msAcTemplate)).json()),
data: JSON.stringify({name}),
};
// Fetch the template and data defined in the manifest to generate the payload.
const payload = {
template: JSON.stringify(
await (await fetch(widgetDefinition.msAcTemplate)).json(),
),
data: JSON.stringify({ name }),
};

// Push payload to widget.
await self.widgets.updateByInstanceId(event.instanceId, payload);
}
// Push payload to widget.
await self.widgets.updateByInstanceId(event.instanceId, payload);
};

workbox.precaching.precacheAndRoute(self.__WB_MANIFEST || []);
workbox.precaching.precacheAndRoute(self.__WB_MANIFEST || []);
83 changes: 0 additions & 83 deletions apps/client/public/tailwind.js

This file was deleted.

19 changes: 11 additions & 8 deletions apps/client/src/components/editable-widget-player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,17 @@ export function EditableWidgetPlayer({
[source, onSourceChange, setIsEditing, project, entryFile],
);

const handleSaveProject = useCallback(async (editedProject: VirtualProject) => {
const filesToSave = Array.from(editedProject.files.values()).map((f) => ({
path: f.path,
content: f.content,
encoding: f.encoding,
}));
await project.save(filesToSave);
}, [project]);
const handleSaveProject = useCallback(
async (editedProject: VirtualProject) => {
const filesToSave = Array.from(editedProject.files.values()).map((f) => ({
path: f.path,
content: f.content,
encoding: f.encoding,
}));
await project.save(filesToSave);
},
[project],
);

return (
<div className="relative w-full h-full">
Expand Down
26 changes: 15 additions & 11 deletions apps/client/src/components/game-catalog.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
import React from 'react';
import type { GameCategory, GameEntry } from '../hooks/use-games-catalog';
import { GITHUB_REPO_URL } from '../constants';

interface GameCatalogProps {
categories: GameCategory[];
isLoading: boolean;
onSelectGame: (game: GameEntry) => void;
}

function GameCard({
game,
onClick,
}: {
game: GameEntry;
onClick: () => void;
}) {
function GameCard({ game, onClick }: { game: GameEntry; onClick: () => void }) {
return (
<button
onClick={onClick}
Expand Down Expand Up @@ -60,12 +55,21 @@ export function GameCatalog({
<div className="h-full overflow-auto">
<div className="p-4 space-y-6 max-w-lg mx-auto">
<header className="text-center space-y-1 flex space-between gap-4 items-center justify-center">
<img src={`${import.meta.env.BASE_URL}logo.png`} alt="Zolvery Logo" className="w-8 h-8" />
<span className="text-sm uppercase tracking-widest text-slate-400">Zolvery</span>
<img
src={`${import.meta.env.BASE_URL}logo.png`}
alt="Zolvery Logo"
className="w-8 h-8"
/>
<span className="text-sm uppercase tracking-widest text-slate-400">
Zolvery
</span>
</header>

{categories.map((category) => (
<section key={category.id} className="space-y-2">
<section
key={category.id}
className="space-y-2"
>
<h2 className="text-xs font-medium text-slate-400 uppercase tracking-wide px-1">
{category.label}
</h2>
Expand All @@ -86,7 +90,7 @@ export function GameCatalog({
Want more games? Build your own!
</p>
<a
href="https://github.com/JacobSampson/zolvery"
href={GITHUB_REPO_URL}
target="_blank"
rel="noopener noreferrer"
className="inline-flex items-center gap-1.5 text-xs text-slate-500 hover:text-slate-700 transition-colors"
Expand Down
Loading
Loading