1
0
Fork 0
Code Issues Pull requests Projects Releases Packages Wiki Activity Actions Pages

restore content editor launcher entrypoint

This commit is contained in:
super-jalawii 2026-06-27 11:10:27 -04:00
parent e79bc2e339
commit 656f4562c1
5 changed files with 113 additions and 0 deletions

View file

@ -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

View file

@ -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() {
<button type="button" className="launcher-primary-btn" onClick={() => void handleLaunch()} disabled={isBusy}>
Launch
</button>
<button type="button" className="launcher-secondary-btn" onClick={openContentEditor} disabled={isBusy}>
Content Editor
</button>
<button type="button" className="launcher-secondary-btn" onClick={openSharedContractNote} disabled={isBusy}>
Shared Contract
</button>

11
src/contentMain.tsx Normal file
View file

@ -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(
<StrictMode>
<App />
</StrictMode>,
);

View file

@ -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"),

13
worldshaper-content.html Normal file
View file

@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Worldshaper Content Editor</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/contentMain.tsx"></script>
</body>
</html>