diff --git a/docs/refactor/arc-1-smoke-checklist.md b/docs/refactor/arc-1-smoke-checklist.md new file mode 100644 index 0000000..f3bbb8f --- /dev/null +++ b/docs/refactor/arc-1-smoke-checklist.md @@ -0,0 +1,75 @@ +# Arc 1 Smoke Checklist + +This checklist is the manual checkpoint for Arc 1. + +It is intentionally short and focused on the editor flows that must remain usable while the refactor branch is in motion. + +## Preconditions + +- start the Vite client with `npm run dev` +- start the API server with `npm run dev:api` +- open the launcher at the local dev URL + +## Checklist + +### 1. Launcher Opens + +- verify the launcher renders +- verify the primary launch actions are visible +- verify the `Content Editor` action is available + +### 2. Content Editor Loads + +- open the content editor from the launcher +- verify the content editor window loads +- verify the main content domains are listed: + - NPCs + - Dialogues + - Monsters + - Items + - Abilities + - Loot Tables + - Quests + - Graphics + - Factions + +### 3. Content Record Edit Round Trip + +- open any existing content record +- change one small field value +- use `Commit` +- use `Save` +- verify the save status updates +- revert the field to its original value +- save again so the repository returns to its original content state + +### 4. Studio Window Opens + +- open the studio from the launcher +- verify the studio bootstraps into a world without console-blocking errors + +### 5. World Loads And A Tile Edit Still Works + +- verify the current world name and dimensions are visible +- select a tile +- paint one tile on the map +- verify undo/save state updates +- save the world +- revert the tile change before finishing the checkpoint + +### 6. Graphics Painter Opens And Saves + +- open the graphics browser from the studio +- open a sprite or tile asset in the painter +- change one pixel +- save the asset +- revert the pixel change before finishing the checkpoint + +## Verification Notes + +Checkpoint commits for Arc 1 should only be considered shareable when: + +- `npm test` passes +- `npm run build` passes +- this checklist passes +- temporary smoke-test content edits have been reverted before commit diff --git a/src/WorldshaperLauncher.tsx b/src/WorldshaperLauncher.tsx index 22d1196..0cec1cb 100644 --- a/src/WorldshaperLauncher.tsx +++ b/src/WorldshaperLauncher.tsx @@ -683,6 +683,16 @@ function openSharedContractNote(): void { window.location.assign(noteUrl.toString()); } +function openContentEditor(): void { + const editorUrl = new URL("./worldshaper-content.html", window.location.href); + const popup = window.open(editorUrl.toString(), "worldshaper-content-editor", "popup=yes,width=1600,height=980,resizable=yes,scrollbars=yes"); + if (popup) { + popup.focus(); + return; + } + window.location.assign(editorUrl.toString()); +} + function openAdminPanelWindow(): boolean { const nextUrl = new URL(window.location.href); nextUrl.searchParams.set("admin", "requests"); @@ -1364,6 +1374,9 @@ function WorldshaperLauncher() { + diff --git a/src/contentMain.tsx b/src/contentMain.tsx new file mode 100644 index 0000000..9f2cb63 --- /dev/null +++ b/src/contentMain.tsx @@ -0,0 +1,11 @@ +import { StrictMode } from "react"; +import { createRoot } from "react-dom/client"; +import "./index.css"; +import "./App.css"; +import App from "./App"; + +createRoot(document.getElementById("root")!).render( + + + , +); diff --git a/vite.config.ts b/vite.config.ts index 6d59436..e66638d 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -28,6 +28,7 @@ export default defineConfig({ rollupOptions: { input: { main: resolve(__dirname, "index.html"), + worldshaperContent: resolve(__dirname, "worldshaper-content.html"), futureSharedContract: resolve(__dirname, "Future - Shared Contract.html"), worldshaperStudio: resolve(__dirname, "worldshaper-studio.html"), worldshaperHeightViewer: resolve(__dirname, "worldshaper-height-viewer.html"), diff --git a/worldshaper-content.html b/worldshaper-content.html new file mode 100644 index 0000000..bc30fa2 --- /dev/null +++ b/worldshaper-content.html @@ -0,0 +1,13 @@ + + + + + + + Worldshaper Content Editor + + +
+ + +