feat(ui): full UI layer + migrations + docker fixes #147

Merged
djalim merged 11 commits from PMPR-ui into develop 2026-04-27 17:00:56 +00:00
Collaborator

Summary

This PR implements the complete UI layer for PolyMPR, fixes several bugs, overhauds the migration system, and makes the Docker setup production-ready.

UI — implemented pages

Students

  • Closes #79 — Student list (promo filter, search)
  • Closes #80 — Promotion management (PromoBuilder)
  • Closes #81 — Import xlsx students (drag & drop zone, template download)
  • Closes #82 — Edit student

Notes

  • Closes #72 — Student – My Grades (grouped by UE/semester)
  • Closes #73 — Admin – Consult grades
  • Closes #74 — Admin – Import grades (.xlsx) (created from scratch)
  • Closes #78 — Admin – UE management

Administration

  • Closes #83 — User management
  • Closes #84 — Role management
  • Closes #85 — Role permissions (toggle cards, fix double-toggle bug)
  • Closes #86 — Permissions view (real DB data, was hardcoded)
  • Closes #87 — Module management
  • Closes #88 — Teachings (Assignments)

Bug fixes

  • Fix permission toggle: click was calling togglePerm twice due to nested inside
  • Fix permissions.ts: API was returning hardcoded data instead of querying the DB
  • Remove max-width: 960px from .page-content

Migration system overhaul

  • Add 0001_seed_permissions and 0002_update_permission_names with descriptive French labels
  • Register both migrations in _journal.json for proper drizzle-kit tracking
  • Replace docker-init.sh (raw psql, no tracking) with a dedicated migrate service using drizzle-kit
  • app now depends on migrate completing (service_completed_successfully)
  • Move drizzle-kit from devDependencies to dependencies so it's available in the prod image

Docker & infrastructure

  • Add .dockerignore (was missing — caused build failures due to local node_modules conflict)
  • Dockerfile: install Node.js + npm via apk, run npm install before COPY . .
  • compose.prod.yml: migrate service uses the app image with node to invoke drizzle-kit, restart: "no"
  • compose.test.yml: same migrate pattern, volumes and healthchecks aligned
  • .gitea/ workflows for lint, test (unit + integration/e2e), and deploy
Summary --- This PR implements the complete UI layer for PolyMPR, fixes several bugs, overhauds the migration system, and makes the Docker setup production-ready. UI — implemented pages Students - Closes #79 — Student list (promo filter, search) - Closes #80 — Promotion management (PromoBuilder) - Closes #81 — Import xlsx students (drag & drop zone, template download) - Closes #82 — Edit student Notes - Closes #72 — Student – My Grades (grouped by UE/semester) - Closes #73 — Admin – Consult grades - Closes #74 — Admin – Import grades (.xlsx) (created from scratch) - Closes #78 — Admin – UE management Administration - Closes #83 — User management - Closes #84 — Role management - Closes #85 — Role permissions (toggle cards, fix double-toggle bug) - Closes #86 — Permissions view (real DB data, was hardcoded) - Closes #87 — Module management - Closes #88 — Teachings (Assignments) Bug fixes - Fix permission toggle: click was calling togglePerm twice due to nested <label> inside <label> - Fix permissions.ts: API was returning hardcoded data instead of querying the DB - Remove max-width: 960px from .page-content Migration system overhaul - Add 0001_seed_permissions and 0002_update_permission_names with descriptive French labels - Register both migrations in _journal.json for proper drizzle-kit tracking - Replace docker-init.sh (raw psql, no tracking) with a dedicated migrate service using drizzle-kit - app now depends on migrate completing (service_completed_successfully) - Move drizzle-kit from devDependencies to dependencies so it's available in the prod image Docker & infrastructure - Add .dockerignore (was missing — caused build failures due to local node_modules conflict) - Dockerfile: install Node.js + npm via apk, run npm install before COPY . . - compose.prod.yml: migrate service uses the app image with node to invoke drizzle-kit, restart: "no" - compose.test.yml: same migrate pattern, volumes and healthchecks aligned - .gitea/ workflows for lint, test (unit + integration/e2e), and deploy
djalim added 7 commits 2026-04-27 15:31:35 +00:00
Mark all implemented endpoints as , document the 3-level test
architecture, and clarify that UI pages are the next priority.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add interactive island components and server partials for notes,
students, and admin modules, following the Figma prototype design.

- static/styles/ui.css: shared component library (buttons, tables,
  chips, cards, filters, tabs, form inputs)
- notes: NotesView (student grade view with UE cards, promo tabs,
  weighted averages), AdminConsultNotes, AdminUEs islands + partials
- students: ConsultStudents (list/filter/delete), AdminPromotions
  (CRUD) islands + partials
- admin: AdminModules, AdminUsers, AdminRoles islands + partials
- All partials use State type with unknown cast for session access

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- compose.prod.yml: production stack with registry image, healthcheck,
  migration service
- compose.test.yml: local test stack with source mount and LOCAL=true
- routes/dev-login.ts: fake admin JWT login, only active when LOCAL=true
- routes/_middleware.ts: expose /dev-login as public route

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat(notes): add XLSX import island and admin route

feat(upload): add drag‑and‑drop upload, template download, UI tweaks
style: format import success message and drop zone JSX
Check Deno code / Check Deno code (pull_request) Successful in 5s
Tests / Unit tests (pull_request) Successful in 12s
Tests / Integration tests (pull_request) Failing after 1m7s
378cbb0c06
Apply consistent string concatenation in ImportNotes and UploadStudents.
Format JSX drop zone for better readability.
Author
Collaborator

Also implements #76 (note edition per student) and #77 (grade recap per student) via /notes/edition/[numEtud] and /notes/recap/[numEtud] — same NoteRecap island, supports inline note editing, weighted UE average, and adjustments (create / update / reset).

Also implements #76 (note edition per student) and #77 (grade recap per student) via `/notes/edition/[numEtud]` and `/notes/recap/[numEtud]` — same `NoteRecap` island, supports inline note editing, weighted UE average, and adjustments (create / update / reset).
djalim added 2 commits 2026-04-27 16:42:49 +00:00
Add .dockerignore to exclude node_modules, .git, coverage, .env.
Update Dockerfile to install nodejs/npm, copy package.json, run npm install, and build.
Update compose.prod.yml to set working_dir, restart no, and use array command.
Move drizzle-kit from devDependencies to dependencies.
feat(fresh.gen.ts): add routes for notes edition, recap and island recap
Check Deno code / Check Deno code (pull_request) Failing after 5s
Tests / Unit tests (pull_request) Successful in 12s
Tests / Integration tests (pull_request) Failing after 1m17s
2c5e4ebf11
feat(notes): add NoteRecap island component for student grade recap

feat: add adjust controls to UI component

Add placeholder, value binding, onInput handler, apply/reset buttons,
and display of adjusted value.

feat(notes): add edition and recap pages, update styles and links
djalim added 1 commit 2026-04-27 16:56:17 +00:00
feat: add role_write permission and update e2e tests
Check Deno code / Check Deno code (pull_request) Failing after 5s
Tests / Unit tests (pull_request) Successful in 13s
Tests / Integration tests (pull_request) Successful in 1m12s
f162fcaadc
Add role_write permission to permissions table and update migrations.
Update e2e tests to use DB integration and seed permissions.
Add seedPermissions helper.
djalim added 1 commit 2026-04-27 16:58:38 +00:00
chore: formated tests
Check Deno code / Check Deno code (pull_request) Successful in 5s
Tests / Unit tests (pull_request) Successful in 12s
Tests / Integration tests (pull_request) Successful in 1m18s
Check Deno code / Check Deno code (push) Successful in 5s
Tests / Unit tests (push) Successful in 11s
Tests / Integration tests (push) Successful in 1m13s
bb09c1cce5
djalim merged commit bb09c1cce5 into develop 2026-04-27 17:00:56 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/PolyMPR#147