55 lines
2.0 KiB
Markdown
55 lines
2.0 KiB
Markdown
---
|
||
id: TASK-118.1
|
||
title: Build shared folk-applet-catalog.ts component
|
||
status: Done
|
||
assignee: []
|
||
created_date: '2026-03-16 00:05'
|
||
updated_date: '2026-03-16 00:21'
|
||
labels:
|
||
- multiplayer
|
||
- ui
|
||
- shared
|
||
milestone: Multiplayer Everything
|
||
dependencies: []
|
||
parent_task_id: TASK-118
|
||
priority: high
|
||
---
|
||
|
||
## Description
|
||
|
||
<!-- SECTION:DESCRIPTION:BEGIN -->
|
||
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)
|
||
<!-- SECTION:DESCRIPTION:END -->
|
||
|
||
## Acceptance Criteria
|
||
<!-- AC:BEGIN -->
|
||
- [x] #1 Catalog modal shows all registered modules with icon, name, description
|
||
- [x] #2 Space owners can toggle modules on/off with immediate effect
|
||
- [x] #3 Non-owners see read-only view of enabled modules
|
||
- [x] #4 App switcher updates when modules are toggled
|
||
- [x] #5 Works in demo mode with local-only toggle (no API call)
|
||
<!-- AC:END -->
|
||
|
||
## Final Summary
|
||
|
||
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
|
||
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.
|
||
<!-- SECTION:FINAL_SUMMARY:END -->
|