mirror of
https://github.com/bitbaum/heidi.git
synced 2026-12-04 05:17:27 +01:00
* Owner check: why the owner pages do not open, for the person asking The owner was named on the server and still got 404 on the numbers, with nothing to tell a missing sign-in from an unconfirmed address from a different address. /api/owner/check answers that about the caller only, and never says who the owner is. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r * Exercises: a review comes back in another form Simulated over twelve daily sittings, a learner who got everything right met 52 different questions in 96: half of every sitting was the identical question on its review day. What is due is the subject, so where the scope has a never-answered question about the same subject in a different form, that one takes the review's seat (Plan.reviewOf) and its answer moves the card that was due (recordAnswer, siblings), so a subject keeps one schedule. New questions also prefer subjects not met yet. After: 83 different questions in 96; with half the answers wrong, 48 subjects instead of 30. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r * Situations: ask the word that matters, near-miss options, claims last Reported from a phone on 2026-11-28 as useless: a heard line asked as a whole is read off its German cognates, with wrong options that are unrelated lines, or as a claim that is the German read back. Now the line is asked through its least German-looking pack word, in its sentence, with the pack's own four meanings (WordAsk; once per run; no cognates), else as three meanings whose wrong ones are near misses (negation out, day moved, number changed; German word tables with the packs), and as a claim only when neither is possible. Recorded against the line's own item, as pickOf is. Also: pagesFor for chat wayfinding, and no second printing of the German after a true claim. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r * Situations: a right answer moves on by itself, as in a sitting Reported from a phone: the situation run waited for «Wiiter» after a right answer while a sitting moved on by itself. The pulse and the beat lived inside Verdict; they are now useAnswered, used by both. Touching the answer holds it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r --------- Co-authored-by: Claude <noreply@anthropic.com>
33 lines
1.4 KiB
TypeScript
33 lines
1.4 KiB
TypeScript
import { NO_HISTORY } from "../domain/practice/history.ts";
|
|
import { NO_MEMORY } from "../domain/practice/memory.ts";
|
|
import { EMPTY_MODEL } from "../domain/practice/model.ts";
|
|
import { recordAnswer, type Answer } from "../domain/practice/record.ts";
|
|
import { historyStore, memoryStore, modelStore } from "./practice-stores.ts";
|
|
import { recordPractice } from "./streak-store.ts";
|
|
|
|
/**
|
|
* Write one answer into this browser: the one place a sitting, the warm-up
|
|
* and the test all go through. What an answer touches, and why a test answer
|
|
* touches less, is decided in `lib/domain/practice/record.ts`.
|
|
*
|
|
* Read at the call, not subscribed to: a sitting that re-rendered on its own
|
|
* writes would rebuild under the learner's hands.
|
|
*/
|
|
export function commitAnswer(
|
|
answer: Answer,
|
|
now: Date = new Date(),
|
|
/** Other questions about the same subject, so a review asked in another form moves the card that was due. */
|
|
siblings: readonly { id: string; kind: Answer["item"]["kind"] }[] = [],
|
|
): void {
|
|
const recorded = recordAnswer(
|
|
{ history: historyStore.read() ?? NO_HISTORY, model: modelStore.read() ?? EMPTY_MODEL, memory: memoryStore.read() ?? NO_MEMORY },
|
|
answer,
|
|
now,
|
|
siblings,
|
|
);
|
|
if (recorded.history) historyStore.write(recorded.history);
|
|
if (recorded.model) modelStore.write(recorded.model);
|
|
if (recorded.memory) memoryStore.write(recorded.memory);
|
|
if (recorded.practised) recordPractice(now);
|
|
}
|