From 42f8cbe4aff561272ef1d587fb37a952448be8f9 Mon Sep 17 00:00:00 2001 From: qnbs <155236708+qnbs@users.noreply.github.com> Date: Mon, 15 Jun 2026 10:01:45 +0200 Subject: [PATCH 1/7] chore(rebrand): phase 1 repository metadata and package identity --- .mcp/proforge-mcp-server/package.json | 4 ++-- package.json | 14 ++++++++++++-- packages/collab-transport/package.json | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) 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/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": { From 5c4e780495e2d80caa52b5d49f391b65f7026f10 Mon Sep 17 00:00:00 2001 From: qnbs <155236708+qnbs@users.noreply.github.com> Date: Mon, 15 Jun 2026 10:09:59 +0200 Subject: [PATCH 2/7] chore(rebrand): phase 2 build tooling, urls and pwa configuration --- .lighthouserc.cjs | 2 +- .lighthouserc.desktop.cjs | 2 +- index.html | 20 ++++++++++---------- playwright.config.ts | 2 +- public/manifest.json | 30 +++++++++++++++--------------- public/sw.js | 24 ++++++++++++------------ src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 2 +- vite.config.ts | 8 ++++---- 9 files changed, 46 insertions(+), 46 deletions(-) diff --git a/.lighthouserc.cjs b/.lighthouserc.cjs index 275e9d384..6dc6f6311 100644 --- a/.lighthouserc.cjs +++ b/.lighthouserc.cjs @@ -3,7 +3,7 @@ module.exports = { collect: { startServerCommand: 'pnpm run preview', startServerReadyPattern: 'Local', - url: ['http://127.0.0.1:4173/StoryCraft-Studio/'], + url: ['http://127.0.0.1:4173/WorldScript-Studio/'], 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..771ca57f1 100644 --- a/.lighthouserc.desktop.cjs +++ b/.lighthouserc.desktop.cjs @@ -6,7 +6,7 @@ module.exports = { collect: { startServerCommand: 'pnpm run preview', startServerReadyPattern: 'Local', - url: ['http://127.0.0.1:4173/StoryCraft-Studio/'], + url: ['http://127.0.0.1:4173/WorldScript-Studio/'], numberOfRuns: 2, settings: { // QNBS-v3: same /dev/shm crash hardening as the mobile config (.lighthouserc.cjs) — diff --git a/index.html b/index.html index 29ff0c68b..bc534caa7 100644 --- a/index.html +++ b/index.html @@ -18,31 +18,31 @@ - + - - - - + + + + - - + + - + - + 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/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/sw.js b/public/sw.js index 383f468b6..929ec1ca9 100644 --- a/public/sw.js +++ b/public/sw.js @@ -1,14 +1,14 @@ // ============================================================ -// StoryCraft Studio — Advanced Service Worker v3.0 +// WorldScript Studio — Advanced Service Worker v3.0 // Strategy: Stale-While-Revalidate + Cache-First + Network-Only // Features: Versioned caches, background sync, periodic updates, // offline fallback, push notifications, share target // ============================================================ -const APP_VERSION = '1.22.0'; -const CACHE_STATIC = `storycraft-static-v${APP_VERSION}`; -const CACHE_DYNAMIC = `storycraft-dynamic-v${APP_VERSION}`; -const CACHE_IMAGES = `storycraft-images-v${APP_VERSION}`; +const APP_VERSION = '1.23.0'; +const CACHE_STATIC = `worldscript-static-v${APP_VERSION}`; +const CACHE_DYNAMIC = `worldscript-dynamic-v${APP_VERSION}`; +const CACHE_IMAGES = `worldscript-images-v${APP_VERSION}`; const ALL_CACHES = [CACHE_STATIC, CACHE_DYNAMIC, CACHE_IMAGES]; const BASE = self.location.pathname.replace(/sw\.js$/, ''); @@ -73,7 +73,7 @@ async function trimCache(cacheName, maxEntries) { async function offlineFallback(request) { if (request.destination === 'document') { const cached = await caches.match(`${BASE}offline.html`); - return cached || new Response('Offline

StoryCraft Studio ist offline.

', { + return cached || new Response('Offline

WorldScript Studio ist offline.

', { headers: { 'Content-Type': 'text/html' }, status: 503, }); @@ -305,13 +305,13 @@ self.addEventListener('message', (event) => { self.addEventListener('push', (event) => { if (!event.data) return; let data; - try { data = event.data.json(); } catch { data = { title: 'StoryCraft Studio', body: event.data.text() }; } + try { data = event.data.json(); } catch { data = { title: 'WorldScript Studio', body: event.data.text() }; } const options = { body: data.body || 'New notification', icon: `${BASE}favicon.svg`, badge: `${BASE}favicon.svg`, - tag: data.tag || 'storycraft-notification', + tag: data.tag || 'worldscript-notification', data: data.data || {}, actions: data.actions || [], vibrate: [100, 50, 100], @@ -320,7 +320,7 @@ self.addEventListener('push', (event) => { }; event.waitUntil( - self.registration.showNotification(data.title || 'StoryCraft Studio', options) + self.registration.showNotification(data.title || 'WorldScript Studio', options) ); }); @@ -342,7 +342,7 @@ self.addEventListener('notificationclick', (event) => { // BACKGROUND SYNC — Retry deferred autosave operations // ════════════════════════════════════════════════════════════ self.addEventListener('sync', (event) => { - if (event.tag === 'storycraft-autosave') { + if (event.tag === 'worldscript-autosave') { event.waitUntil( self.clients.matchAll().then((clients) => clients.forEach((c) => c.postMessage({ type: 'TRIGGER_AUTOSAVE' })) @@ -355,7 +355,7 @@ self.addEventListener('sync', (event) => { // PERIODIC BACKGROUND SYNC — Refresh locale JSON while idle // ════════════════════════════════════════════════════════════ self.addEventListener('periodicsync', (event) => { - if (event.tag === 'storycraft-refresh') { + if (event.tag === 'worldscript-refresh') { event.waitUntil( caches.open(CACHE_DYNAMIC).then(async (cache) => { const keys = await cache.keys(); @@ -371,4 +371,4 @@ self.addEventListener('periodicsync', (event) => { } }); -swLogger.log(`StoryCraft Studio Service Worker v${APP_VERSION} loaded`); +swLogger.log(`WorldScript Studio Service Worker v${APP_VERSION} loaded`); diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index dfc8e0cae..6d934f754 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "storycraft-studio" -version = "1.22.0" +version = "1.23.0" description = "AI-powered creative writing application" authors = ["QNBS"] license = "MIT" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 02addd97e..76d8fea92 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "../node_modules/@tauri-apps/cli/config.schema.json", "productName": "StoryCraft Studio", - "version": "1.22.0", + "version": "1.23.0", "identifier": "com.storycraft.studio", "build": { "frontendDist": "../dist", diff --git a/vite.config.ts b/vite.config.ts index 28f28bff6..002e4c38f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -21,7 +21,7 @@ function resolveBase(): string { if (process.env['DEPLOY_TARGET'] === 'edge') { return '/'; } - return '/StoryCraft-Studio/'; + return '/WorldScript-Studio/'; } const deployBase = resolveBase(); @@ -49,10 +49,10 @@ export default defineConfig({ tailwindcss(), react(), { - name: 'storycraft-deploy-base-html', + name: 'worldscript-deploy-base-html', transformIndexHtml(html) { - if (deployBase === '/StoryCraft-Studio/') return html; - return html.replaceAll('/StoryCraft-Studio/', deployBase); + if (deployBase === '/WorldScript-Studio/') return html; + return html.replaceAll('/WorldScript-Studio/', deployBase); }, }, VitePWA({ From 914fcb7ccfc5af8ada9e5ca3e3ed5906d95aa2c7 Mon Sep 17 00:00:00 2001 From: qnbs <155236708+qnbs@users.noreply.github.com> Date: Mon, 15 Jun 2026 10:19:26 +0200 Subject: [PATCH 3/7] chore(rebrand): phase 3 tauri desktop identity --- src-tauri/Cargo.lock | 48 ++++++++++++++++++------------------ src-tauri/Cargo.toml | 6 ++--- src-tauri/Entitlements.plist | 2 +- src-tauri/tauri.conf.json | 32 ++++++++++++------------ 4 files changed, 44 insertions(+), 44 deletions(-) diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 3fdf4bbef..20d8f13b4 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -4634,30 +4634,6 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" -[[package]] -name = "storycraft-studio" -version = "1.21.0" -dependencies = [ - "base64 0.22.1", - "candle-core", - "candle-nn", - "log", - "serde", - "serde_json", - "tauri", - "tauri-build", - "tauri-plugin-deep-link", - "tauri-plugin-dialog", - "tauri-plugin-fs", - "tauri-plugin-http", - "tauri-plugin-log", - "tauri-plugin-shell", - "tauri-plugin-single-instance", - "tauri-plugin-updater", - "tauri-plugin-window-state", - "tokio", -] - [[package]] name = "string_cache" version = "0.9.0" @@ -6771,6 +6747,30 @@ dependencies = [ "wasmparser", ] +[[package]] +name = "worldscript-studio" +version = "1.23.0" +dependencies = [ + "base64 0.22.1", + "candle-core", + "candle-nn", + "log", + "serde", + "serde_json", + "tauri", + "tauri-build", + "tauri-plugin-deep-link", + "tauri-plugin-dialog", + "tauri-plugin-fs", + "tauri-plugin-http", + "tauri-plugin-log", + "tauri-plugin-shell", + "tauri-plugin-single-instance", + "tauri-plugin-updater", + "tauri-plugin-window-state", + "tokio", +] + [[package]] name = "writeable" version = "0.6.3" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 6d934f754..d4da237e0 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "storycraft-studio" +name = "worldscript-studio" version = "1.23.0" -description = "AI-powered creative writing application" +description = "AI-powered creative writing and world-building application" authors = ["QNBS"] license = "MIT" -repository = "https://github.com/QNBS/StoryCraft-Studio" +repository = "https://github.com/QNBS/WorldScript-Studio" edition = "2021" rust-version = "1.77.2" diff --git a/src-tauri/Entitlements.plist b/src-tauri/Entitlements.plist index 94f83fd90..2d2aa679f 100644 --- a/src-tauri/Entitlements.plist +++ b/src-tauri/Entitlements.plist @@ -2,7 +2,7 @@ - + diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 76d8fea92..dd70ee74a 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,8 +1,8 @@ { "$schema": "../node_modules/@tauri-apps/cli/config.schema.json", - "productName": "StoryCraft Studio", + "productName": "WorldScript Studio", "version": "1.23.0", - "identifier": "com.storycraft.studio", + "identifier": "com.worldscript.studio", "build": { "frontendDist": "../dist", "devUrl": "http://localhost:3000", @@ -12,7 +12,7 @@ "app": { "windows": [ { - "title": "StoryCraft Studio", + "title": "WorldScript Studio", "width": 1280, "height": 800, "minWidth": 800, @@ -34,8 +34,8 @@ "category": "Productivity", "publisher": "QNBS", "copyright": "© 2026 QNBS. Licensed under MIT.", - "shortDescription": "AI-powered creative writing application", - "longDescription": "StoryCraft Studio is an offline-first, AI-powered creative writing application with local LLM inference, plot boards, character management, and manuscript export.", + "shortDescription": "AI-powered creative writing and world-building application", + "longDescription": "WorldScript Studio is an offline-first, AI-powered creative writing application with local LLM inference, plot boards, character management, and manuscript export.", "icon": [ "icons/32x32.png", "icons/128x128.png", @@ -45,17 +45,17 @@ ], "fileAssociations": [ { - "ext": ["storycraft"], - "name": "StoryCraft Project", - "description": "StoryCraft Studio creative writing project", - "mimeType": "application/x-storycraft-project", + "ext": ["worldscript"], + "name": "WorldScript Project", + "description": "WorldScript Studio creative writing project", + "mimeType": "application/x-worldscript-project", "role": "Editor" }, { - "ext": ["scst"], - "name": "StoryCraft Project", - "description": "StoryCraft Studio creative writing project (short extension)", - "mimeType": "application/x-storycraft-project", + "ext": ["wsst"], + "name": "WorldScript Project", + "description": "WorldScript Studio creative writing project (short extension)", + "mimeType": "application/x-worldscript-project", "role": "Editor" } ], @@ -74,8 +74,8 @@ "updater": { "active": true, "endpoints": [ - "https://github.com/qnbs/StoryCraft-Studio/releases/latest/download/latest.json", - "https://qnbs.github.io/StoryCraft-Studio/updater/latest.json" + "https://github.com/qnbs/WorldScript-Studio/releases/latest/download/latest.json", + "https://qnbs.github.io/WorldScript-Studio/updater/latest.json" ], "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDZBOTlDOEIxNUYyQzA5RUEKUldUcUNTeGZzY2laYW8yU21QNldMbzZQcTFmUDNTdVZ5RHhNenFkSTVGNTRoTllTRXpBcjJyVVMK", "windows": { @@ -84,7 +84,7 @@ }, "deep-link": { "desktop": { - "schemes": ["storycraft"] + "schemes": ["worldscript"] } } } From c241e1cb7a81d8c35075e707e706a2252d4170fc Mon Sep 17 00:00:00 2001 From: qnbs <155236708+qnbs@users.noreply.github.com> Date: Mon, 15 Jun 2026 15:16:35 +0200 Subject: [PATCH 4/7] fix(build): align deploy helpers, periodic sync tag and VRT path with WorldScript base - register-sw.ts now registers worldscript-refresh to match public/sw.js. - resolve-deploy-base.mjs and sync-deploy-base.mjs default to /WorldScript-Studio/. - vite.config.ts restricts /WorldScript-Studio/ replacement to app-relative paths so absolute OG URLs are not corrupted for edge/Tauri builds. - .github/workflows/ci.yml VRT step now serves under /WorldScript-Studio. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/ci.yml | 6 +++--- register-sw.ts | 2 +- scripts/resolve-deploy-base.mjs | 4 ++-- scripts/sync-deploy-base.mjs | 4 ++-- vite.config.ts | 5 ++++- 5 files changed, 12 insertions(+), 9 deletions(-) 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/register-sw.ts b/register-sw.ts index ebcd9efc8..fd884465f 100644 --- a/register-sw.ts +++ b/register-sw.ts @@ -160,7 +160,7 @@ const registerServiceWorker = async (): Promise => { }); if (status.state === 'granted') { // @ts-expect-error — periodicSync not in TS lib yet - await registration.periodicSync.register('storycraft-refresh', { + await registration.periodicSync.register('worldscript-refresh', { minInterval: 24 * 60 * 60 * 1000, // once per day }); } diff --git a/scripts/resolve-deploy-base.mjs b/scripts/resolve-deploy-base.mjs index ace7fb529..d8cb172e3 100644 --- a/scripts/resolve-deploy-base.mjs +++ b/scripts/resolve-deploy-base.mjs @@ -1,7 +1,7 @@ #!/usr/bin/env node /** * Resolves Vite `base` for static hosting targets. - * - GitHub Pages (default): /StoryCraft-Studio/ + * - GitHub Pages (default): /WorldScript-Studio/ * - Vercel / Cloudflare Pages (root domain): set VITE_BASE=/ or DEPLOY_TARGET=edge */ function resolveDeployBase() { @@ -12,7 +12,7 @@ function resolveDeployBase() { if (process.env.DEPLOY_TARGET === 'edge') { return '/'; } - return '/StoryCraft-Studio/'; + return '/WorldScript-Studio/'; } export const deployBase = resolveDeployBase(); diff --git a/scripts/sync-deploy-base.mjs b/scripts/sync-deploy-base.mjs index 798c7e45d..29089e585 100644 --- a/scripts/sync-deploy-base.mjs +++ b/scripts/sync-deploy-base.mjs @@ -1,6 +1,6 @@ #!/usr/bin/env node /** - * Patches public assets that hardcode /StoryCraft-Studio/ for edge (root) deploys. + * Patches public assets that hardcode /WorldScript-Studio/ for edge (root) deploys. * GitHub Pages CI leaves defaults; Vercel/Cloudflare set DEPLOY_TARGET=edge or VITE_BASE=/. */ import fs from 'node:fs'; @@ -10,7 +10,7 @@ import { deployBase } from './resolve-deploy-base.mjs'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); const root = path.resolve(__dirname, '..'); -const GITHUB_PAGES_BASE = '/StoryCraft-Studio/'; +const GITHUB_PAGES_BASE = '/WorldScript-Studio/'; if (deployBase === GITHUB_PAGES_BASE) { console.log('[sync-deploy-base] GitHub Pages base — no public patches'); diff --git a/vite.config.ts b/vite.config.ts index 002e4c38f..381d36eba 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -52,7 +52,10 @@ export default defineConfig({ name: 'worldscript-deploy-base-html', transformIndexHtml(html) { if (deployBase === '/WorldScript-Studio/') return html; - return html.replaceAll('/WorldScript-Studio/', deployBase); + // QNBS-v3: only rewrite app-relative paths (preceded by quote/space) so + // absolute URLs like https://worldscript-studio.app/WorldScript-Studio/ + // are not corrupted when deployBase is './'. + return html.replace(/(?<=["'\s])\/WorldScript-Studio\//g, deployBase); }, }, VitePWA({ From dc71d354f73f90d55a3f5aafdf10ecd02c8cfed1 Mon Sep 17 00:00:00 2001 From: qnbs <155236708+qnbs@users.noreply.github.com> Date: Mon, 15 Jun 2026 15:39:20 +0200 Subject: [PATCH 5/7] fix(build): complete WorldScript rebrand in static assets and og:url - Rebrand remaining StoryCraft references in public/offline.html and public/404.html. - Update index.html comment and CSP note to WorldScript. - Use %BASE_URL% placeholder in og:url so edge/root deploys get the correct path while GitHub Pages keeps /WorldScript-Studio/. Co-Authored-By: Claude Opus 4.8 --- index.html | 6 +++--- public/404.html | 6 +++--- public/offline.html | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/index.html b/index.html index bc534caa7..70a24a1de 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - + @@ -26,7 +26,7 @@ - + @@ -53,7 +53,7 @@ - connect-src: 'self' + https: — intentional broad HTTPS scheme-source. REQUIRED by the shipped BYOK feature `openAiCompatibleBaseUrl` (Settings → AI → - custom base URL): users point StoryCraft at arbitrary self-hosted + custom base URL): users point WorldScript at arbitrary self-hosted or third-party OpenAI-compatible proxies that cannot be statically enumerated in a meta CSP. Because `https:` already covers every HTTPS origin, the explicit cloud-provider endpoints (Gemini, 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/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