Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
c6ba8fd
Establish regression gates and repair learning platform foundations
hananather Oct 3, 2026
403cf60
Add transactional local progress and reactive compatibility adapters
hananather Oct 3, 2026
8216773
Repair guided lesson focus and narrow-screen math controls
hananather Oct 3, 2026
ff1d7a3
Add persistent motion controls and reactive chapter status
hananather Oct 3, 2026
c443f3a
Repair math-rendering call signatures and normalized worked examples
hananather Oct 3, 2026
2a49492
Add learner backup status and repair mobile completion navigation
hananather Oct 3, 2026
b996071
Keep lesson mathematics rendered after completion
hananather Oct 3, 2026
a80636f
Name Z-score controls and remove duplicate backup input focus
hananather Oct 3, 2026
a524203
Add guarded lesson actions and atomic pinned quiz sessions
hananather Oct 3, 2026
51a1c55
Unify lesson tabs and hubs with canonical progress
hananather Oct 3, 2026
3b1d266
test: cover literal dynamic page routes in production smoke checks
hananather Oct 3, 2026
a781609
fix: make Z-score explanations accessible and preserve tutorial sets
hananather Oct 3, 2026
9b69922
refactor: store journey and resource study progress canonically
hananather Oct 3, 2026
8946135
refactor: centralize section resume and safe math rendering
hananather Oct 3, 2026
beb4973
fix: distinguish observed spread from normal-model rules
hananather Oct 3, 2026
38dbd15
refactor: queue shared formula rendering without feedback loops
hananather Oct 3, 2026
182e9aa
docs: replace tool prompts with lesson review guidance
hananather Oct 3, 2026
fc1f059
fix: preserve z-score formulas in the Next React runtime
hananather Oct 3, 2026
3823e67
refactor: share section and legacy formula rendering
hananather Oct 3, 2026
015bb20
test: verify section completion through shared math rendering
hananather Oct 3, 2026
da2a6e6
feat: preserve pinned quizzes in canonical learner progress
hananather Oct 3, 2026
99e9dec
test: wait for visible foundation tab transitions
hananather Oct 3, 2026
72c1fbd
fix: preserve quiz focus across explicit actions and dialog races
hananather Oct 3, 2026
99774ba
fix: retain question focus when retaking a saved quiz
hananather Oct 3, 2026
e74bfa3
refactor: serialize descriptive and coin formula rendering
hananather Oct 3, 2026
262efe6
refactor: serialize estimation formula rendering
hananather Oct 3, 2026
bd2c794
refactor: preserve distribution formulas across interactive updates
hananather Oct 3, 2026
25da3a2
fix: calculate both tails of the variance ratio test
hananather Oct 3, 2026
9765268
fix: keep normal sampling aligned with distribution controls
hananather Oct 3, 2026
82d9810
fix: recover scoped formulas and retire detached math items
hananather Oct 3, 2026
e5135b4
refactor: serialize hypothesis testing formulas
hananather Oct 3, 2026
709c4b0
refactor: serialize regression formulas and repair worked examples
hananather Oct 3, 2026
37dfd7a
fix: qualify nonlinear correlation examples
hananather Oct 3, 2026
0433d85
fix: repair confidence explorer controls and remove obsolete copies
hananather Oct 3, 2026
231e507
fix: resize correlation charts and contain mobile equations
hananather Oct 3, 2026
4af8020
fix: clarify sample precision and track explicit exploration
hananather Oct 3, 2026
c02c139
fix: normalize sample histograms on the probability density axis
hananather Oct 3, 2026
93760be
feat: define account progress reset and replay contract
hananather Oct 3, 2026
f0c312d
fix: square signed correlation values in the displayed test
hananather Oct 3, 2026
c1d6045
fix: wrap empirical controls without clipping focused content
hananather Oct 3, 2026
1675f14
fix: calculate every plotted sample confidence threshold
hananather Oct 3, 2026
1973cf6
feat: add verified email auth and owner-isolated progress API
hananather Oct 3, 2026
14fd5db
fix: clarify correlation data, notation, and inference
hananather Oct 4, 2026
615f273
fix: keep sample planning charts and equations usable on phones
hananather Oct 4, 2026
a70474c
feat: persist account progress with a guarded sync outbox
hananather Oct 4, 2026
78ca52c
fix: keep sample-size chart controls usable during motion
hananather Oct 4, 2026
ca9a802
fix: keep chapter navigation cards readable on phones
hananather Oct 4, 2026
d12f0f1
feat: bind learning progress to verified account sessions
hananather Oct 4, 2026
959312b
fix: solve sample-size budgets with exact integer planning
hananather Oct 4, 2026
9676335
fix: describe optional account progress in privacy text
hananather Oct 4, 2026
a8dbf42
docs: document setup account validation and landing behavior
hananather Oct 4, 2026
80bf216
fix: synchronize full quiz banks and recover retained grades
hananather Oct 4, 2026
9dc7694
docs: add contribution and content provenance guides
hananather Oct 5, 2026
cff80bc
fix: validate sample-size inputs and accessible learning controls
hananather Oct 5, 2026
8a850af
fix: explain sample-size interval width and standard error
hananather Oct 5, 2026
7bdb749
perf: defer browser authentication until verified account or sign-in
hananather Oct 5, 2026
13a1d84
feat: persist sample-size study and private learning mode
hananather Oct 5, 2026
f332243
fix: clarify progress destination and quiz elapsed time
hananather Oct 5, 2026
2654f94
docs: align math rendering guide with shared runtime
hananather Oct 5, 2026
8dc2609
fix: retain full normal quantile in sample-size planning
hananather Oct 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
38 changes: 0 additions & 38 deletions .claude/settings.local.json

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Quality checks

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm run test
- run: npm run lint
- run: npm run build
- run: npm run check:production
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ yarn-error.log*
# vercel
.vercel

# Local Supabase CLI cache
/supabase/.temp/

# typescript
*.tsbuildinfo
next-env.d.ts
Expand Down
40 changes: 0 additions & 40 deletions AGENTS.md

This file was deleted.

121 changes: 0 additions & 121 deletions CLAUDE.md

This file was deleted.

59 changes: 59 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Contributing to Probability Lab

Help students understand probability through correct explanations, worked examples, interactive experiments and useful feedback. Start with a reproducible problem or a proposed lesson improvement in the [issue tracker](https://github.com/hananather/probability/issues), then submit a scoped pull request.

## Run and check the application

Use Node.js 22.12 or later:

```sh
npm ci
npm run dev
```

Before submitting a change:

```sh
npm run check
npm run check:production
```

`check` runs the tests, lint and production build. `check:production` checks the built page routes on port 3100. These checks establish software behavior under their tested conditions; lesson quality also requires browser and mathematical review. See the [repository map](README.md#find-the-implementation) and [account validation](docs/accounts.md#validate-account-behavior) for relevant implementation and provider checks.

## Change code without losing learning behavior

Use the existing chapter components and shared controls before introducing another abstraction. Keep routes, stable activity/question IDs, saved progress and working interactions compatible. A refactor should preserve a student's answers, current lesson position and completed work. Describe any intentional behavior change separately.

Use two-space indentation, single quotes and semicolons in new JavaScript. Prefer `@/` imports, PascalCase component names and `use…` hook names. Match the surrounding chapter's file organization. The [module guide](docs/tabbed-learning-guide.md) describes the current tab, section, math-rendering and progress components.

Add meaningful regression tests for changed calculations, grading, persistence or interactions. Prefer independent reference calculations to expectations copied from the implementation. Include invalid inputs, boundary cases and degenerate cases when they affect the result. Report skips and unrun checks explicitly.

For motion changes, clean up timers, event listeners and animation frames when a component unmounts or changes modes. Preserve understandable feedback with reduced motion and responsive controls while an animation runs. Support any performance claim with a reproducible measurement and comparison baseline.

## Write and review a lesson

Introduce prerequisites and symbols before using them. Explain the idea in plain language, state its mathematical conditions, work through a numerical example and offer a new case that tests transfer. Let students predict before revealing an answer. Explain why distractors fail, including the misconception each one represents. Distinguish exact results, approximations and simulations; label units, rounding and synthetic data.

Review the complete activity from each learner perspective:

| Perspective | Questions for review |
| --- | --- |
| A confused student | Are prerequisites visible? Can I connect the words, diagram and notation? Does feedback explain my mistake and the next step? |
| A high-achieving student | Can I derive the result, identify its assumptions and limits, and apply it to a harder or unfamiliar example? |
| A motivated student who needs manageable attention steps | Is the next action clear? Can I pause, return and resume? Are explanations divided into useful steps, with optional depth and control over motion? |

Rate functionality, mathematical correctness, explanatory depth, writing clarity, visual clarity, and accessibility/learner control separately. The initial acceptance gate is at least **4 out of 5 in every dimension**, with no known mathematical error, data-loss defect or blocked essential interaction. Leave unreviewed dimensions unscored. The [lesson review rubric](docs/learning-quality.md) defines the scale and evidence requirements. Review ratings do not establish measured learning gains or clinical effects.

Exercise the changed activity in the production build with a mouse and keyboard, at desktop and narrow widths including 390 and 320 pixels. Check labels, visible focus, equation wrapping or scrolling, reset/navigation controls, reduced motion and browser errors. Reload after work that saves progress. For account changes, verify the configured provider and ownership boundaries described in the account guide. Record the checked Git revision and the paths exercised.

## Record content sources

Write new explanations, questions and diagrams in your own words. For each added or adapted item, identify its creator and record its origin in the [content provenance ledger](docs/content-provenance.md). Direct reuse requires the exact applicable license or documented permission, the source URL and version/edition/page where relevant, and retained attribution or notices. A link to a learning resource records a reference; it does not document permission to incorporate its text, questions, artwork or branding.

Preserve existing human author credits, including Patrick Boily and Hanan Ather. The repository-wide code and educational-content licenses are still unresolved. State any contribution-specific permission explicitly; this guide supplies no blanket reuse grant. Keep unresolved sources marked as unresolved rather than assuming they are original or cleared.

## Submit a reviewable pull request

Link the issue and explain the problem, resulting behavior and validation. Include numerical inputs and an independent calculation for a mathematical correction; include screenshots for visual changes. State remaining limitations, skipped checks and any migration or source-permission change. Use a Conventional Commit title such as `fix: correct sample size rounding`.

Keep secrets, account backups, personal information and local working guidance out of shared files. Preserve educational material when removing unused code: establish its references, explain the removal and retain useful content through a separate documented location when appropriate.
36 changes: 33 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Probability Lab

Interactive probability and statistics learning platform for MAT 2377 - Probability and Statistics for Engineers at the University of Ottawa.
Probability Lab teaches probability and statistics through interactive lessons, simulations, worked examples and chapter quizzes. It began as a resource for MAT 2377, Probability and Statistics for Engineers at the University of Ottawa, and covers seven published chapters.

## Overview

Expand All @@ -12,15 +12,45 @@ An educational web app featuring interactive simulations and visualizations for
- Hypothesis testing
- Linear regression

## Setup
## Run locally

Use Node.js 22.12 or later. Install the versions recorded in the lockfile:

```bash
npm install
npm ci
npm run dev
```

Open [http://localhost:3000](http://localhost:3000) to view the application.

Lessons and guest progress work without account configuration. Optional email sign-in and account synchronization require a configured Supabase project and its owner-isolated progress table; see [account setup and validation](docs/accounts.md). Account deployment still requires verification against the intended provider.

## Verify a change

```bash
npm run check
npm run check:production
```

`check` runs the assertion suite, ESLint and the production build. `check:production` starts that build on port 3100, checks the generated page routes and stops its server. Route checks verify HTTP reachability. Exercise the changed lesson's controls in a browser at desktop and narrow widths, including keyboard use and reduced motion.

The real-provider integration fixture is explicitly skipped when it is not configured. See [account validation](docs/accounts.md#validate-account-behavior) for its separate database and ownership checks. Test and build results apply to the checked revision.

## Find the implementation

| Path | Purpose |
| --- | --- |
| [src/app](src/app) | Next.js pages, layouts and account API routes |
| [src/components](src/components) | Chapter lessons, shared controls and visualizations |
| [src/lib/curriculum/manifest.js](src/lib/curriculum/manifest.js) | Stable lesson IDs, published chapters and progress denominators |
| [src/lib/statistics](src/lib/statistics) | Numerical functions used by lessons |
| [src/lib/progress](src/lib/progress) | Guest/account storage, migration, synchronization and recovery |
| [src/lib/quiz](src/lib/quiz) | Question banks, grading and pinned quiz sessions |
| [src/lib/mathjax](src/lib/mathjax) | Shared mathematical rendering |
| [tests](tests) | Numerical, interaction, persistence and ownership assertions |

Add explanations and examples in the chapter's existing learning structure. Check each numerical answer and its conditions, and preserve working interactions and saved progress when refactoring. Record the source and permission for incorporated text, questions or assets. The repository's overall license and content attribution are still being resolved; existing third-party rights and author credits remain applicable.

## Tech Stack

- Next.js 15 + React 19
Expand Down
Loading
Loading