diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b4caf93d..6b947d857 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -460,10 +460,10 @@ jobs: env: CI: true run: | - # QNBS-v3: The GitHub Pages build has base=/StoryCraft-Studio/. Mirror that structure + # QNBS-v3: The GitHub Pages build has base=/WorldScript-Studio/. Mirror that structure # so http-server serves assets at the expected paths matching playwright.config baseURL. - mkdir -p serve_root/StoryCraft-Studio - cp -r dist/. serve_root/StoryCraft-Studio/ + mkdir -p serve_root/WorldScript-Studio + cp -r dist/. serve_root/WorldScript-Studio/ pnpm exec http-server serve_root -p 3000 -s & pnpm exec wait-on http://127.0.0.1:3000 --timeout 30000 pnpm run test:vrt diff --git a/.lighthouserc.cjs b/.lighthouserc.cjs index 275e9d384..c4595709c 100644 --- a/.lighthouserc.cjs +++ b/.lighthouserc.cjs @@ -1,9 +1,23 @@ +// QNBS-v3: derive the audited URL from the same deploy-base logic the build/preview use +// (mirror of scripts/resolve-deploy-base.mjs — keep in sync). Hardcoding the GitHub Pages +// base made LHCI audit a 404 when the preview was built with VITE_BASE=/ or DEPLOY_TARGET=edge. +function resolveDeployBase() { + const viteBase = process.env.VITE_BASE?.trim(); + if (viteBase) { + return viteBase.endsWith('/') ? viteBase : `${viteBase}/`; + } + if (process.env.DEPLOY_TARGET === 'edge') { + return '/'; + } + return '/WorldScript-Studio/'; +} + module.exports = { ci: { collect: { startServerCommand: 'pnpm run preview', startServerReadyPattern: 'Local', - url: ['http://127.0.0.1:4173/StoryCraft-Studio/'], + url: [`http://127.0.0.1:4173${resolveDeployBase()}`], numberOfRuns: 3, settings: { // QNBS-v3: harden Chrome launch on CI runners. `--disable-dev-shm-usage` is the fix for the diff --git a/.lighthouserc.desktop.cjs b/.lighthouserc.desktop.cjs index 9d04c8277..603cd02a8 100644 --- a/.lighthouserc.desktop.cjs +++ b/.lighthouserc.desktop.cjs @@ -1,12 +1,26 @@ // QNBS-v3: Desktop Lighthouse config — runs alongside the mobile config (.lighthouserc.cjs). // Serves production dist (pnpm run preview) and audits with desktop emulation. // continue-on-error: true in ci.yml until desktop baselines stabilise. +// QNBS-v3: derive the audited URL from the same deploy-base logic the build/preview use +// (mirror of scripts/resolve-deploy-base.mjs — keep in sync). Hardcoding the GitHub Pages +// base made LHCI audit a 404 when the preview was built with VITE_BASE=/ or DEPLOY_TARGET=edge. +function resolveDeployBase() { + const viteBase = process.env.VITE_BASE?.trim(); + if (viteBase) { + return viteBase.endsWith('/') ? viteBase : `${viteBase}/`; + } + if (process.env.DEPLOY_TARGET === 'edge') { + return '/'; + } + return '/WorldScript-Studio/'; +} + module.exports = { ci: { collect: { startServerCommand: 'pnpm run preview', startServerReadyPattern: 'Local', - url: ['http://127.0.0.1:4173/StoryCraft-Studio/'], + url: [`http://127.0.0.1:4173${resolveDeployBase()}`], numberOfRuns: 2, settings: { // QNBS-v3: same /dev/shm crash hardening as the mobile config (.lighthouserc.cjs) — diff --git a/.mcp/proforge-mcp-server/package.json b/.mcp/proforge-mcp-server/package.json index a461231f9..ef1ae023d 100644 --- a/.mcp/proforge-mcp-server/package.json +++ b/.mcp/proforge-mcp-server/package.json @@ -1,9 +1,9 @@ { - "name": "@storycraft/proforge-mcp-server", + "name": "@worldscript/proforge-mcp-server", "version": "1.0.0", "private": true, "type": "module", - "description": "MCP server exposing the StoryCraft ProForge Core Capability Layer to external AI agents", + "description": "MCP server exposing the WorldScript ProForge Core Capability Layer to external AI agents", "bin": { "proforge-mcp-server": "src/index.ts" }, diff --git a/index.html b/index.html index 29ff0c68b..70a24a1de 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - + @@ -18,31 +18,31 @@ - + - - - - + + + + - - + + - + - + diff --git a/package.json b/package.json index 5de9d178a..335714d9a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,17 @@ { - "name": "storycraft-studio", + "name": "worldscript-studio", "private": true, - "version": "1.22.0", + "version": "1.23.0", + "description": "WorldScript Studio — offline-first, AI-powered creative writing application.", + "author": "QNBS", + "keywords": [ + "worldscript", + "worldscript-studio", + "creative-writing", + "ai-writing", + "pwa", + "tauri" + ], "type": "module", "packageManager": "pnpm@11.5.2", "engines": { diff --git a/packages/collab-transport/package.json b/packages/collab-transport/package.json index 9d51cf517..e511608a4 100644 --- a/packages/collab-transport/package.json +++ b/packages/collab-transport/package.json @@ -3,7 +3,7 @@ "version": "10.3.0-sc1", "private": true, "type": "module", - "description": "Vendored y-webrtc with StoryCraft RTCDataChannel E2E encryption patch", + "description": "Vendored y-webrtc with WorldScript RTCDataChannel E2E encryption patch", "main": "./src/index.ts", "types": "./src/index.ts", "exports": { diff --git a/playwright.config.ts b/playwright.config.ts index 89d1ca401..3f15a9c7a 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -53,7 +53,7 @@ export default defineConfig({ }, use: { - baseURL: 'http://127.0.0.1:3000/StoryCraft-Studio', + baseURL: 'http://127.0.0.1:3000/WorldScript-Studio', trace: 'on-first-retry', screenshot: 'only-on-failure', // QNBS-v3: action + navigation timeouts bound to detect UI hangs / stalled diff --git a/public/404.html b/public/404.html index b8825c3c7..4b95b9a2d 100644 --- a/public/404.html +++ b/public/404.html @@ -3,14 +3,14 @@ - StoryCraft Studio + WorldScript Studio diff --git a/public/manifest.json b/public/manifest.json index 7b1ff3949..d5d66a40d 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,10 +1,10 @@ { - "name": "StoryCraft Studio", - "short_name": "StoryCraft", - "description": "AI-Powered Creative Writing Studio — Craft entire novels, characters & worlds with Gemini AI.", - "start_url": "/StoryCraft-Studio/?source=pwa", - "scope": "/StoryCraft-Studio/", - "id": "/StoryCraft-Studio/", + "name": "WorldScript Studio", + "short_name": "WorldScript", + "description": "AI-Powered Creative Writing Studio — Build immersive worlds and craft entire novels with AI.", + "start_url": "/WorldScript-Studio/?source=pwa", + "scope": "/WorldScript-Studio/", + "id": "/WorldScript-Studio/", "display": "standalone", "display_override": ["window-controls-overlay", "standalone", "minimal-ui"], @@ -45,42 +45,42 @@ "name": "Templates", "short_name": "Templates", "description": "Browse narrative templates and start a structured project", - "url": "/StoryCraft-Studio/?view=templates&source=shortcut", + "url": "/WorldScript-Studio/?view=templates&source=shortcut", "icons": [{ "src": "favicon.svg", "sizes": "any", "type": "image/svg+xml" }] }, { "name": "My Manuscript", "short_name": "Manuscript", "description": "Open your manuscript view", - "url": "/StoryCraft-Studio/?view=manuscript&source=shortcut", + "url": "/WorldScript-Studio/?view=manuscript&source=shortcut", "icons": [{ "src": "favicon.svg", "sizes": "any", "type": "image/svg+xml" }] }, { "name": "Characters", "short_name": "Characters", "description": "Manage your characters", - "url": "/StoryCraft-Studio/?view=characters&source=shortcut", + "url": "/WorldScript-Studio/?view=characters&source=shortcut", "icons": [{ "src": "favicon.svg", "sizes": "any", "type": "image/svg+xml" }] }, { "name": "AI Writer", "short_name": "Writer", "description": "Open the AI writing studio", - "url": "/StoryCraft-Studio/?view=writer&source=shortcut", + "url": "/WorldScript-Studio/?view=writer&source=shortcut", "icons": [{ "src": "favicon.svg", "sizes": "any", "type": "image/svg+xml" }] }, { "name": "New Scene", "short_name": "New Scene", "description": "Jump to the Plot Board and add a new scene", - "url": "/StoryCraft-Studio/#/board?action=add-scene", + "url": "/WorldScript-Studio/#/board?action=add-scene", "icons": [{ "src": "favicon.svg", "sizes": "any", "type": "image/svg+xml" }] }, { "name": "Start Writing Session", "short_name": "Session", "description": "Open the Progress Tracker and start a writing session", - "url": "/StoryCraft-Studio/#/progress?action=start-session", + "url": "/WorldScript-Studio/#/progress?action=start-session", "icons": [{ "src": "favicon.svg", "sizes": "any", "type": "image/svg+xml" }] } ], @@ -92,7 +92,7 @@ "handle_links": "preferred", "share_target": { - "action": "/StoryCraft-Studio/", + "action": "/WorldScript-Studio/", "method": "GET", "params": { "title": "share_title", @@ -103,8 +103,8 @@ "protocol_handlers": [ { - "protocol": "web+storycraft", - "url": "/StoryCraft-Studio/?protocol=%s" + "protocol": "web+worldscript", + "url": "/WorldScript-Studio/?protocol=%s" } ], diff --git a/public/offline.html b/public/offline.html index 87ffcaf53..9cee6eb76 100644 --- a/public/offline.html +++ b/public/offline.html @@ -4,7 +4,7 @@ - Offline — StoryCraft Studio + Offline — WorldScript Studio