Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ed8d24c
chore(deps): refresh runtimes and safe dependency fixes
rschlaefli May 31, 2026
bf5d081
docs(project): add next 16 upgrade plan
rschlaefli Jun 1, 2026
74e1415
chore(deps): upgrade next apps to next 16
rschlaefli Jun 1, 2026
1dbf6ef
fix(next): resolve next 16 compatibility issues
rschlaefli Jun 1, 2026
f21e78d
fix(next): restrict local image optimization to dev
rschlaefli Jun 1, 2026
616940d
docs(project): report next 16 upgrade findings
rschlaefli Jun 1, 2026
ca1aab4
docs(project): add next 16 browser evidence
rschlaefli Jun 1, 2026
dde3279
docs(project): update next 16 validation blockers
rschlaefli Jun 2, 2026
c24ccc1
fix(test): restore graphql vitest source alias
rschlaefli Jun 2, 2026
6667f0c
test(next): stabilize next 16 e2e validation
rschlaefli Jun 3, 2026
1d723a6
docs(project): update next 16 validation status
rschlaefli Jun 3, 2026
f5bd782
docs(project): record playwright browser diagnosis
rschlaefli Jun 3, 2026
fc4a335
fix(deps): remediate high audit findings
rschlaefli Jun 3, 2026
86c54a2
fix(frontend): stabilize next 16 redirects and e2e
rschlaefli Jun 3, 2026
7320867
docs(project): record next 16 audit completion
rschlaefli Jun 3, 2026
3ebddb7
docs(project): add TypeScript 6 migration plan
rschlaefli Jun 3, 2026
39e6f16
chore(deps): migrate to TypeScript 6
rschlaefli Jun 3, 2026
d0d14a9
fix(frontend): resolve rank asset imports
rschlaefli Jun 3, 2026
376de8e
docs(project): record TypeScript 6 migration completion
rschlaefli Jun 3, 2026
84778e4
docs(project): add Capacitor mobile app plan
rschlaefli Jun 18, 2026
e3c3324
fix(test): stabilize next 16 cypress login checks
rschlaefli Jun 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflow_drafts/v2_frontend-control.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@v2

- name: Setup Node ${{ env.NODE_VERSION }} Environment
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflow_drafts/v2_frontend-manage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@v2

- name: Setup Node ${{ env.NODE_VERSION }} Environment
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflow_drafts/v2_frontend-pwa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@v2

- name: Setup Node ${{ env.NODE_VERSION }} Environment
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@v2

- name: Setup Node ${{ env.NODE_VERSION }} Environment
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflow_drafts/v2_klickeruzhprod-graphql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@v2

- name: Setup Node ${{ env.NODE_VERSION }} Environment
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 10.15.0
version: 11.5.0
run_install: true
- name: Check formatting
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 10.15.0
version: 11.5.0
run_install: true
- name: Check linting
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-syncpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

- uses: pnpm/action-setup@v4
with:
version: 10.15.0
version: 11.5.0
run_install: true

- name: Check the syncpack conformity of all packages and apps
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

- uses: pnpm/action-setup@v4
with:
version: 10.15.0
version: 11.5.0
run_install: true

- name: Build relevant packages
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/cypress-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,16 @@ jobs:
- run: echo "Running parallel Cypress tests for draft PR (container ${{ matrix.containers }})"

- name: Define node version
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24

- name: Check out repository code
uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 10.15.0
version: 11.5.0
run_install: false

- name: Get pnpm store directory
Expand Down Expand Up @@ -334,16 +334,16 @@ jobs:
- run: echo "Running Cypress tests with Cloud recording for non-draft PR or push to v3"

- name: Define node version
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24

- name: Check out repository code
uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 10.15.0
version: 11.5.0
run_install: false

- name: Get pnpm store directory
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/playwright-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,16 @@ jobs:
- run: echo "Running Playwright PoC tests for draft PR"

- name: Define node version
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 24

- name: Check out repository code
uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 10.15.0
version: 11.5.0
run_install: false

- name: Get pnpm store directory
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-grading.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 10.15.0
version: 11.5.0
run_install: true
- name: Build types package
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-graphql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 10.15.0
version: 11.5.0
run_install: true

- name: Build dependency packages
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-olat-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 10.15.0
version: 11.5.0
run_install: true

- name: Run tests using Docker
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-util.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 9.15.4
run_install: true
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
**/__pycache__/
**/.venv/
**/node_modules/
.pnpm-store/
coverage/
.nyc_output/
.turbo/
Expand Down
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
node_modules/
.pnpm-store/
**/.venv/
.next/
.turbo/
.vercel/
Expand All @@ -16,6 +18,7 @@ schema.graphql
nexus-typegen.ts
client.json
server.json
**/next-env.d.ts

*.sql
*.prisma
Expand Down
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
node 20.19.4
pnpm 9.8.0
node 24.16.0
pnpm 11.5.0
4 changes: 4 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ Without Traefik, use `http://localhost:<port>` directly. The `*.klicker.com` dom
## Codebase Learnings

- **Prisma Decimal nullish check**: `Decimal` fields are objects, not numbers. `Decimal(0)` is truthy, so never use truthy checks for Decimal-to-number conversions -- always use `!= null`. (`packages/graphql/src/`)
- **TS 6 check configs for declaration-heavy packages**: `packages/graphql` and `packages/prisma` use `tsconfig.check.json` for `tsc --noEmit` so typecheck does not fail on declaration-emit portability errors from Pothos inferred inputs / generated Prisma internals. Prisma generation also runs `packages/prisma/scripts/patchPrismaNamespace.mjs` so TS 6 can emit `internal/prismaNamespace.d.ts`; keep Rollup builds on the main `tsconfig.json`, which still emits declarations. (`packages/graphql/tsconfig.check.json`, `packages/prisma/tsconfig.check.json`)
- **Chat app auth guard pattern**: Route handlers in `apps/chat/src/app/api/chatbots/` use a 3-step auth pattern: `getParticipantId` -> `getChatbotOr404` -> `requireParticipation`. The composed helper `withChatbotAuth(req, chatbotId)` in `apps/chat/src/lib/server/apiGuards.ts` handles the standard `{ courseId: true }` case. Use it for new routes; only fall back to individual guards when you need a custom chatbot `select`.
- **Feature flag guards**: Don't combine feature flags with data-dependent counts (e.g., `privatePreview && numChatbots > 0`). The flag alone should gate visibility; combining with counts creates chicken-and-egg problems.
- **Zustand store error handling**: Async actions in zustand stores must set fallback state in `catch` blocks, not just log. Otherwise the UI stays in loading/broken state on network errors. (`apps/chat/src/stores/`)
Expand All @@ -219,6 +220,9 @@ Without Traefik, use `http://localhost:<port>` directly. The `*.klicker.com` dom
- **Local embed harness target**: `util/embed-harness/` is for local verification only and should target the branch-local PWA (`http://127.0.0.1:3101/...`), not `https://pwa.klicker.com/...`, because production CSP / `frame-ancestors` blocks localhost embedding. (`util/embed-harness/`)
- **Chat PWA login redirects**: `apps/chat/src/app/noLogin/page.tsx` must pass an absolute chat URL to the PWA login `redirect_to`; a relative chatbot path makes the PWA redirect to its own domain and 404. Local chat dev also needs ignored local env values for the backend `APP_SECRET` and `DATABASE_URL` so participant cookies verify and Prisma can load chatbot data.
- **Chat Vitest alias resolution**: `apps/chat/vitest.config.ts` mirrors the app `@/*` alias from `apps/chat/tsconfig.json`; keep this in sync when adding client tests for modules that import from `@/src/...`.
- **Live-quiz Cypress response path**: `O-live-quiz` and template-created live quiz flows submit answers through `apps/response-api` on port `7078`; if `/AddResponse` stays pending and submit buttons remain enabled, verify/restart response-api before debugging PWA rendering. (`cypress/cypress/e2e/O-live-quiz-workflow.cy.ts`, `apps/response-api/`)
- **Cypress TS 6 webpack preprocessor**: Cypress spec bundling can surface TS 6 deprecation errors independently of `tsc`; keep `ignoreDeprecations: "6.0"` in `cypress/tsconfig.json` while Cypress/ts-loader still injects deprecated compiler options.
- **Next font build dependency**: Next app builds fetch Google fonts from `packages/shared-components/src/font.ts`; offline/sandboxed builds fail at `next/font` before app code validation unless the fonts are cached or network access is available.

## Factory Skills (AI Assistance)

Expand Down
1 change: 1 addition & 0 deletions apps/analytics/.dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
out/
.venv/
1 change: 1 addition & 0 deletions apps/analytics/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
prisma/schema/**
!prisma/schema/py.prisma
.venv/
*.csv
16 changes: 11 additions & 5 deletions apps/analytics/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
FROM ghcr.io/astral-sh/uv:0.11.12 AS uv

FROM python:3.12

WORKDIR /app

COPY apps/analytics/requirements.txt .
ENV UV_COMPILE_BYTECODE=1 \
UV_LINK_MODE=copy

COPY --from=uv /uv /uvx /bin/
COPY apps/analytics/pyproject.toml apps/analytics/uv.lock ./

RUN pip install -r requirements.txt
RUN uv sync --frozen --no-dev --no-install-project

COPY apps/analytics/ .
COPY packages/prisma/src/prisma/schema/*.prisma apps/analytics/prisma/schema/
RUN rm apps/analytics/prisma/schema/js.prisma
COPY packages/prisma/src/prisma/schema/*.prisma prisma/schema/
RUN rm prisma/schema/js.prisma

RUN prisma generate
RUN uv run --no-sync prisma generate
8 changes: 4 additions & 4 deletions apps/analytics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ This service computes learning analytics for KlickerUZH, providing insights into
## Requirements

- Python 3.12.x (e.g., installed through `asdf`)
- Node.js 20.x.x
- Poetry
- Node.js 24.x.x
- uv

## Setup

- The project uses Poetry for dependency management and environment isolation. Make sure you have Poetry installed before proceeding. Then run `poetry install` in this folder to prepare the virtual environment.
- The project uses uv for dependency management and environment isolation. Make sure you have uv installed before proceeding. Then run `uv sync` in this folder to prepare the virtual environment.
- The project uses PNPM to simplify the execution of scripts and to provide a watch mode for execution. Make sure that you have executed `pnpm install` in the repository before trying to run the commands below.
- Make sure that all `.prisma` files are available in `prisma/`. If this is not the case, run the `util/sync-schema.sh` script first.
- Make sure that a valid Python environment is used (3.12). If poetry tries to use an environment not matching specifications, the install command or script execution might fail. The Python binary to be used can be set expliticly using `poetry env use /Users/.../bin/python` (after which `poetry install` has to be run). Tools like `asdf` allow the clean management of multiple Python versions on a single machine.
- Make sure that a valid Python environment is used (3.12). If needed, set the Python binary explicitly with `uv python pin 3.12` before running `uv sync`.

## Available Commands

Expand Down
16 changes: 8 additions & 8 deletions apps/analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
"version": "3.3.0-alpha.12",
"license": "AGPL-3.0",
"devDependencies": {
"nodemon": "~3.1.10"
"nodemon": "~3.1.14"
},
"scripts": {
"analytics:dev": "../../util/_run_with_infisical.sh --env dev nodemon --exec 'poetry run poe main' --watch src,prisma --ext py,prisma",
"generate": "poetry run poe generate",
"main": "../../util/_run_with_infisical.sh --env dev poetry run poe main",
"script": "../../util/_run_with_infisical.sh --env dev poetry run python -m",
"script:prod": "../../util/_run_with_infisical.sh --env prd poetry run python -m",
"script:qa": "../../util/_run_with_infisical.sh --env stg poetry run python -m"
"analytics:dev": "../../util/_run_with_infisical.sh --env dev nodemon --exec 'uv run python -m src.main' --watch src,prisma --ext py,prisma",
"generate": "uv run prisma generate",
"main": "../../util/_run_with_infisical.sh --env dev uv run python -m src.main",
"script": "../../util/_run_with_infisical.sh --env dev uv run python -m",
"script:prod": "../../util/_run_with_infisical.sh --env prd uv run python -m",
"script:qa": "../../util/_run_with_infisical.sh --env stg uv run python -m"
},
"engines": {
"node": "=20"
"node": "=24"
},
"volta": {
"extends": "../../package.json"
Expand Down
Loading