Commit Graph

330 Commits

Author SHA1 Message Date
SpecialX
048fc1c386 feat(attendance): add correlation, trend, warnings, report print, and services
- Add attendance-grade-correlation-card and data-access-correlation, correlation-compute

- Add attendance-trend-chart and trend-compute for trend analysis

- Add attendance-warnings-card and warning-compute for attendance warnings

- Add attendance-report-print for printable reports

- Add class-comparison-card for class attendance comparison

- Add notifications and services directory
2026-07-03 10:24:16 +08:00
SpecialX
7567f317e1 feat(modules): add leave-requests, invitation-codes, and standards modules
- Add leave-requests module for staff and student leave request management

- Add invitation-codes module for class invitation code generation and redemption

- Add standards module for curriculum standards management
2026-07-03 10:24:07 +08:00
SpecialX
ac1de9e433 feat(rbac): add role-based access control module
- Add RBAC module with data-access, schema, types, and components for role and permission management
2026-07-03 10:23:56 +08:00
SpecialX
cee7bbfd7a feat(scripts): add ollama provider, grade5 chinese seed, i18n fix, and l9 deps scripts
- Add add-ai-provider-ollama for Ollama AI provider setup

- Add seed-grade5-chinese for grade 5 Chinese content seeding

- Add temp-i18n-zh-fix for Chinese i18n fixes

- Add _l9_deps module dependency analysis
2026-07-03 10:23:47 +08:00
SpecialX
89b9e181d2 docs(audit): add audit reports for grades, homework, lesson-preparation, messaging, permissions, question-bank, settings, textbooks
- Add grades-audit-report

- Add homework-audit-report and homework-exams-audit-report

- Add lesson-preparation-audit-report-v3 and v4

- Add messaging-audit-report

- Add permissions-audit-report

- Add question-bank-audit-report

- Add settings-profile-audit-report-v3

- Add textbooks-audit-report-v3
2026-07-03 10:23:34 +08:00
SpecialX
365c36d97b feat(db): add migrations for RBAC, diagnostic, messaging, attendance, leave, invitation codes
- 0011: RBAC role flags and seed data

- 0012: diagnostic grade_id

- 0013: message recall

- 0014: message templates

- 0015: group messages and message reports/blocks

- 0016: invitation codes

- 0017: draft device sync

- 0018: attendance status reason

- 0019: attendance warning thresholds

- 0020: leave requests

- 0021: attendance period
2026-07-03 10:23:24 +08:00
SpecialX
48829bd02b chore(config): update vitest config, add vercel.json and manifest
- Update vitest.config.ts

- Add vercel.json for deployment configuration

- Add PWA manifest
2026-07-03 10:23:13 +08:00
SpecialX
e27efb6282 feat(exams): update question bank list, rich form, and selection toolbar
Some checks failed
Security / deep-security-scan (push) Failing after 2m23s
DR Drill / dr-drill (push) Failing after 11m59s
CI / scheduled-backup (push) Failing after 37s
CI / backup-verify (push) Has been skipped
CI / weekly-dr-drill (push) Failing after 0s
CI / build-deploy (push) Has been cancelled
CI / security-scan (push) Has been cancelled
- Update question-bank-list component for exam assembly

- Update exam-rich-form for rich text exam editing

- Update selection-toolbar for editor selection actions
2026-06-24 15:37:10 +08:00
SpecialX
90f7d395f2 fix(exams): fix toolbar tracking and prevent list-to-options for non-choice questions
Two fixes:

1. Selection toolbar tracking: add pointerup listener so the toolbar
   updates its position immediately after the user finishes dragging
   the selection, not just on selectionUpdate events which can lag.

2. List-to-options conversion: parseOptions now only converts
   orderedList/bulletList to A/B/C options for choice question types
   (single_choice, multiple_choice, judgment). For text/composite
   questions, list content is preserved as part of the question stem
   text, preventing unwanted 'A.' prefixes.
2026-06-24 15:13:49 +08:00
SpecialX
e9429935b9 revert: roll back to ccf6c03 state (composite sub-questions preserved)
Reverts the following commits that broke composite question handling:
- 85661a5 auto-detect composite sub-questions from text patterns
- 064b3cf use slice to preserve full content when wrapping selections
- 2562de7 remove isolating to allow nested question blocks

Restores the working state from ccf6c03 where:
- wrapInQuestion fails gracefully in isolating nodes
- selected text is preserved when creating sub-questions
- composite question structure is intact
2026-06-24 15:01:56 +08:00
SpecialX
85661a5ba9 fix(exams): auto-detect composite sub-questions from text patterns
Root cause: When users paste reading comprehension content into a
composite question block without manually marking each sub-question
as a questionBlock, the sub-questions were treated as plain text and
merged into the question stem. This caused:
1. Sub-questions not showing in the preview's sub-question area
2. Text from different paragraphs being concatenated without newlines
3. "A." appearing because parseOptions misidentified list items

Fix:
1. extractText now inserts newlines between paragraphs/listItems,
   preserving text structure so pattern detection can work
2. Added detectSubQuestionsFromText: for composite questions without
   explicit questionBlock children, auto-detect sub-questions from
   text patterns:
   - Numbered lines: "1.xxx", "2.xxx", "(1)xxx", "①xxx"
   - Lines with score markers: "xxx(3分)"
   - If numbered sub-questions are found, check preceding lines for
     un-numbered sub-questions (e.g., the first sub-question that
     lacks a number but has a score marker)
3. extractMaterialText removes detected sub-question text from the
   question stem, keeping only the reading material/passage

This allows users to paste reading comprehension content directly
into a composite question block and have sub-questions automatically
detected, without needing to manually mark each one.
2026-06-24 14:53:05 +08:00
SpecialX
064b3cf736 fix(exams): use slice to preserve full content when wrapping selections
Root cause: wrapIn (Tiptap's built-in command) can fail or lose content
when the selection spans multiple paragraphs or partial paragraphs. When
users selected a long reading passage and clicked "复合" (composite),
the content was destroyed — only fragments remained.

Fix: replace wrapIn with a manual slice-based approach:
1. Use doc.slice(from, to) to get the complete node structure of the
   selection (preserves paragraphs, lists, images, etc.)
2. deleteRange to remove the original selection
3. insertContentAt to insert a new questionBlock/groupBlock/sectionBlock
   containing the sliced content

This is more reliable than wrapIn because it doesn't depend on
ProseMirror's wrapping logic, which has edge cases with multi-paragraph
selections. The slice API captures the exact node structure, so no
content is lost.

Applied to all three wrapping operations:
- insertQuestion (questionBlock)
- insertGroup (groupBlock)
- insertSection (sectionBlock)
2026-06-24 14:37:01 +08:00
SpecialX
2562de76b7 fix(exams): remove isolating to allow nested question blocks
Root cause: questionBlock/groupBlock/sectionBlock had `isolating: true`,
which prevents ProseMirror operations (wrapIn, insertContentAt) from
inserting nodes inside these blocks. When users selected text inside a
composite question and clicked "填空/简答" to create a sub-question,
the new questionBlock was inserted OUTSIDE the composite block instead
of inside it, so buildQuestion couldn't detect it as a subQuestion.

Fix: remove `isolating: true` from all three block extensions. The
`defining: true` property is sufficient to maintain node boundaries
during normal editing operations.

This allows wrapInQuestion to work correctly inside composite questions,
creating properly nested sub-question blocks that are detected by
buildQuestion's recursive parsing.
2026-06-24 14:33:04 +08:00
SpecialX
ccf6c03096 fix(exams): preserve selected text when wrapIn fails in isolating nodes
When wrapIn fails inside isolating nodes (e.g. composite question block),
the previous fallback used insertContent which replaced the entire
selection with an empty questionBlock, causing other sub-questions to
disappear and content to be cleared.

New approach: when wrapIn fails, extract the selected text, delete the
selection, then insert a new node (questionBlock/groupBlock/sectionBlock)
containing the selected text as paragraphs. This preserves the content
and converts it into the desired structure.

Applied to all three wrap operations:
- insertQuestion (questionBlock)
- insertGroup (groupBlock)
- insertSection (sectionBlock)
2026-06-24 14:24:04 +08:00
SpecialX
df9561128b fix(exams): fix duplicate React keys and composite question marking
- Fix parseOptions: deduplicate option ids within a single question to
  avoid multiple "A" keys when a question contains multiple lists
- Fix ExamPreview: use composite keys (questionId-optId, questionId-sub-id)
  to ensure global uniqueness across questions
- Fix selection-toolbar: when wrapInQuestion fails inside isolating nodes
  (e.g. composite question block), fall back to insertQuestion instead of
  silently doing nothing
2026-06-24 14:19:46 +08:00
SpecialX
1f28efbeb6 feat(exams): add section/group structure nodes with auto stats
Distinguish structural levels from questions:
- sectionBlock (new): top-level volume like "第Ⅰ卷 选择题(共24分)"
- groupBlock (enhanced): section like "一、选择题" with instruction field
- questionBlock (composite): reserved for reading comprehension

Key changes:
- New section-block.tsx extension with level attr (1=卷, 2=部分) and
  auto-computed question count + total score in NodeView
- group-block.tsx: add instruction field ("每小题3分"), auto stats display
- editor-to-structure.ts: recursive buildStructureNode supports arbitrary
  nesting (section > group > question), computeStats accumulates scores
- exam-rich-form.tsx ExamPreview: render section/group/question with
  distinct styles and stats badges
- selection-toolbar.tsx: add "分卷" button (Layers icon)
- exam-rich-editor.tsx: register SectionBlock, expose insertSection/
  wrapInSection via ref
- actions.ts: AI prompt now outputs volumes[] + groups[] structure with
  instruction; buildTiptapDocFromAiResponse generates nested sectionBlock
- i18n: add markSection keys (zh-CN/en)

Structural nodes are NOT questions: their question count and total score
are automatically computed from child questions, not manually set.
2026-06-24 14:07:29 +08:00
SpecialX
f260720443 fix(exams): fix composite question sub-questions not showing in preview
- Fix buildQuestion in editor-to-structure.ts: recursively detect nested
  questionBlock nodes as subQuestions (composite questions now properly
  extract child questions instead of treating them as plain text)
- Fix buildQuestionBlock in actions.ts: AI auto-mark now generates nested
  questionBlock nodes for sub-questions instead of plain paragraphs, so
  they are properly structured and detectable by the parser
- Rewrite ExamPreview component with proper layout:
  - Question header: number + type label badge + score
  - Indented question text and options
  - Composite sub-questions shown in nested block with left border
  - Image thumbnails
  - Empty state message
  - Title centered at top
  - Group titles with bottom border
2026-06-24 13:54:24 +08:00
SpecialX
7380f1e6c8 fix(exams): fix rich editor crashes and redesign form layout
- Fix groupBlock/questionBlock insertContent error: empty content violates
  schema "block+", now provide default empty paragraph
- Fix buildTiptapDocFromAiResponse: ensure groupBlock/questionBlock always
  have content (fallback to empty paragraph)
- Add wrapInGroup/wrapInQuestion commands to wrap selected text into
  question/group blocks (vs insert which creates empty blocks)
- Update SelectionToolbar: use wrap when text selected, insert when not
- Redesign exam-rich-form layout:
  - Merge basic info into single-row toolbar (title/subject/grade/difficulty/score/duration)
  - Remove separate "source text" textarea (user pastes directly in editor)
  - AI auto-mark now reads from editor content via getText()
  - Editor + preview takes full height (calc(100vh-180px))
- Enhance AI prompt for Chinese exam papers:
  - Support reading material (阅读理解选段)
  - Support dotted chars (加点字注音)
  - Support sub-questions (阅读理解小题)
  - Better type detection (single/multiple choice, judgment, fill, essay, composite)
- Add splitByDottedTexts helper to mark dotted chars in Tiptap doc
- Add i18n keys for titlePlaceholder, editorArea description
2026-06-24 13:41:39 +08:00
SpecialX
d1e4ccbf98 refactor(exams): redesign exam creation page with 3-mode selector
- Replace cramped 3-column grid with vertical layout
- Add 3 large selectable cards at top: Manual / AI / Rich Text Editor
- Rich Text Editor mode redirects to /teacher/exams/new
- Basic info form is now always visible (not hidden in AI mode)
- Exam mode config always visible at bottom
- Add "rich" to mode enum with validation bypass
- Replace all hardcoded English/Chinese strings with i18n keys
- Add 20+ new i18n keys to zh-CN and en (mode labels, descriptions, actions)
- Clean up mixed-language UI text
2026-06-24 13:23:13 +08:00
SpecialX
6114607c1e feat(exams,homework): add rich text exam editor and scan-based grading
- Add Tiptap-based rich text editor with custom extensions (dotted-mark,
  blank-node, image-node, group-block, question-block) for exam creation
- Add AI auto-marking action to convert pasted exam text to structured editor doc
- Add resizable split-panel layout for editor + live preview
- Add student scan upload (photo of paper answers) with drag-drop and reorder
- Add scan image viewer with zoom/rotate/fullscreen for teachers
- Add scan grading view with side-by-side questions and scan images
- Add /teacher/exams/new and /teacher/homework/submissions/[id]/scan-grading routes
- Fix getScansAction to support both teacher (HOMEWORK_GRADE) and student
  (HOMEWORK_SUBMIT) permission scopes
- Add i18n keys for rich editor, scan upload, and scan grading (zh-CN/en)
- Sync architecture diagrams (004/005) with new modules, routes, and deps
2026-06-24 13:16:33 +08:00
SpecialX
0c64219cb8 docs: add exam rich editor and photo grading design plan
Some checks failed
CI / scheduled-backup (push) Has been skipped
CI / backup-verify (push) Has been skipped
CI / weekly-dr-drill (push) Failing after 1s
CI / build-deploy (push) Has been cancelled
CI / security-scan (push) Has been cancelled
- Add design plan for exam rich text editor and photo-based grading feature
2026-06-24 12:04:26 +08:00
SpecialX
1f833097e2 feat(shared): add errors lib, question-content, and update permissions and UI
- Add errors lib for standardized error handling

- Add question-content lib for question content processing

- Update action-utils, ai/provider-config, auth-guard, permissions, types/permissions

- Update UI sheet component

- Update proxy middleware
2026-06-24 12:04:09 +08:00
SpecialX
e3b8455b31 feat(i18n): add new i18n message files and update request config
- Add new i18n message files: audit, course-plans, files, leave, nav, practice, scheduling, student, users

- Update existing i18n messages: ai, attendance, common, diagnostic, elective, error-book, exam-homework, grades, lesson-preparation, school, settings

- Update i18n request config for new locale handling
2026-06-24 12:04:01 +08:00
SpecialX
37d2688a28 feat(app): add lesson-plans, practice, and grade dashboard routes
- Add admin/lesson-plans, parent/lesson-plans, student/lesson-plans routes

- Add student/practice and teacher/practice routes for adaptive practice

- Add management/grade/dashboard and management/grade/practice routes

- Add teacher/lesson-plans error and loading boundaries

- Update existing admin, parent, student, teacher pages with new features

- Update globals.css and proxy middleware
2026-06-24 12:03:47 +08:00
SpecialX
8c2fe14c20 refactor(modules): update classes, course-plans, diagnostic, questions, settings, student, layout
- Update classes data-access (invitations, main) for invitation management

- Update course-plans actions, data-access, and types

- Update diagnostic data-access for report queries

- Update questions data-access for question bank queries

- Update settings actions, ai-provider-settings-card, data-access, and types

- Update student course-filters, student-courses-view, student-schedule-filters, student-schedule-view

- Update layout app-sidebar, site-header, and navigation config
2026-06-24 12:03:35 +08:00
SpecialX
c9e46f9f80 feat(school): add grade dashboard and insights filters
- Add grade-dashboard components directory for school-wide grade analytics

- Add grade-insights-filters component for filtering grade insights

- Update grades-view and data-access
2026-06-24 12:03:22 +08:00
SpecialX
f0f713ff33 feat(exams,homework): add error collection data-access for error book integration
- Add data-access-error-collection in exams module for collecting wrong exam answers

- Add data-access-error-collection in homework module for collecting wrong homework answers

- Update exams actions, exam-ai-generator, data-access, and types

- Update homework actions and data-access-write
2026-06-24 12:03:03 +08:00
SpecialX
0cee93676b feat(grades): add scope-check and update analytics
- Add scope-check lib for grade data access scope validation

- Update actions, actions-analytics, data-access, data-access-analytics

- Update batch-grade-entry, schema, and types
2026-06-24 12:02:50 +08:00
SpecialX
6bc113eaff feat(lesson-preparation): add readonly view, anchor node selector, and type guards
- Add lesson-plan-readonly-view for viewing published plans

- Add anchor-node-selector and textbook-segments for canvas anchor positioning

- Add i18n-errors and type-guards lib utilities

- Add lesson-plan-provider-setup for provider initialization

- Update actions, data-access (knowledge, versions, main), publish-service

- Update blocks (blackboard, exercise, homework, import, key-point, objective, reflection)

- Update editor, node-editor, node-edit-panel, pickers, and providers
2026-06-24 12:02:42 +08:00
SpecialX
a48e7d0e27 feat(ai): add chart renderer, floating ball hook, and provider updates
- Add ai-chart-renderer for rendering charts in AI responses

- Add use-floating-ball hook for draggable AI assistant widget

- Update ai-assistant-widget, ai-chat-panel, ai-markdown-renderer, ai-provider-selector

- Update use-ai-chat-stream hook and prompt-templates service
2026-06-24 12:02:29 +08:00
SpecialX
61e76f0d67 feat(error-book): add analytics stats, charts, and error collection
- Add analytics-stats-cards, chapter-weakness-chart, class-error-bar-chart

- Add knowledge-point-weakness-chart, subject-distribution-chart, subject-tabs

- Add class-filter and grouped-student-error-table components

- Add data-access-collection for error aggregation from multiple sources

- Update error-book-detail-dialog, data-access, and types
2026-06-24 12:02:16 +08:00
SpecialX
d7876c5854 feat(adaptive-practice): add new adaptive practice module
- Add adaptive practice module with data-access, schema, types, and components

- Provides personalized practice based on student performance and error patterns
2026-06-24 12:02:04 +08:00
SpecialX
9783be58c0 feat(scripts): add diagnostic, seed, and test scripts
- Add add-ai-provider-visibility and add-missing-columns migration scripts

- Add clear-error-book, seed-error-book, diagnose-error-book scripts

- Add diagnose-tables and create-missing-tables scripts

- Add test-failing-modules and test-teacher-pages test scripts
2026-06-24 12:01:54 +08:00
SpecialX
e4254f0f8e docs: update architecture map and add lesson-preparation usage fixes design
- Update architecture impact map (004) and data (005) with new modules

- Add lesson-preparation usage fixes design spec

- Add teacher web test post-audit report
2026-06-24 12:01:35 +08:00
SpecialX
9d87388524 feat(db): add grade_record_answers migration and update schema
- Add migration 0010 for grade_record_answers table

- Update shared DB schema with new table definitions
2026-06-24 12:01:26 +08:00
SpecialX
eb28a523cb chore(config): update ESLint config and dependencies
- Update eslint.config.mjs rules

- Update package.json and package-lock.json dependencies
2026-06-24 12:01:09 +08:00
SpecialX
7e320d78c1 feat(ai): 统一 AI 配置入口到 /admin/ai-settings
## 新增
- 创建 /admin/ai-settings 统一配置页(AiProviderSettingsCard + AiUsageDashboard)
- admin 侧边栏新增"AI 配置"菜单项(权限 AI_CONFIGURE,图标 Sparkles)
- 新增 deleteAiProvider 数据访问层(事务删除 + 自动转移默认)
- 新增 deleteAiProviderAction Server Action(Zod 校验 + 权限校验)
- AiProviderSettingsCard 新增删除按钮(AlertDialog 确认 + destructive 变体)
- 新增 i18n 翻译键(delete/deleteConfirm/deleteSuccess 等,zh-CN + en)

## 移除
- 从 /settings 移除 AI 标签页(原 VALID_TABS 含 "ai",现仅 4 标签页)
- 从考试页面移除 AI 配置弹窗(Dialog + AiProviderSettingsCard 内嵌)
- 从 ai-provider-selector.tsx 移除配置弹窗(managePanel/manageOpen props)
- 移除 settings-view.tsx 中 canConfigureAi 逻辑和未使用 import

## 变更
- 考试页面"管理"按钮改为 Link 跳转到 /admin/ai-settings
- ai-provider-selector.tsx"管理"按钮改为 Link 跳转到 /admin/ai-settings
- exam-form.tsx 移除 providerDialogOpen/providerDialogKey 状态
- 修正架构文档 004 中 Action 命名(getAiProvidersAction → getAiProviderSummaries 等)

## 架构文档同步
- 004 更新 settings 模块章节(V3 标记/修正 Action 名称/新增 deleteAiProvider)
- 005 新增 deleteAiProviderAction 节点 + /admin/ai-settings 路由
2026-06-23 19:33:28 +08:00
SpecialX
d884c6d513 test: update and add E2E, integration, visual, and webapp tests
Some checks failed
CI / scheduled-backup (push) Failing after 36s
CI / backup-verify (push) Has been skipped
CI / weekly-dr-drill (push) Failing after 0s
CI / build-deploy (push) Has been cancelled
CI / security-scan (push) Has been cancelled
- Update E2E tests: announcements, auth, auth-business-flow, full-route-regression, grades, navigation, smoke-auth, teacher-web-test

- Update integration tests: api-ai-chat, api-onboarding-complete, api-onboarding-status, proxy-guard, integration setup

- Update visual regression tests: admin-dashboard, homepage, student-dashboard, teacher-dashboard, visual config, helpers

- Update webapp tests: admin, parent, student full tests and debug scripts

- Add new webapp tests: announcements_messages, settings_profile, debug scripts

- Add webtest directory with test plans, screenshots, and diagnostic scripts
2026-06-23 17:39:40 +08:00
SpecialX
f40ce0f560 refactor(auth): update auth configuration, env validation, and test mocks
- Update src/auth.ts auth configuration

- Update src/env.mjs environment variable validation

- Update exam-data and question-data mocks for testing
2026-06-23 17:39:32 +08:00
SpecialX
4f0ef217a0 refactor(modules): update existing module implementations across attendance, audit, auth, classes, course-plans, exams, files, homework, layout, proctoring, questions, scheduling, textbooks, users
- Update attendance components and data-access for record management

- Update audit log views, filters, and data-access

- Update auth login and register forms

- Update classes actions, components, and data-access (admin, schedule, stats)

- Update course-plans actions, form, list, progress, and schema

- Update exams actions, AI pipeline, preview components, and hooks

- Update files components (icon, list, preview, upload) and data-access

- Update homework assignment form, review view, auto-save hook, and stats-service

- Update layout sidebar, header, and navigation config

- Update proctoring actions, anti-cheat monitor, and data-access

- Update questions actions, components (dialog, actions, columns, filters), and data-access

- Update scheduling actions, auto-scheduler, components, and schema

- Update textbooks constants and text-selection hook

- Update users class-registration, import-dialog, data-access, and user-service
2026-06-23 17:38:56 +08:00
SpecialX
1a9377222c feat(app): add error/loading boundaries and update dashboard routes
- Add error.tsx and loading.tsx boundaries for admin, parent, student, teacher routes

- Add dashboard-error-fallback and dashboard-loading-skeleton components

- Add student/learning page, parent/leave routes, teacher textbook components

- Update existing app routes across auth, dashboard, and API endpoints

- Update proxy middleware and next-auth type declarations
2026-06-23 17:38:28 +08:00
SpecialX
c4d3433cc9 feat(shared): add UI components, hooks, form fields, and action utils
- Add UI components: confirm-delete-dialog, empty-table-row, list-pagination, pagination, status-badge

- Add form-fields directory for reusable form field components

- Add hooks: use-action-mutation, use-action-query for server action integration

- Add action-utils lib for action state helpers

- Update a11y components, charts, global-search, onboarding-gate, question components

- Update UI components: chip-nav, filter-bar, page-header, stat-card, stat-item, switch, table

- Update hooks: use-action-with-toast, use-aria-live, use-debounce, use-local-storage, use-media-query, use-permission

- Update lib: a11y, ai, audit-logger, auth-guard, bcrypt-utils, change-logger, download, excel, file-storage, http-utils, login-logger, password-policy, password-security-service, permissions, rate-limit, role-utils, search-params, session, storage-provider

- Update types: action-state, permissions

- Update i18n messages (en, zh-CN) for dashboard, diagnostic, grades, lesson-preparation, settings
2026-06-23 17:38:14 +08:00
SpecialX
9ceb2b7b67 feat(diagnostic): add export, stats service, and confidence utils
- Add export module for diagnostic report data export

- Add stats-service for diagnostic analytics aggregation

- Add confidence-utils for diagnostic confidence score calculations
2026-06-23 17:37:58 +08:00
SpecialX
1abf58c0b6 feat(parent): add attention banner, export button, and grade detail
- Add parent-attention-banner for highlighting items needing attention

- Add parent-export-button for data export capability

- Add child-grade-detail component for detailed grade viewing

- Update existing child-card, child-detail-header, child-grade-summary, child-schedule-card

- Update parent-children-data-page and data-access
2026-06-23 17:37:49 +08:00
SpecialX
95145cd03b feat(grades): add ranking trend, school-wide summary, score cell, and scope filter
- Add ranking-trend-card and school-wide-summary-card for broader analytics

- Add score-cell and grade-filters components for table rendering

- Add scope-filter and type-guards lib utilities for grade data filtering

- Update actions, data-access (analytics, ranking, main), stats-service, export

- Update schema, types, and grade-utils lib

- Update all grade chart and report components (distribution, trend, comparison, query)
2026-06-23 17:37:32 +08:00
SpecialX
2197e68069 feat(lesson-preparation): add anchor canvas design, new blocks, and textbook content node
- Add anchor injector for canvas-based anchor positioning

- Add new block components: blackboard, homework, import, key-point, new-teaching, objective, summary

- Add textbook content node for React Flow canvas

- Update actions (kp, publish, main), data-access (templates, versions, main)

- Update editor, node-editor, block-renderer, and picker components

- Update schema, types, hooks, and lib utilities (document-migration, node-summary, rf-mappers)
2026-06-23 17:37:19 +08:00
SpecialX
1fcef5c3aa feat(settings): add security center, 2FA/TOTP, avatar upload, system settings
- Add TOTP implementation and two-factor data-access for 2FA enrollment

- Add security center card with password policy and session management

- Add avatar upload action and component

- Add system settings actions and data-access (actions-system-settings, data-access-system-settings)

- Add notification preferences and service actions

- Add security-utils and student-overview-data with tests

- Update existing settings views, data-access, and types for new features
2026-06-23 17:37:06 +08:00
SpecialX
242a770cc9 feat(onboarding): add onboarding module with actions and data access
- Add server actions for onboarding flow orchestration

- Add data-access layer for onboarding state persistence

- Add type definitions for onboarding module
2026-06-23 17:36:56 +08:00
SpecialX
bf056399c6 feat(error-book): implement error book module with SM2 spaced repetition
- Add SM2 algorithm implementation with tests for spaced repetition review scheduling

- Add data-access, schema, types, and server actions for error book CRUD

- Add components: add dialog, class overview, filters, item card, stats cards, review buttons, top wrong questions

- Add error-book routes for admin, teacher, parent, and student roles

- Add i18n messages (en, zh-CN) for error book module
2026-06-23 17:36:42 +08:00
SpecialX
396c2c568d feat(db): update database migrations and schema relations
- Update drizzle migrations (0000, 0001, 0002) and meta snapshots

- Update DB relations definition
2026-06-23 17:36:30 +08:00