fix: skip landing pages — go straight to interactive demo app

Bare-domain rspace.online/{moduleId} now rewrites directly to demo
space instead of rendering marketing landing pages. Also removed
auto-show info panel on first visit — info panel now only opens
via the info button.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-04-15 11:38:36 -04:00
parent 0d5aeebd8e
commit 2b33479f7b
2 changed files with 2 additions and 21 deletions

View File

@ -4240,16 +4240,8 @@ const server = Bun.serve<WSData>({
const mod = allModules.find((m) => m.id === firstSegment); const mod = allModules.find((m) => m.id === firstSegment);
if (mod) { if (mod) {
// rspace.online/{moduleId} → show module landing page (or fallback to demo shell) // rspace.online/{moduleId} → go straight to demo interactive app
if (pathSegments.length === 1) { if (pathSegments.length === 1) {
if (mod.landingPage) {
const html = renderModuleLanding({
module: mod,
modules: getModuleInfoList(),
bodyHTML: mod.landingPage(),
});
return new Response(html, { headers: { "Content-Type": "text/html; charset=utf-8" } });
}
const rewrittenPath = `/demo/${firstSegment}`; const rewrittenPath = `/demo/${firstSegment}`;
const rewrittenUrl = new URL(rewrittenPath + url.search, `http://localhost:${PORT}`); const rewrittenUrl = new URL(rewrittenPath + url.search, `http://localhost:${PORT}`);
return app.fetch(new Request(rewrittenUrl, req)); return app.fetch(new Request(rewrittenUrl, req));

View File

@ -532,16 +532,7 @@ export function renderShell(opts: ShellOptions): string {
}); });
if (infoClose) infoClose.addEventListener('click', hideInfoPanel); if (infoClose) infoClose.addEventListener('click', hideInfoPanel);
// Auto-show info panel ONCE globally (first rApp visit ever), then only via info button // Info panel only shows when user clicks the info button — no auto-show.
function autoShowIfFirstVisit(mid) {
if (!mid || mid === 'rspace') return; // skip canvas
try {
if (localStorage.getItem('rapp_info_auto_shown')) return; // already shown once
if (!localStorage.getItem('encryptid_session')) return; // not logged in
localStorage.setItem('rapp_info_auto_shown', '1');
setTimeout(function() { showInfoPanel(mid); }, 800);
} catch(e) {}
}
// Hide info panel when switching tabs (but don't auto-show for new tabs) // Hide info panel when switching tabs (but don't auto-show for new tabs)
document.addEventListener('layer-view-mode', hideInfoPanel); document.addEventListener('layer-view-mode', hideInfoPanel);
@ -554,8 +545,6 @@ export function renderShell(opts: ShellOptions): string {
}); });
} }
// Auto-show on initial page load (only fires once globally)
autoShowIfFirstVisit('${escapeAttr(moduleId)}');
// Expose for tour integration // Expose for tour integration
window.__rspaceShowInfo = showInfoPanel; window.__rspaceShowInfo = showInfoPanel;