Skip to content

feat(dashboard+ai): school-management widgets + KPI cards + AI chat companion - #65

Merged
rubenvdlinde merged 1 commit into
developmentfrom
feature/dashboard-widgets-ai-companion
May 12, 2026
Merged

feat(dashboard+ai): school-management widgets + KPI cards + AI chat companion#65
rubenvdlinde merged 1 commit into
developmentfrom
feature/dashboard-widgets-ai-companion

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Summary

  • KPI stat tiles (6 widgets): Courses, Cohorts, Learners, Active enrolments (lifecycle=active), Open attendance flags (lifecycle=open), Regulations — each fetches count via GET /apps/openregister/api/objects/scholiq/<schema>?_limit=1 and renders via CnStatsBlock (horizontal layout). Shows NcLoadingIcon while fetching; falls back to 0 on error.
  • Manage- list widgets* (3 widgets): Courses (name/lifecycle/lessonCount), Cohorts (name/learnerCount/programmeId), Programmes (name/lifecycle/courseCount) — parameterised ManageListWidget.vue fetches top-6 objects and provides a "+ New" link to the index route.
  • My mandatory training widget: fetches learner's enrolments with mandatory=true, lifecycle__in=pending,active, sorted by dueDate; each row has a "Start" link to the lesson player.
  • AI chat companion: CnAiCompanion is auto-mounted by CnAppRoot (no manual wiring required per the component docs). ScholiqToolProvider was already registered in Application.php (PR feat(mcp-tools): ScholiqToolProvider — AI companion MCP tools #39). Added Assistant nav menu entry (icon-comment, section=settings) and a type: "chat" manifest page at /assistant so the companion has a full-page surface.
  • Dashboard architecture: all 4 dashboard pages (Dashboard, Compliance, LearnerHome, AdminHealth) converted from type:"dashboard" to type:"custom" with dedicated Vue wrapper components (ScholiqDashboard, ScholiqCompliance, ScholiqLearnerHome, ScholiqAdminHealth). This is required because CnDashboardPage's #widget-{id} scoped slots must be provided directly by the parent component — they cannot pass through CnPageRenderer's slot forwarding mechanism.

Gate results

  • node tests/validate-manifest.js: PASS (0 Ajv errors)
  • node tests/validate-json-strict.js: PASS
  • node tests/validate-register.js: PASS
  • ./vendor/bin/phpcs lib/: 44/44 clean
  • ./vendor/bin/phpstan analyse lib/: No errors
  • npm run lint: 0 errors (6 pre-existing warnings in untouched files)
  • npm run stylelint: clean (deprecation notices only)
  • npm run build: compiled with 4 pre-existing warnings (nc-vue library warnings + size warnings)

Test plan

  • Navigate to Dashboard (/) — verify 5 KPI tiles and 3 manage-list widgets render
  • Navigate to Compliance (/compliance) — verify Regulations + Attestations KPI tiles and "View in MyDash" button
  • Navigate to "My learning" (/learner) — verify mandatory training list renders
  • Navigate to App health (/admin/health) — verify health-stats + kpi-schemas widgets
  • Verify AI chat FAB appears (requires OR chat health endpoint returning 200)
  • Navigate to Assistant (/assistant) — verify chat page renders

🤖 Generated with Claude Code

@rubenvdlinde
rubenvdlinde merged commit c0f37fb into development May 12, 2026
34 of 48 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/scholiq @ 0e57395

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
composer ✅ 100/100
npm ✅ 429/429
PHPUnit
Newman
Playwright ⏭️

Quality workflow — 2026-05-12 17:09 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde
rubenvdlinde deleted the feature/dashboard-widgets-ai-companion branch August 14, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant