Skip to content

fix: free practice (daily, own text) stays local and counts toward nothing - #38

Draft
prodelt wants to merge 2 commits into
mainfrom
fix/free-practice-kinds
Draft

prodelt wants to merge 2 commits into
mainfrom
fix/free-practice-kinds

Conversation

@prodelt

@prodelt prodelt commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Fixes from the review of Daily challenge and Own text:

  1. Daily attempts no longer stick in the outbox. Free-practice attempts are stored locally but never queued for upload; any .daily item an older build queued is dropped, so sync no longer stays "pending" and sign-out goes through. The id helpers moved to @typing-race/curriculum (dailyId/isDailyId, ownTextId/isOwnTextId, isFreePracticeId), so derive.ts no longer imports from features/. No server deploy needed.
  2. Own text is its own kind (yq.owntext): ignored by mastery/progress, key confidence and weak spots, XP, streak and daily-goal minutes, the result reward and the outbox, and labelled "Свій текст"/"Own text". Daily attempts are now ignored by the streak, daily goal and weak spots as well.
  3. /own is always practice: the pre-start practice/test toggle is hidden. "Ще раз" on an own-text result re-runs the same text, which is kept in memory; if the text is gone (after a reload or a layout switch), it opens the /own form.
  4. The "cut to N characters" notice now shows on the pre-start card.
  5. Daily done-today and the day count are kept per language (typing-race:daily:<lang>).
  6. Sign-out wipes typing-race:daily* and typing-race:sprint-best:* together with the local copy. typing-race:guide-seen is kept on purpose: it is a per-browser UI hint and holds no learner data.

Tests: unit tests for the id predicates, the outbox rule, the local-key wipe, the free-practice filters (derive, gameStats, reward) and the per-language daily. There is a new e2e/owntext.spec.ts (chromium, 2/2 passing). pnpm build stays under the initial-JS budget (148.8 KB gzip).

🤖 Generated with Claude Code

prodelt and others added 2 commits October 6, 2026 00:20
…r data on sign-out

The daily challenge and own text get their ids in @typing-race/curriculum
(dailyId/isDailyId, ownTextId/isOwnTextId, isFreePracticeId). The server
does not know these ids and answers unknown_scale, which the outbox keeps
and re-sends forever, so sync stayed "pending" and sign-out stopped.

- submitAttempt stores free practice locally but never queues it
- free practice an older build queued is dropped from the outbox
- wipeLocalIfSynced/forgetLocal also remove typing-race:daily* and
  typing-race:sprint-best:* (the guide-seen flag stays: it is a per-browser
  UI hint with no learner data)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Own text records under ownTextId (yq.owntext), not the stock real-text id,
  and is labelled "Свій текст"/"Own text" on the result screen
- Free practice (daily and own text) is ignored by mastery/progress,
  key confidence and weak spots (derive), the coach's last attempt, XP,
  the streak and daily-goal minutes (gameStats), and the result reward
- /own hides the practice/test toggle (always practice); "Again" on an
  own-text result re-runs the same text from memory, or opens /own when
  it is gone
- The "cut to N characters" notice shows on the pre-start card
- Daily done-today and the day count are kept per language

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
typing-race Ready Ready Preview Oct 5, 2026 9:25pm UTC

This branch was successfully deployed

1 active deployment
Preview — 58b15a12 Deployed Oct 5, 2026 by vercel[bot]
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.

1 participant