54 lines
1.4 KiB
Markdown
54 lines
1.4 KiB
Markdown
---
|
|
id: TASK-118.7
|
|
title: Add lightweight sync to rdata (shared analytics dashboard)
|
|
status: Done
|
|
assignee: []
|
|
created_date: '2026-03-16 00:06'
|
|
updated_date: '2026-03-16 00:50'
|
|
labels:
|
|
- multiplayer
|
|
- tier-3
|
|
milestone: Multiplayer Everything
|
|
dependencies: []
|
|
parent_task_id: TASK-118
|
|
priority: low
|
|
---
|
|
|
|
## Description
|
|
|
|
<!-- SECTION:DESCRIPTION:BEGIN -->
|
|
rdata is a privacy-first analytics dashboard. Add Automerge sync so space members share dashboard configuration and filter state.
|
|
|
|
## New files:
|
|
- `modules/rdata/schemas.ts` — DataDoc with dashboardConfig, savedViews, filterPresets
|
|
- `modules/rdata/local-first-client.ts` — CRUD: saveView, updateFilters, setConfig
|
|
|
|
## Schema:
|
|
```
|
|
DataDoc {
|
|
meta: { module: 'data', collection: 'dashboard', version: 1 }
|
|
savedViews: Record<string, { id, name, filters, dateRange, metrics[], createdBy }>
|
|
activeViewId: string
|
|
sharedFilters: { dateRange, granularity, segments[] }
|
|
}
|
|
```
|
|
|
|
## Component updates:
|
|
- Dashboard filter changes sync between viewers
|
|
- Saved views shared across space members
|
|
- "Follow" mode: one member's view reflected to all
|
|
<!-- SECTION:DESCRIPTION:END -->
|
|
|
|
## Acceptance Criteria
|
|
<!-- AC:BEGIN -->
|
|
- [ ] #1 Saved dashboard views sync across space members
|
|
- [ ] #2 Filter changes can optionally sync in real-time
|
|
- [ ] #3 Demo mode works with local-only state
|
|
<!-- AC:END -->
|
|
|
|
## Implementation Notes
|
|
|
|
<!-- SECTION:NOTES:BEGIN -->
|
|
schemas.ts + local-first-client.ts created
|
|
<!-- SECTION:NOTES:END -->
|