Skip to content
Open
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
6 changes: 3 additions & 3 deletions apps/mapgen-studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"private": true,
"packageManager": "bun@1.3.7",
"scripts": {
"dev": "bun src/server/daemon/devLive.ts",
"dev": "bun --watch src/server/dev.ts",
"dev:frontend": "vite",
"dev:server": "bun src/server/daemon/daemon.ts",
"serve": "bun src/server/daemon/daemon.ts --assets-root dist",
"dev:server": "bun src/server/studioServer.ts",
"serve": "bun src/server/studioServer.ts --assets-root dist",
"gen:civ7-tables": "bun ../../scripts/mapgen-studio/generate-civ7-browser-tables.ts",
"check:worker-bundle": "node scripts/check-worker-bundle.mjs",
"check": "tsc --noEmit",
Expand Down
4 changes: 2 additions & 2 deletions apps/mapgen-studio/src/app/StudioShell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ export function StudioShell(props: StudioShellProps) {
const lastPresetKeyRef = useRef(recipeSettings.preset);
const lastRecipeIdRef = useRef(recipeSettings.recipe);
// `lastRunInGameSource` is session-only UI state. S2.1 deleted the
// localStorage recovery bridge; daemon-retained operations are adopted from
// localStorage recovery bridge; Studio-server-retained operations are adopted from
// `studio.operations.current` instead.
const lastRunInGameSource = useRunStore((s) => s.lastRunInGameSource);
const setLastRunInGameSource = useRunStore((s) => s.setLastRunInGameSource);
Expand Down Expand Up @@ -479,7 +479,7 @@ export function StudioShell(props: StudioShellProps) {
const saveDeployOperationRef = useRef<MapConfigSaveDeployStatus | null>(null);
const saveDeployWaitersRef = useRef<Map<string, SaveDeployTerminalWaiter>>(new Map());
// Run presentation state is session-only; cross-reload operation recovery is
// daemon-owned through `studio.operations.current`.
// Studio-server-owned through `studio.operations.current`.
const runInGameSnapshot = useRunStore((s) => s.runInGameSnapshot);
const setRunInGameSnapshot = useRunStore((s) => s.setRunInGameSnapshot);
const lastSaveDeployConfig = useRunStore((s) => s.lastSaveDeployConfig);
Expand Down
1 change: 1 addition & 0 deletions apps/mapgen-studio/src/features/liveRuntime/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export function buildLiveRuntimeSnapshotRequest(args: {
playerId?: number;
}): LiveRuntimeSnapshotRequest | null {
if (args.status.status !== "ok" || !args.status.snapshotId) return null;
if (args.status.readiness !== "tuner-ready") return null;
const bounds = args.bounds ?? DEFAULT_VISIBLE_SNAPSHOT_BOUNDS;
const fields = args.fields ?? DEFAULT_VISIBLE_SNAPSHOT_FIELDS;
const maxPlots = Math.min(512, Math.max(1, args.maxPlots ?? 64));
Expand Down
2 changes: 1 addition & 1 deletion apps/mapgen-studio/src/features/mapConfigSave/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// EVERYTHING talks oRPC (FRAME §4.7): these callers speak the studio's own
// `@civ7/studio-server` contract through the typed oRPC client (`src/lib/orpc.ts`)
// — there is NO manual `fetch` of `/api/map-configs*` here anymore. The request
// shapes are preserved. Operation recovery and progress are daemon-owned through
// shapes are preserved. Operation recovery and progress are Studio-server-owned through
// `studio.operations.current` and `studio.events.watch`, not localStorage or a
// private client-side status loop. Failures are read through oRPC's NATIVE typed
// contract errors: `safe(...)` +
Expand Down
4 changes: 2 additions & 2 deletions apps/mapgen-studio/src/lib/orpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { ContractRouterClient } from "@orpc/contract";
import type { StudioContract } from "@civ7/studio-server/contract";

/**
* Studio oRPC client — the ONE typed seam to the daemon's `/rpc` mount
* Studio oRPC client — the ONE typed seam to the Studio server's `/rpc` mount
* (runtime-one-mount slice, DP-1).
*
* The unified `StudioContract` covers the entire server surface: the studio
Expand All @@ -21,7 +21,7 @@ import type { StudioContract } from "@civ7/studio-server/contract";
* contract's VALUE graph) can reach the browser bundle.
*/

/** RPC transport link. `/rpc` is same-origin (Vite dev proxy → daemon). */
/** RPC transport link. `/rpc` is same-origin (Vite dev proxy → Studio server). */
const link = new RPCLink({
url: () => `${window.location.origin}/rpc`,
plugins: [new ClientRetryPlugin()],
Expand Down
187 changes: 0 additions & 187 deletions apps/mapgen-studio/src/server/daemon/devLive.ts

This file was deleted.

Loading