2.2 KiB
2.2 KiB
Complete operations modules and AI analysis board
Goal
Finish the currently visible operations surface by making collaboration modules fully reachable from the workspace/dashboard and adding a real persisted AI analysis board that summarizes elder AI analysis history without fabricating data.
Requirements
- Keep the existing persisted collaboration modules for devices, notices, alerts, and family visible through permission-aware workspace navigation and dashboard entry points.
- Seed collaboration-module records idempotently for already-initialized local/demo organizations without overwriting operator-created records.
- Show an AI analysis board from persisted
elder_ai_analysesrows, joined to elder names, with permission-aware redaction for unavailable data scopes. - Restrict AI board access to users with
ai:read; never expose analysis content when underlying data-scope permissions are missing. - Preserve organization scoping for all data loads and route links, including slug-aware
/app/{organizationSlug}/...links. - Reuse existing module server operations and UI adapters; do not add new dependencies or fake/static operational data.
Acceptance Criteria
- Existing collaboration modules remain data-backed and reachable from unscoped and organization-scoped workspace routes.
- Existing workspaces with core resident data but no collaboration data receive missing default devices, notices, alerts, and family records on seed rerun.
- The dashboard can be viewed by users with collaboration or AI read permissions, not only core care/facility permissions.
- The dashboard renders collaboration queues/metrics only from persisted server queries and hides unavailable sections by permission.
- The dashboard renders an AI analysis board sourced from persisted analysis history when
ai:readis present. - AI analysis board items redact result content when
canViewAnalysisScopesdenies one or more stored data scopes. - Focused tests cover idempotent collaboration seeding and AI board redaction behavior.
pnpm type-checkand focused tests pass.
Notes
- Out of scope: background alert-rule execution, family portal/authentication, AI generation changes, and new database schema.