From 2c3f8568a31563e56ab2cef0dfd90b6b093357bc Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Thu, 2 Apr 2026 15:16:02 -0700 Subject: [PATCH 1/2] fix: use subdomain format {space}.rspace.online instead of path-based routing Space creation popup slug field now shows input followed by .rspace.online suffix instead of rspace.online/ prefix. Also fixes rtasks notification link and browser extension help text. Co-Authored-By: Claude Opus 4.6 --- browser-extension/options.html | 2 +- modules/rtasks/mod.ts | 2 +- shared/components/rstack-space-switcher.ts | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/browser-extension/options.html b/browser-extension/options.html index 3c409e9..3f0deb7 100644 --- a/browser-extension/options.html +++ b/browser-extension/options.html @@ -44,7 +44,7 @@
-
Your space name in the URL (e.g. "my-space" from rspace.online/my-space)
+
Your space name in the URL (e.g. "my-space" from my-space.rspace.online)
diff --git a/modules/rtasks/mod.ts b/modules/rtasks/mod.ts index 2404de4..b625997 100644 --- a/modules/rtasks/mod.ts +++ b/modules/rtasks/mod.ts @@ -353,7 +353,7 @@ routes.post("/api/spaces/:slug/tasks", async (c) => { // Notify space members about the new task import('../rinbox/agent-notify').then(({ sendSpaceNotification }) => { sendSpaceNotification(slug, `New Task: ${title.trim()}`, - `

${title.trim()}

${description ? `

${description}

` : ''}

Priority: ${priority || 'MEDIUM'}

View in rTasks

` + `

${title.trim()}

${description ? `

${description}

` : ''}

Priority: ${priority || 'MEDIUM'}

View in rTasks

` ).catch(() => {}); }).catch(() => {}); diff --git a/shared/components/rstack-space-switcher.ts b/shared/components/rstack-space-switcher.ts index e1809ea..b17f3a0 100644 --- a/shared/components/rstack-space-switcher.ts +++ b/shared/components/rstack-space-switcher.ts @@ -1335,8 +1335,8 @@ export class RStackSpaceSwitcher extends HTMLElement {
- rspace.online/ + .rspace.online
@@ -2265,13 +2265,13 @@ const CREATE_SPACE_MODAL_STYLES = ` /* Slug row */ .cs-slug-row { display: flex; align-items: center; gap: 0; } -.cs-slug-prefix { - padding: 9px 0 9px 12px; background: var(--rs-bg-hover, #171717); - border: 1px solid var(--rs-input-border, #404040); border-right: none; - border-radius: 8px 0 0 8px; font-size: 0.8rem; color: var(--rs-text-muted, #525252); +.cs-slug-input { border-radius: 8px 0 0 8px !important; } +.cs-slug-suffix { + padding: 9px 12px 9px 0; background: var(--rs-bg-hover, #171717); + border: 1px solid var(--rs-input-border, #404040); border-left: none; + border-radius: 0 8px 8px 0; font-size: 0.8rem; color: var(--rs-text-muted, #525252); white-space: nowrap; } -.cs-slug-input { border-radius: 0 8px 8px 0 !important; } .cs-slug-status { font-size: 0.72rem; min-height: 1.1em; margin-top: 3px; } .cs-slug-available { color: #34d399; } From 1cdbce0bcc6147304ee560b05ba9720766e380c1 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Thu, 2 Apr 2026 16:05:14 -0700 Subject: [PATCH 2/2] fix(shell): update space-switcher on landing pages to show user's space or demo Landing, module-landing, and sub-page-info pages showed a stale "Spaces" dropdown. Now checks encryptid_session and sets the switcher to {username}'s Space (logged in) or demo (logged out). Co-Authored-By: Claude Opus 4.6 --- server/landing.ts | 6 +++++- server/shell.ts | 8 ++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/server/landing.ts b/server/landing.ts index aa4e475..f7f9678 100644 --- a/server/landing.ts +++ b/server/landing.ts @@ -242,9 +242,10 @@ export function renderMainLanding(modules: ModuleInfo[]): string { import '/shell.js'; document.querySelector('rstack-app-switcher')?.setModules(${moduleListJSON}); - // Logged-in users: hide header demo btn, swap hero CTA to "Go to My Space" + // Logged-in users: hide header demo btn, swap hero CTA + space switcher try { var raw = localStorage.getItem('encryptid_session'); + var sw = document.querySelector('rstack-space-switcher'); if (raw) { var session = JSON.parse(raw); var hdrBtn = document.querySelector('.rstack-header__demo-btn'); @@ -256,7 +257,10 @@ export function renderMainLanding(modules: ModuleInfo[]): string { primary.textContent = 'Go to My Space'; primary.href = 'https://' + username + '.rspace.online/rspace'; } + if (sw) { sw.setAttribute('current', username); sw.setAttribute('name', username + "'s Space"); } } + } else { + if (sw) { sw.setAttribute('current', 'demo'); sw.setAttribute('name', 'demo'); } } } catch(e) {} diff --git a/server/shell.ts b/server/shell.ts index edc043a..0ebad7d 100644 --- a/server/shell.ts +++ b/server/shell.ts @@ -2262,6 +2262,7 @@ export function renderModuleLanding(opts: ModuleLandingOptions): string { document.querySelector('rstack-app-switcher')?.setModules(${moduleListJSON}); try { var raw = localStorage.getItem('encryptid_session'); + var sw = document.querySelector('rstack-space-switcher'); if (raw) { var session = JSON.parse(raw); if (session?.claims?.username) { @@ -2271,7 +2272,10 @@ export function renderModuleLanding(opts: ModuleLandingOptions): string { primary.textContent = 'Go to My Space'; primary.href = 'https://' + username + '.rspace.online/${escapeAttr(mod.id)}'; } + if (sw) { sw.setAttribute('current', username); sw.setAttribute('name', username + "'s Space"); } } + } else { + if (sw) { sw.setAttribute('current', 'demo'); sw.setAttribute('name', 'demo'); } } } catch(e) {} @@ -2597,6 +2601,7 @@ export function renderSubPageInfo(opts: SubPageInfoOptions): string { document.querySelector('rstack-app-switcher')?.setModules(${moduleListJSON}); try { var raw = localStorage.getItem('encryptid_session'); + var sw = document.querySelector('rstack-space-switcher'); if (raw) { var session = JSON.parse(raw); if (session?.claims?.username) { @@ -2606,7 +2611,10 @@ export function renderSubPageInfo(opts: SubPageInfoOptions): string { primary.textContent = 'Open in My Space'; primary.href = 'https://' + username + '.rspace.online/${escapeAttr(mod.id)}/${escapeAttr(subPage.path)}'; } + if (sw) { sw.setAttribute('current', username); sw.setAttribute('name', username + "'s Space"); } } + } else { + if (sw) { sw.setAttribute('current', 'demo'); sw.setAttribute('name', 'demo'); } } } catch(e) {}