preview: pretend homeserver for the dev preview, in-page and off by default
src/preview-demo answers a demo.invalid homeserver from fixtures through a guarded fetch; own-origin requests pass, every other origin is refused (fetch, WebSocket, XHR, beacon). Built in only with VITE_PREVIEW_DEMO=1 and switched on by previewDemo in config.json (scripts/preview-config.js --demo, run by the dev workflow). Login prefills 'demo'. Pose art: 24 downscaled thumbnails in preview-demo/poses, copied into dist by the workflow. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
0f3494217e
commit
7a896c5f93
34 changed files with 887 additions and 8 deletions
7
.github/workflows/rat-dev-preview.yml
vendored
7
.github/workflows/rat-dev-preview.yml
vendored
|
|
@ -22,10 +22,13 @@ jobs:
|
|||
- name: Build app
|
||||
env:
|
||||
CINNY_BASE: /void/rat-dev/
|
||||
VITE_PREVIEW_DEMO: '1'
|
||||
NODE_OPTIONS: '--max_old_space_size=3072'
|
||||
run: npm run build
|
||||
- name: Set background scene tier
|
||||
run: node scripts/preview-config.js low
|
||||
- name: Set background scene tier and the pretend homeserver
|
||||
run: node scripts/preview-config.js low --demo
|
||||
- name: Add the demo pose art
|
||||
run: mkdir -p dist/public/poses && cp -r preview-demo/poses/. dist/public/poses/
|
||||
- name: Upload artifact
|
||||
# v3 protocol: the v4 client keeps only the origin of ACTIONS_RESULTS_URL, dropping this forge's /forge subpath
|
||||
# (nginx 404 page, runs 170-171), and upstream v4+ refuses non-GitHub servers outright (run 169).
|
||||
|
|
|
|||
Loading…
Reference in a new issue