rspace-online/backlog/tasks/task-118.1 - Build-shared-f...

2.0 KiB
Raw Blame History

id title status assignee created_date updated_date labels milestone dependencies parent_task_id priority
TASK-118.1 Build shared folk-applet-catalog.ts component Done
2026-03-16 00:05 2026-03-16 00:21
multiplayer
ui
shared
Multiplayer Everything
TASK-118 high

Description

Create a reusable web component that renders the "Pull rApplet to rSpace" catalog modal.

Component: lib/folk-applet-catalog.ts

  • Fetches module list from GET /:space/modules API
  • Renders cards grid: icon, name, description, enabled toggle, scope badge
  • Toggle calls PATCH /:space/modules with updated enabledModules array
  • Accessible from space settings and a "+" button in the app switcher
  • Shows sync status indicator (multiplayer/local-only/external)
  • Requires space owner authentication to toggle; read-only for members

Shell integration: server/shell.ts

  • Add "+" button to app switcher nav that opens the catalog modal
  • Only visible to space owners (check ownerDID from space meta)

Files to create/modify:

  • lib/folk-applet-catalog.ts (new)
  • server/shell.ts (add catalog trigger button)
  • server/index.ts (register the new component JS)

Acceptance Criteria

  • #1 Catalog modal shows all registered modules with icon, name, description
  • #2 Space owners can toggle modules on/off with immediate effect
  • #3 Non-owners see read-only view of enabled modules
  • #4 App switcher updates when modules are toggled
  • #5 Works in demo mode with local-only toggle (no API call)

Final Summary

Built "Manage rApps" panel into the existing app switcher sidebar. Extends rstack-app-switcher with expandable catalog showing all modules (enabled + disabled). Space owners can toggle modules via + / buttons calling PATCH /api/spaces/:slug/modules. Shell passes full module list via setAllModules(). Demo mode has local-only fallback.