Skip to content

feat: implement user-editable SRS tuning settings and corresponding UI#16

Merged
MaheeGamage merged 1 commit into
mainfrom
feature/implement-v2
Jun 18, 2026
Merged

feat: implement user-editable SRS tuning settings and corresponding UI#16
MaheeGamage merged 1 commit into
mainfrom
feature/implement-v2

Conversation

@MaheeGamage

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings June 18, 2026 15:27
@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
finnish-learner Ready Ready Preview, Comment Jun 18, 2026 3:28pm

@MaheeGamage
MaheeGamage merged commit a2e5ee8 into main Jun 18, 2026
3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a user-editable SRS tuning system for the vocab quiz, exposing pacing presets and custom configuration in a new /settings page and threading those settings through the quiz API so scheduling/selection logic uses the user’s chosen values (fixing the “words never reach Known” default-tuning issue).

Changes:

  • Introduces a typed SRS tuning schema with presets + validation + local persistence, and sends tuning to quiz API via an x-srs-tuning header.
  • Threads tuning through quiz service wiring into the interval mechanism + priority selector, and makes session size configurable.
  • Adds a /settings UI for editing tuning (plus nav link and docs/task updates).

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/modules/vocab-test/settings.ts Adds SRS tuning model/presets, validation, and localStorage persistence helpers.
src/modules/vocab-test/service.ts Threads tuning into mechanism + selector wiring.
src/modules/vocab-test/mechanisms/IntervalMechanism.ts Retunes default interval config to day-scale defaults so “Known” is reachable.
src/modules/vocab-test/components/SettingsPanel.tsx New client UI for selecting presets, editing tuning, and copying the sheet formula.
src/modules/vocab-test/client.ts Sends x-srs-tuning header on quiz session + result requests.
src/components/NavLinks.tsx Adds top-nav link to /settings.
src/app/settings/page.tsx Adds Settings page route wrapper and layout.
src/app/api/quiz/session/route.ts Reads/validates tuning header; uses tuning session size and threshold.
src/app/api/quiz/result/route.ts Reads/validates tuning header; grades using tuned mechanism.
docs/setup-guide.md Mentions using the in-app Settings page to keep sheet formula in sync.
.project/tasks/task-011_expose-srs-tuning-config.md Adds task spec/log for the implemented tuning feature.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


const save = () => {
if (parseTuning(draft) === null) {
notify({ variant: 'error', message: 'Some values are invalid — check the highlighted fields.' });
Comment on lines +126 to +131
export function saveTuning(config: TuningConfig): void {
try {
localStorage.setItem(STORAGE_KEY, JSON.stringify(config));
} catch (error) {
console.error('Error saving SRS tuning:', error);
}
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.

2 participants