48 lines
1.6 KiB
Markdown
48 lines
1.6 KiB
Markdown
---
|
|
id: TASK-118.1
|
|
title: Build shared folk-applet-catalog.ts component
|
|
status: To Do
|
|
assignee: []
|
|
created_date: '2026-03-16 00:05'
|
|
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 -->
|
|
- [ ] #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)
|
|
<!-- AC:END -->
|