feat: add "Try Demo" button to all headers + revert landing page copy

- Add teal "Try Demo" button to rstack-header (right side, before identity)
- Button links to demo.rspace.online/{currentModule} for context-aware demo entry
- Hidden when already on the demo space (server-side conditional)
- Revert website/index.html to original copy, only updating CTA link + adding demo button
- Add demo button CSS to shell.css

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-02-25 19:10:04 -08:00
parent a5f8389239
commit 03c843254b
4 changed files with 65 additions and 0 deletions

View File

@ -0,0 +1,43 @@
---
id: TASK-64
title: r-prefix module slugs + landing page + clickable rStack header
status: Done
assignee: []
created_date: '2026-02-26 03:04'
updated_date: '2026-02-26 03:05'
labels:
- refactor
- routing
- shell
dependencies: []
references:
- server/index.ts
- shared/components/rstack-app-switcher.ts
- shared/components/rstack-tab-bar.ts
- shared/url-helpers.ts
- modules/*/mod.ts
priority: high
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
Rename all 23 module IDs from bare names to r-prefixed slugs (canvas→rspace, notes→rnotes, vote→rvote, etc.) so URLs are consistent with rApp branding. Root rspace.online/ now serves the landing page instead of redirecting to demo. rStack header in app switcher is now a clickable link. rSpace itself appears as a module peer alongside all other rApps.
<!-- SECTION:DESCRIPTION:END -->
## Acceptance Criteria
<!-- AC:BEGIN -->
- [x] #1 All 23 module IDs use r-prefix slugs (rspace, rnotes, rvote, etc.)
- [x] #2 Root rspace.online/ serves landing page (not redirect to demo)
- [x] #3 rStack header in app switcher dropdown is clickable (links to rstack.online)
- [x] #4 Space root redirects to /rspace instead of /canvas
- [x] #5 All internal navigation links updated to r-prefixed paths
- [x] #6 Badge maps in app switcher and tab bar use r-prefixed keys
- [x] #7 TypeScript compiles cleanly
<!-- AC:END -->
## Final Summary
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
Renamed all 23 module IDs to r-prefixed slugs across 33 files. Root domain now serves the landing page. rStack header is clickable. All badge maps, URL helpers, internal links, and redirects updated. Commit 4895af1, merged to main.
<!-- SECTION:FINAL_SUMMARY:END -->

View File

@ -78,6 +78,7 @@ export function renderShell(opts: ShellOptions): string {
<rstack-mi></rstack-mi>
</div>
<div class="rstack-header__right">
${spaceSlug !== "demo" ? `<a class="rstack-header__demo-btn" href="https://demo.rspace.online/${escapeAttr(moduleId)}">Try Demo</a>` : ""}
<rstack-identity></rstack-identity>
</div>
</header>

View File

@ -369,6 +369,7 @@
<rstack-mi></rstack-mi>
</div>
<div class="rstack-header__right">
<a class="rstack-header__demo-btn" href="https://demo.rspace.online/rspace">Try Demo</a>
<rstack-identity></rstack-identity>
</div>
</header>

View File

@ -55,6 +55,26 @@ body {
gap: 12px;
}
.rstack-header__demo-btn {
display: inline-flex;
align-items: center;
padding: 5px 14px;
border-radius: 6px;
font-size: 0.78rem;
font-weight: 600;
text-decoration: none;
white-space: nowrap;
transition: background 0.15s, opacity 0.15s;
background: linear-gradient(135deg, #14b8a6, #0d9488);
color: #fff;
box-shadow: 0 1px 4px rgba(20, 184, 166, 0.25);
}
.rstack-header__demo-btn:hover {
opacity: 0.88;
}
/* Hide the demo button when already on demo space */
.rstack-header__demo-btn[data-hide] { display: none; }
.rstack-header__brand {
display: flex;
align-items: center;