mirror of
https://github.com/bitbaum/heidi.git
synced 2026-12-04 05:17:27 +01:00
batch-2
69
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
d428900eff |
Owner: one button mails a link to the owner address; no file to edit on the server
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r |
||
|
|
304338c617 |
Benchmark on request only: no background job spends the free AI allowance (#401)
Each run is about thirteen calls of the free model allowance the chat lives on, and the fleet's rule forbids background AI spend. It runs from a button on /owner; /models says so. The hourly call keeps the reminders. Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
ec296f7e32 |
Cron: the hourly call the box makes now runs reminders and the benchmark (#399)
The box calls only /api/cron/channels for heidi. Reminders and the nightly benchmark rode on /api/cron/reminders, which nothing calls, so neither ever ran. Both now run after the channels sweep; the first benchmark runs at once. Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
3879d58823 |
Owner door, team QR poster, the visitor's path counted, counts from the pack (#397)
* Owner: one page that always says the next step; counts come from the pack /owner never answers 404: it says whether you are signed out, signed in with another address, unconfirmed, or the owner, and what to do. The check asks whether the address is the owner's before asking if it is confirmed. The investor room's question and review counts and the warm-up's promised length are tied to the content. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r * Team QR poster, the visitor's path counted, care page follows the pack The team invite shows a QR code and opens a printable poster for the staff room. Anonymous totals now count the visitor's path from home page to answer, and from organisations page to pilot request; /owner lists them. The care page lists every care scene the pack has. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
87ce804fe3 |
A landing page for every business type, with a pilot request form (#396)
One template for all six sectors: the moment, the cost, what exists today, the situations from the pack that fit, a pilot for that sector and a form that is kept and mailed to the owner. The home page names more of what the product covers and opens a door for organisations. Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
b52d8073e7 |
Owner: a page that sends the confirmation mail for the owner address (#395)
The owner pages need a confirmed owner address and nothing could confirm one. /owner/confirm sends the mail, to an OWNER_EMAILS address only. Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
cb94dcbaaa |
Daily chat benchmark on /models; home page second pass (#392)
* Daily chat benchmark, and what the check is worth, on /models Eight fixed messages through the real chat every night, and the texts to be said in Zurich German also through the same models without Heidi; both face the same rule check. The last seven nights are public on /models. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r * Changelog: the benchmark entry, above the pages entry Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r * Changelog: the home page's second pass Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r * Home, second pass: show the message in the hero, name the reader, shorten Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
5c6e1dd1a5 |
Review: a welcome, a fourth answer, invitations and standings (#389)
A reader who was sent the link is told why, is not asked about themselves before the lines, and can say 'fine, but I say it differently' without calling a line wrong. Several readers of one line give it a standing for the owner; ?via= tells one invitation's readers from another's. Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
7a7d9317f5 |
Native speakers check the situations line by line (#388)
None of the 793 scene lines had been read by a native speaker. A reader now goes through a scene with three buttons per line and an optional better wording, without an account; the owner reads the verdicts and corrects the pack. Linked from the organisations page and from each scene's line list. Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
d2c9559ef5 |
Which one is Zurich German? Look-alikes with the reason; anonymous totals (#387)
* 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 * wip: build your own sentence in the chat * Chat: build your own sentence; a link to the page a question asks for The moment a learner cares most about a Zurich sentence is when they asked for it, and the chat let them copy it without one act of recall. «Selber bauen» hides the line, deals its words out of order and has them rebuild it by tapping (build-own.ts; only lines the check passed; nothing stored). And a question that is really asking for a page gets a link to it under the answer (pagesFor, drawn; answers to questions only). Measured on a Pixel 7 viewport in de and ru: the line is hidden while building, no overflow. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r * Situations: take your turn by tapping or by writing, your choice How much effort is the learner's choice: the turn opens on the word tiles, and «Lieber schreiben» swaps in the same line as the pack's typed, self-marked exercise (BuildStep.write). Recorded against the built item either way; kept for the run. Played through on a Pixel 7 viewport: toggle present, field shown, no overflow. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r * Near misses: read all of them, keep the safe kinds, add the ones care lines need Measured: 57 of 156 heard lines in the care scenes fell back to unrelated wrong options. Added guarded swaps (noch nicht/schon, nicht mehr/noch, zweimal/dreimal, Nachmittag/Vormittag, gut before a participle, colours and heiss/kalt with their endings). Then read all 235 generated options: about a third were broken German or gave themselves away, so kein→ein, heute/morgen/gestern, früher/später and einmal are gone and the negation, schon and gut are guarded. 128 remain; a test pins nineteen rejects and checks every option in the pack is tidy. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r * Anonymous totals: what is started, finished and answered wrong Practice lives in the browser, so nobody could say whether people finish a situation or which question everybody gets wrong. Decided by the owner on 2026-11-28: count it, anonymously. usage_counts holds a day, a key and a count; a key is built from a closed vocabulary and checked on the server against the scenes and questions that exist (usage/keys.ts), so nothing a client types is stored. /api/usage always answers 204. Runs, sittings, each first answer and the chat's own-sentence exercise report; the owner's numbers show 28 days and the hardest questions. The privacy page declares the flow in seven languages. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r * One care word that cannot be guessed, and why four others were not added The care scenes were mined for opaque words. «Strähl» (Kamm) is one; «Dokter», «Hämp», «Rugge» and «parat» are read off their German, and asking about them made the runs measurably worse. Recorded in the pack so the next attempt starts from the measurement. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r * Situations: which one is the variety? The line among its look-alikes, with the reason The promise is the right dialect, and no exercise trained telling it from what is almost it. A look-alike is the line with one word changed, made only from a pack rule read backwards (a leak for the written standard, a regional or house rule for elsewhere), and kept only if the gate refuses it. The German is the question; after the answer the screen says why each wrong option is wrong (Which.notes). 312 of 491 heard lines have one; unrelated-option questions fall from 96 to 56 (everyday) and 41 to 23 (care). Recorded against the line's own item. Checked on a Pixel 7 viewport in de and ru. 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> |
||
|
|
d462e1c800 |
Owner check: why the owner pages do not open, for the person asking (#381)
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. Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
30ff73da06 |
Translate on a quarter of the prompt; keep-the-conversation line; one «Nur übersetzen» (#379)
* A capped paid fallback when every free model is busy; turn outcomes in health HEIDI_FALLBACK_MODELS names models on the OpenRouter key that answer for everybody after the named free models and before the weak routed one. Off until named; then under ai-kit's kill switch, Heidi's opt-in and the daily paid caps, like the pass model. Its own provider id, because ai-kit drops a vendor's remaining links after a daily refusal, which is exactly when this row is needed. Never pickable or preferred. /api/health adds ai.turns: answered and failed since restart. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r * Dock: offer to keep the conversation after three messages A dock conversation lives only in the browser, and the open chat stores nothing, so a learner who returns cannot be told from a new one and loses the thread on another device. After three learner messages one line says so and links to the full chat, which already adopts a draft into the account or offers sign-in. Measured on a Pixel 7 viewport in de, fr, ru: no overflow. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r * Translate: a compact prompt and a smaller reply budget A free model accepts ~8,000 tokens a minute and a request counts its prompt plus the reply it reserves. With the full 16,700-character prompt and 2,400 reply tokens that is one request per model per minute. translatePrompt keeps the forms never to mix in, the spelling convention, the auxiliaries and the same JSON envelope, and drops what a translation never offers (grammar topics, next moves, tones, the written standard as a second variety): 2,767 characters plus the 1,345-character instruction, with a 1,400-token reply. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r * «Nur übersetzen» under the newest answer only Seen on a phone-sized screenshot: the button repeated under every earlier answer of the dock, each one resending an old line. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r --------- Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com> |
||
|
|
6a32d7b76d |
Health: whether the OpenRouter key is free tier, and whether an owner is named (#376)
The owner opened /owner/models signed in and got 404: the server does not recognise the account as owner (OWNER_EMAILS / OWNER_ACTOR_IDS unset, or the address unverified). /api/health now answers the two bits needed without that page: ai.openrouter (unset / free-tier / credit / unknown; no amount, no key; asked every 10 minutes, 3 s cap) and owner.configured (a boolean, never who). Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
e8018631cb |
Chat: translate or talk in one tap, a model you can see and pick, /models (#363)
- Two pills in the composer, «Übersetzen» and «Gespräch» (chatkit's `modes`), remembered in `heidi.chat.prefs.v1` and sent with every message. On Translate the turn gets an instruction that the text is to be carried across, never answered, and never declined for its topic (lib/domain/chat/intent.ts). Reported from a phone: four sentences about tariffs, pasted to be translated, were declined as political analysis. - Under an answer in mode "answer": «Nur übersetzen» resends the line as a translation and leaves the composer on Translate. - The dock gets the model chip (it mounted the sheet with no button). The chip names the model: own key, the free one picked, or the one that wrote the last answer. - The sheet's free-model list is a picker; the pick only reorders the chain (`preferred`), and an id the deployment does not run is ignored. - /models: each free model with what it did here, from every turn since the restart (lib/domain/model/stats.ts) and stored answers of 30 days. - Privacy page declares the new store; /models in the layout audit, noindex and out of the sitemap. Claude-Session: https://claude.ai/code/session_019MDtmtfseicWGK2CMC2U5r Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
d4e9a58580 |
Pay in francs (card, TWINT), visible models, a daily limit with a way on (#362)
- A second way to pay for a pass: Swiss francs on Stripe's hosted page, where the Stripe account's methods (card, TWINT, wallets) are offered. Off until STRIPE_SECRET_KEY and a CHF price are set; each rail is on or off by itself. Stripe is told nothing about the Heidi account. Own webhook path, /api/pay/webhook/stripe. The provider is paykit's (PR bitbaum/paykit#19), copied in lib/pay/stripe-provider.ts until 0.4.0 is released, with a test that fails the day the package has it. - /pass: one card per pass, a price and button per rail; buying is the one filled action. A failed checkout no longer prints "fetch failed". - /owner/payments: each rail, what is set (names only), what is missing, and the webhook addresses to paste. - Chat: a Model button for everyone; the sheet names the free models. - A daily allowance of free turns (100, HEIDI_FREE_TURNS_PER_DAY), three times with a pass, none with an own key; the chat says so and links /pass. - /pass added to the layout audit. Claude-Session: https://claude.ai/code/session_019MDtmteJuDGFouA1itJ5tM Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
59419a1063 |
release: places on every page, situations as guided runs, profile and Mein Bereich, modular code (#361)
* feat(profile): a learner profile, and a personal page that answers three questions One profile model as a view over the stores that already hold each answer; the setup «Dein Profil einrichten», one question per screen; the profile card on the personal page; «Wo stehe ich?» and «Nutze ich Heidi gut?»; progress kept with the account by default; reminders only when behind the learner's own weekly goal. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * docs(profile): record the new sync default and the profile; audit the setup screen Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * feat(profile): interests lead the listening One more profile question, «Was interessiert dich?»: nine choices that name the topics every row of the listening register already carries. The listening page opens with the rows that fit, each saying which choice it is there for and how much can be asked about it; «Nutze ich Heidi gut?» names one of them when the thing to do is listen. Chosen in the browser, so the page stays cached; stored as a field of the profile record. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * fix: an eight-character password floor, a localised investors door, page titles and four layout leftovers - A new password needs eight characters (sign-up, change, reset), through a plugin the account package accepts; signing in with an older, shorter password still works. The message is in all seven languages. - The investors door says «Passwort / Öffnen» in the reader's language. - A failed sign-in, the unsubscribe page and the signed-in personal page have their own titles; a test holds every page to one. - The kept sentence under a saved word is no longer hyphenated («Schlüs- / sel» at 320px). - «Warum die Übungen so gebaut sind» is a closed row with a chevron. - The account forms' primary button is black, like every other. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * refactor(sync): the merge policy is a tested function; the profile says when sync failed What one pull changes in this browser moved out of a useEffect into lib/domain/progress/merge.ts (planMerge, decodeDevices, statusAfter), with tests for every rule. The runner only fetches and writes. A failed request and a 401 used to be swallowed; the personal page went on saying progress was stored with the account. They are now reported through an in-memory status, and the sync line shows when it last got through, that it did not (with a retry), or that this browser is signed out (with the way in). One deliberate difference: a device that holds no bridge/difficulty choice no longer hides an older device's choice from a third one. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * refactor(practice): one recordAnswer, a tested and resumable test run, exercise words by context Items 2, 3, 7, 13, 16 and the practice and test screens of 12, which share files. recordAnswer (lib/domain/practice/record.ts) is the one place an answer is written into history, model, memory and the day. The sitting and the warm-up wrote it out twice with different rules and the test a third time. Decided: the first answer teaches (the sitting's rule); the day counts from the first answer, so a warm-up left half way now counts (the sitting's rule won); a test answer counts for the day only, kept on purpose and said why. The test's draw and its stored shape are lib/domain/practice/test-run.ts, tested. A run survives a reload (heidi.practice.test.v2, per course, on the privacy page), keyed by sitting, with the clock held as a deadline. practice-session.tsx 620 -> 217 and test-session.tsx 427 -> 146: state and rules to use-sitting.ts, use-test-run.ts and lib/domain/practice/sitting-run.ts (tested); LevelRow, UsedUp, the test's start and result screens, and the warm-up's result are their own files. The six dictionary slices every exercise read as props come from one provider (exercises/words.tsx); the pages build them with exerciseWords(). heidi.voice.v1 is on the privacy page, so 'delete everything on this device' removes it; privacy.test.ts now checks both directions. The warm-up and the home page's speech bubble take the variety from the pack instead of writing 'gsw', and the leak ratchet covers app/. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * revert(auth): accounts stay the package's; no password rule of Heidi's own Sign-up and sign-in behave exactly as @bitbaum/accountkit defines them. The eight-character floor added here as a local plugin is removed, with its message and note; a rule about passwords belongs in the package, for every app at once, or nowhere. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * refactor(model): one chain, a tested judgeTake, and the speaking check says why it has nothing Items 4 and 8. lib/domain/model/chain.ts: modelChain() and ownChain() replace four copies of usableChain(freeChain("HEIDI")), and hold the health tracker three routes imported from the chat's route file. A test fails on a fifth copy. lib/domain/speaking/judge.ts: the take's judgement (request reading, the bridge/target gate, the model call, the gate on the suggestion) with tests and an injectable model. api/speaking/take/route.ts 222 -> 45 lines. The route's answer now says which kind of nothing it is (opinion), and the screen reads the status too: a rate limit, a model that could not be reached and a model with nothing to add each have their own sentence, in seven languages. Before, all three printed 'Heidi has nothing to add right now'. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * feat(shell): an error screen inside the site, and loading states where they cannot change a status code Item 5. app/[locale]/error.tsx: a page that throws keeps the header, footer and chat, says so in the reader's language, and offers retry and the way home. Its five words come from the layout through a small context, so the dictionaries are not shipped to the browser. loading.tsx is NOT at app/[locale]/, on purpose. It was added and measured: a loading file starts the response before the page runs, so 9 of 22 probed addresses changed status (every unknown page 404 -> 200, /account and /portal 307 -> 200). The same screen is instead the loading state of the six routes that can only answer 200 (vocabulary, speaking, listen, profile, settings, warmup), and a test fails if a loading file is put above a page that calls notFound() or redirect(). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * fix(a11y): the two modal sheets are real modals, and an accessibility pass over existing screens Item 6. The sitting's settings and the model connection claimed aria-modal on a plain div with no focus trap. Both are now chatkit's Sheet (a native dialog opened with showModal): focus stays inside, the page behind is inert, Escape closes, and the opener gets focus back. A test fails on aria-modal anywhere else. The pass, in code: - the model sheet's close button was labelled with a multiplication sign; it is the package's labelled 44px button now (model.close, 7 languages) - tap targets under 44px raised: the settings chip, saved words' export and clear, a take's delete, a failed chat bubble's retry, the word popover's button, the invite link's rotate - a listening question marked the right option by outline colour alone; it carries the drill's tick and cross - seven error lines appeared without role=alert (topics, rounds, recorder) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * refactor(chat): one way to follow a conversation, and the dock in three files Items 10 and 12 (dock). chat.tsx, the dock and the group chat each scrolled a marker into view on every change of the messages. That is now chatkit's useStickToBottom behind one small hook (chat/use-follow.ts): the thread is followed until the reader scrolls up, so a token or a message from someone else no longer pulls them away from an older answer. chat/dock.tsx 577 -> 235: the panel is chat/dock-panel.tsx (242), and the two facts only a browser knows about the launcher (is it lying on a control, how tall is it) are chat/use-dock-launcher.ts. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * refactor: answer view, round list and chat workspace under 300 lines, with their logic in lib Item 12, the remaining three. chat/answer-view.tsx 421 -> 185: the glosses, the suggestions and the row of buttons are their own files; what the row holds (ownRowItems) moved to lib/domain/chat/row.ts with tests. round-list.tsx 415 -> 216: the form to open a round is round-open.tsx; what a viewer may do with a round (roundChoices) and the request a host's form becomes (newRoundBody) are lib/domain/speaking/round-view.ts with tests. chat/workspace.tsx 415 -> 263: the transport is a hook, the words handed to chatkit's ChatApp are workspace-words.ts (tested in all seven languages), and the offer to keep a browser conversation is adopt-prompt.tsx. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * refactor(http): one id pattern, one organiser check, one audio-upload guard Item 11. The UUID pattern was defined in eleven files; it is lib/http/ids.ts. organiserGroup was written out in the invite and the team route; it is in lib/domain/groups/store.ts beside groupById. The bounded read of an uploaded recording, copied between the two transcription routes, is lib/http/audio-upload.ts with tests. A test fails on a second definition of any of the three. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * chore: remove dead code and dictionary keys nothing reads Item 15. scripts/responsive-audit.mjs is superseded by scripts/audit/responsive.mjs, which package.json's audit:responsive runs; nothing referenced the old one. Exports with no reader anywhere (code, tests or scripts), found with knip and confirmed by search: draftTransport, CowLockup, useHistoryView, recordFor, Prose, countNewSince, isChannelId, isVideoId, lastChanged, moveId, forgetInterest (account deletion removes those rows in erase.ts), isObjective, stretchOf, essaysAbout. useTheme is used only in its own file and is no longer exported. 36 dictionary keys whose name appears nowhere outside the dictionaries, in all seven languages: home.{trustTitle,trustBody,trustLink,pillarsTitle, methodLink,researchLink,contributeTitle,contributeCta}, pillars, check.{failShort,noteTitle}, technology.directionLabel, privacy.updatedLabel, contribute.{needTitle,needList}, auth.{portalLead,notSignedIn}, streak.goalLabel, practice.{correctIs,buildPrompt,verifyPrompt,typeLabel, testAnswer,testDone}, essays.notTranslated, review.noneHint, organisations.momentLabel, shell.{wordsTitle,wordsDue,wordsNone,wordsOpen, courseSteady,resumeTitle,resumeProgress,resumeNone,resumeStart}. Keys read by id (privacy.flows.*, chat.learn.*Label, feedback reasons) were checked and kept. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * fix(a11y): the modal sheet gives focus back to what opened it Found in the browser: closing the model sheet with its close button left focus on <body>. The opener was read in an effect, which runs after the sheet's own effect has already moved focus into the dialog. It is read while rendering now. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * fix(shell): no focus ring round the error screen's heading It is focused by the page so a screen reader starts there; the ring drawn round it read as a text field. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * refactor(components): one folder per feature under _components The flat folder of 131 files is sorted the way chat/, exercises/, profile/, session/ and speaking/ already were: shell, shared, home, languages, dialect, dashboard, vocabulary, listening, channels, groups, rounds, sync, practice, situations, warmup, voice, byok, auth, essays. Files moved with git mv; no barrel files, as before. The stores that are storage and nothing else (practice, focus, streak, warm-up, video), the one write path for an answer and the API error wording moved to lib/browser and lib/http. Tests that scanned or named the old paths follow, and the two that read 'this folder' still read every component. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * feat(listen): «Für dich» is the first thing under the title The rows that fit a learner's interests, or the one card that asks for them, sat below the diglossia warning. They now come straight after the title and its lead; the warning, the day's picks and the whole register stay below. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * chore(i18n): drop footer.varietyName, which nothing reads Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * chore: remove four exports and three types nothing references Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * fix(listen, profile): the interest tiles stay under the finger; the sync choice is one column on a phone Found walking the release at 390px. /listen: the first tile tapped in the invite card already makes a pick, and the card turned into the list at that moment, with the tiles pushed below three rows. The card now stays a card until «Fertig», and then the list is brought to the top of the screen. Mein Bereich, signed in: the two answers to the sync notice sat side by side inside the profile card, some 130px each, and «Nur auf diesem Gerät behalten» stood four lines tall. One column below sm. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * feat(situations): the logic of a guided run through one situation A situation was a reference list, and practising it was a random draw of eight questions. This adds what a guided five-minute run needs, as pure functions with typed results and no screens. lib/domain/situations: - planRun: every heard line in pack order with one question about its meaning, then up to two lines built from their words and said aloud, then the whole exchange again. Deterministic for a seed; a stored run is rebuilt from its step ids (heidi.situation.run.v2, per course, declared on the privacy page). - situationProgress: followed x of y and new / started / followed / due, read from the learner model's line traces and the memory's due dates. A run's answers are recorded by recordAnswer; nothing else is stored. - nextSituation, orderSituations: one recommendation with its reason, and the list with the learner's own situations first. lib/situations: optional speaker, addressee, register, answers, reviewed on a line and beats on a scene, with a validator test. Read from what the packs and the reply questions already state (lines.ts); beats are written for the fourteen scenes that were deepened by ten appended lines. Fixes at the cause: - a sitting on a scene no longer takes a quarter of its questions from the neighbouring scenes, and no longer asks a word inside a line of another scene; - a wrong meaning in «Stimmt das?» is the same sentence type as the right one wherever the scene has such a line; - the speaking task list can be held to one scene. Strings for the future screens are under situationRun in all seven dictionaries. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * feat(design): every main page opens with a place, lists are rows, and a sitting ends as a moment Shared primitives in _components/shared: Scene (a full-height photograph with the page's one headline, one line and one action on it, white on a shade in both themes), RowList/RowLink (lists as rows with hairlines, no cards), SectionHeading, and Ending (one full-screen ending for practice, the warm-up, the test and a used-up scope). The type scale is three roles in globals.css: headline, subhead, kicker. Home, practice, listening, speaking, the situations list, languages, about and Mein Bereich each open with their own Swiss place, by day and by night: 16 photographs from Wikimedia Commons, author and licence read on each file's page and listed in lib/config/photos.ts (credits on the Impressum). During an exercise the question stands alone, without a box. Motion is CSS only and off under prefers-reduced-motion. Removes hero-photo.tsx and the card boxes around lists on these pages. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * feat(situations): a situation is a guided run, and every ending hands on to one A situation page was a reference list with «Üben» at the bottom. It is now the opener of a five-minute run, one thing per screen: - /situations/<id>: a photograph of the place, one sentence, lines and minutes, one button (start, or pick up at the step it was left on); the review state said once; the old list one quiet link away (./lines). - /situations/<id>/run: each heard line alone with its one question, then the German; two lines to build and to say aloud with the speaking recorder held to this scene (played back, never marked); the whole exchange again without German, by speaker and paced; the shared ending with ONE next situation and its reason. Every answer goes through the one ledger; the place is kept. - /situations: a run left half way pinned on top, the learner's own situations, then each domain, as rows with their state. The twenty-chip picker on /practice and the board of figures are this list now. - The endings of practice, the test and the warm-up offer a situation when one is the learner's next step; the home page leads a new visitor to the warm-up; «Weiter: <situation>» on the home card and the personal page. - The warm-up's pointer now holds: its own answers made the scene it points at read "started", so it was never recommended. Design: during an exercise only close, progress and the question remain (the sitting's name and choices are behind one button in the bar); kickers and actions on one line at 390px; rows instead of boxes on listening, speaking, grammar and vocabulary; on a wide screen the shade is only where the words are. Openers with a crane, a scaffold or a flat sky are replaced, and the situations open with their own places (Wikimedia Commons, credited in lib/config/photos.ts). The responsive audit walks a run through every kind of step to its ending. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * fix(photos): the care briefs open on the lake, and the night opener has no cranes The two pictures of the hospital were a dark office front behind a parked car, and they opened every care situation. No better licensed picture of the place was found, so the care scenes open on the lake by day and at dawn, both already in the register. The blue-hour picture on the home page, the practice page and the tram brief is replaced by one without building cranes (Dark Blue Zurich, kuhnmi, CC BY 2.0, read on the file's page at Wikimedia Commons). The tram brief keeps the tram's front on a phone and leaves the car beside it out. The three unused files and their entries are removed. The alt texts of the removed pictures go with the next commit, which touches the same dictionaries. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * feat(situations): a run is one part of a situation, about five minutes A run through a whole situation was twenty-two steps, seventeen of them the same «Stimmt das?». A run now takes one part: a beat where the scene has one, about eight heard lines otherwise, with up to two lines to build, one to say aloud and the replay of that part. The next run goes on with the next part, read from the ledger (no second record); once every part has been gone through, a run revisits the part with the most lines missed or due. The brief says what the next run is (heard lines, minutes, part n of m), the ending counts the part and, while a part is ahead, its one next step is that part. Progress on the list still reads across the whole situation. Questions vary: a «Stimmt das?» can be asked the other way round as three meanings of the same scene, recorded against the same item, so one shape does not come three times running where the line can be asked another way, and the claims put to the learner are wrong about as often as right. The claim is drawn as a claim, in its own labelled frame, not as the line's translation. Stored runs keep their shape; the replay's step id now names its part, so a run stored before this is planned afresh. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * fix(model): the free chain is built in one place, pass model included Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
28e9950014 |
Pass codes, a pass that buys a stronger model, and passes for organisations (#360)
A pass changed one number nobody reaches, was sold only for Bitcoin, and was switched off. This makes a pass worth having and gives an organisation a way to get one for each of its people. - Pass codes (lib/pay/codes.ts, drizzle/0020_pass_codes.sql): the owner issues one code per person at /owner/pass-codes, each person redeems theirs on /pass. A code grants once, through paykit's extendEntitlement, and only its hash is stored. Needs no price and no OrangeCat. - /pass takes a code whether or not passes are sold for Bitcoin; a pass is a pass without a price being set (hasPass no longer depends on one). - The model a pass buys (lib/domain/model/pass-model.ts): one paid row in front of the free chain, named by HEIDI_PASS_MODELS, gated by ai-kit's spend rules. Off until configured; /pass promises it only then. - Fixed: a pass tripled the allowance only in /api/chat. Saved conversations, where a pass holder writes, counted at the open rate. - /organisations: a card for passes for a team, with a mail link. - Wording in all seven interface languages; privacy page names pass_codes; account deletion keeps a redeemed code used and unattributed. Claude-Session: https://claude.ai/code/session_019MDtmteJuDGFouA1itJ5tM Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
edf2cd32c5 |
release: informal address everywhere, engine clean-up, account limits, owner numbers (#358)
Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
38efcba8ed |
release: calmer shell, exercises that stay fresh, and the languages of Switzerland (#357)
* feat(practice): sittings that stay fresh, a level the learner moves, and a summary worth reading Half of every sitting is new while the scope has anything new; reviews that find no seat lead the next one. A question answered and not yet due is not asked again, and a used-up scope says so and offers the wider sitting. One question per word or line per sitting. The level of new questions follows the learner's own setting (easier, just right, harder) and moves by itself on a run of right answers or repeated misses, said in a line with the way back. Five named modes over the existing kinds. The end of a round names what was new, one thing to take away, tomorrow's reviews and how far through the course. Also: «Pack» is gone from what a learner reads, a typed answer is told whether it counts with only the differing words marked, picked tiles are outlined instead of filled, and the session screen cannot be double-tap zoomed. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * feat(shell): a calmer header, menu, footer and personal page; the languages of Switzerland; du in Swiss German Header: on a phone the bar is the brand, the account and one menu control, as plain glyphs. Language and light/dark moved into the menu sheet (and stay in the settings and the footer); from 1024px the language stays in the bar and its panel carries the appearance. site-header.tsx is 166 lines; the wide bar is header-nav.tsx. Menu sheet: rows with a line saying what is behind each page, one filled action, language and theme at the foot. Footer: the menu's groups, said once. Personal page: one action that names what it starts, one due line, three facts (where you left off, course progress, your words) and everything else behind one disclosure. Situations show their name, started ones only; channels are grouped with dates as people write them; no filled status pills. Languages: /languages and a home section from lib/config/languages.ts — one available, the rest planned, no dates. A 'tell me' form stores address, language, optional region, locale and time in language_interest (migration 0016, additive), rate-limited, listed on the privacy page, erased with the account whose address it is. No confirmation mail is sent, and the form says so. Feedback widget: drawn by the page (footer and menu entry, the widget's data-fc-place=host contract) instead of a tab floating over the text. Copy: Swiss German says du throughout; the German white paper and changelog too. 'Pack' is gone from learner-facing text in all seven dictionaries. French, Italian, Romansh and Russian still address the reader formally. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * fix(practice): a takeaway that is true on its own, the answered states in the responsive audit The summary's takeaway and its list of new things read a pair that holds by itself (a gap's word is no longer shown beside its whole sentence's meaning) and prefer the line furthest from German. A wrong answer keeps one short part in sight (the reason, else the rule, else the word) and folds the rest under «more on this». «Stimmt» is outlined like every other picked answer. The responsive audit now opens a typed answer, its comparison and a revealed gap, the states a phone reported cut off. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
083dd52f0d |
feat(engine): courses in data, pack-declared forms, level sources, and meanings in the learner's language (#355)
* feat(course): every stored record names its course, and today's progress is the Zurich course's A course registry (lib/course/registry.ts) lists the one course there is; lib/variety/active.ts resolves its pack. Browser stores that hold course progress move to an envelope keyed by course under .v2 keys, and a value under the old .v1 key is read as the default course without being rewritten. progress_devices, certificates and entitlements gain a course column that defaults to the Zurich course. Item ids are unique across courses, and the default course's ids are unchanged. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * refactor(variety): the pack declares its articles, persons, respellings, voices and prompt lines Article, FormLabel and VocabularyGroup were closed unions of the Zurich values, the answer comparison folded Zurich respellings for every language, word distance lower-cased as German, the voice ranking named two German tags and the prompt builder carried Swiss spelling advice. Each is now a field of the pack, read by the engine; a contract test over every pack refuses a value the pack did not declare, and the leak test also looks for the taught language's own words in engine code. The Ukrainian pack gains one verb with its own pronouns and no articles. The 2,956 published items and the system prompt are byte-identical. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * refactor(practice): an item's level comes from a source the course chooses A course entered from a sibling language measures each item's distance from that language, exactly as before; a course entered from zero reads a declared CEFR band on the word, the line or the topic. levels.ts exposes both as LevelSource and picks by Course.entry. Every published item keeps its level. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * feat(meaning): a meaning can be shown in the learner's language A meaning is the bridge form plus an optional gloss in the interface language. One pure rule (lib/domain/meaning/meaning.ts) decides what is printed from the learner's answer to «Wie gut ist dein Deutsch?»: good shows German only, as before and by default; some shows German and the gloss; none shows the gloss; without a gloss German is always shown. Every exercise, the word list and the scene pages print meanings through one component. The answer is a course store, set in the settings and asked once after the start card, only in an interface language that has glosses. Gloss sets are one file per course and language, loaded on demand. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * content(glosses): English and Russian meanings for every word and scene line; French and Italian for every word Machine drafts from the Zurich form and its German meaning together, marked unreviewed in the data. One file per language beside the pack, keyed by the German the course gives. Tests refuse a key no entry carries, an empty gloss and two glosses for one German form; pnpm run glosses:coverage prints what is covered. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * content(glosses): French and Italian meanings for every scene line Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * docs: courses, pack-declared forms, level sources and glosses, as they now are Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * refactor(variety): the pack says which grammatical person each of its labels is The gloss check and the prompt's auxiliary table, both new on main, matched the Zurich labels «ich» and «er» by name. The forms pass of the leak test caught it on rebase. The pack now declares personOf, and both read it; the system prompt and the published items are unchanged. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
300f598b05 |
feat(speaking): tasks, playback with pauses, did it get across, and the repetition ladder (#356)
* fix(speaking): a Standard German take is not corrected as dialect The take route received no variety, so a Standard German sentence spoken in the Standard German mode went through the dialect gate and the dialect rewrite: "nicht" came back as a foreign form to replace with "nöd". The client now sends the variety, the route stops before the gate and the model for a bridge take, and the check button is offered in the dialect mode only. Dialect mode is unchanged. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * feat(speaking): a take stops by itself after two minutes, and the recorder reads what the browser did lib/domain/speaking/recording.ts holds the capture constraints, the limit and the stop decision. Noise suppression and echo cancellation are asked off; automatic gain stays on because, measured, speech 40 dB down reads -52.8 dBFS with gain off against the -45 floor and would be refused. The take is kept as an in-memory object URL for the learner's own playback, never stored or sent, and revoked on the next take, reset and unmount. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * feat(speaking): the pure halves of playback, tasks, the meaning check, the ladder and the one next step timeline.ts turns pause spans into bar segments and a tap into a time. tasks.ts builds tasks from the situation packs' "say" lines, shown as their meaning. meaning.ts reads a yes/partly/no verdict and holds its missing points to the task's own. ladder.ts adapts a signal measurement to speechkit's attempt and reports a rate trend only when there are words. advice.ts picks one next action. A take's limit may be shorter than the ceiling. No pronunciation score anywhere. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * feat(speaking): hear your own take again, with your pauses drawn on the bar take-playback.tsx plays the take from the page's memory in both varieties, draws the measured pause spans as lighter stretches and seeks on a tap or an arrow key. Nothing is sent, stored or rated. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * refactor(speaking): the practice screen is a composition of pieces under 300 lines; an engine nothing called is removed No behaviour change. speaking-practice.tsx (995 lines) becomes a 130-line composition over _components/speaking/*: use-take, use-heard and seven views, moved with their comments. The wired tests read the pieces as one text. Deleted, unused outside tests: feedbackFor and Feedback, and the typed-text mapping in lib/voice/correction.ts (corrections, canCorrectVariety, Origin, Silence, CorrectionResult) with its test. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * feat(speaking): a take can answer a task, is told whether the meaning got across, and gets one next step Tasks come from the situation packs' "say" lines, shown as their Standard German meaning. The verdict (yes, partly, no, and the first missing point) rides in the dialect take's existing model call on the typed sentence; in Standard German it is one call on request, about the meaning only. The route finds the task by id, so no task text arrives from the browser. advice.ts picks one next action; "Nochmal, kürzer" climbs speechkit's pocket ladder and the recorder stops at the step's limit. The task's own line is shown after the attempt: a labelled machine voice in Standard German, text only in the dialect, where the pack has no voice. Takes gain optional variety, taskId, ladder and meaning. No pronunciation score. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
e1e36ac0e0 |
feat(listening): a lesson is one clip, asked in one order, with questions that cannot be answered by matching words (#354)
* feat(listening): machine text of dialect speech gets one question about the whole A detail question is keyed to one transcript line. Where that line was written by a recogniser that does not return the spoken variety (the pack records 25.6% word error rate, and the text comes out in the bridge), the key can be wrong. lib/channels/policy.ts decides the scope; the questions route, the stored shape and the lesson honour it. Stored sets gain version, scope and variety; older ones are written again on the next open. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * feat(listening): options may not copy the transcript, and questions are written about one clip A right option sharing four consecutive words with its evidence line, or a wrong option that stands in the transcript word for word, turns listening into matching strings: such a question is refused, generation is tried once more, and what is left of the fuller attempt is kept. lib/channels/clip.ts picks one contiguous 30 to 90 second stretch after the opening 20 seconds; the model reads that stretch only and cites the transcript's own line numbers. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * feat(listening): both players are held to the clip, and the audio controls no longer wait for an event that already fired The players gain bounds and a replay from the clip's start; playback stops once, on the way through the clip's end, so a later line tapped on purpose still plays. The audio hook reads readiness from the element: its metadata can arrive before React attaches a listener, which left the controls disabled. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * feat(listening): the lesson follows one order, names key words first, and shows the transcript after the attempt lib/channels/lesson.ts is the stage reducer: gist question before the first listen, a second listen with detail questions where the scope is full, a replay of the line after each answer, then a count and the lines to hear again. The transcript opens by itself only at the end and on request at any time. lib/channels/keywords.ts names up to three pack words whose Standard German form stands in the clip, without a model call. video-lesson.tsx is split into wiring plus lesson-before, lesson-question and lesson-summary. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
2991a50ca4 |
feat(listening): machine text of dialect speech gets one question about the whole (#351)
A detail question is keyed to one transcript line. Where that line was written by a recogniser that does not return the spoken variety (the pack records 25.6% word error rate, and the text comes out in the bridge), the key can be wrong. lib/channels/policy.ts decides the scope; the questions route, the stored shape and the lesson honour it. Stored sets gain version, scope and variety; older ones are written again on the next open. Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
28d5e9f214 |
feat(pay): a time-boxed pass, paid in Bitcoin to Heidi's OrangeCat project through @bitbaum/paykit (off until configured) (#294)
* fix(privacy): never show an email address as a person's public name Sign-up asks for no name, so requireActor's `name || email` made the email the display name of nearly every account. It was stored on speaking topics, rounds, attendance and group members, and the topics board is readable signed out: GET /api/speaking/topics returned the proposer's address. - publicName(): the chosen name, else a stable '#XXXX' handle from the actor id - migration 0011 writes the same handle over stored addresses (UPDATE only) - public topic/round lists return an account id only to its owner Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(auth): account mail in the reader's language The shared template is English only. Through accountkit's render slot, the verify / sign-in link / reset mails are written in the language of the page the link lands on (its callbackURL); locales without copy use German. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * fix(header): render the account control at request time in every build authEnabled is read at module load, so a build without BETTER_AUTH_SECRET prerendered every page with no sign-in control, and CI's layout audit measured a header narrower than production's. connection() + authStatus() make the header the same in every build; CI now starts with a throwaway secret so the audits see the real header. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * fix(ui): one primary action on the home fold; dock off phone auth forms - 'Jetzt testen' jumps to the chat, which on desktop is the column beside it: shown on phones only, leaving one primary button in the desktop fold - the floating dock launcher covered the sign-in form's buttons at 390px; hidden on phone-sized account forms only (guarded list updated) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * fix(security): outbound fetches, feed parsing and upload limits - channels: every feed/redirect/audio/transcript fetch goes through publicFetch (ai-kit validateFetchTarget per hop, 8 MB body ceiling); a signed-in user could previously make the box fetch internal addresses - push: subscribe only accepts real browser push service endpoints - sweep: one channel that throws is recorded as failed instead of failing the whole hourly sweep forever; entity decoder no longer throws or emits NUL - a pasted transcript never replaces the publisher's/platform's - feeds write at most 200 newest items (Postgres parameter limit) - synced progress kept for at most 10 devices per learner - transcribe routes refuse a declared oversize body before parsing it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * chore(packages): chatkit 0.23, plan bindings, experience ceiling, proxy.ts - @bitbaum/chatkit ^0.23.0 (the registered release) - package-plan: bindings matched to the code (createAuthMailer in mail.ts, ChatApp in workspace.tsx); experience ceiling set at zero - the five dialect/transcript text boxes carry experience-exempt reasons: dictation would turn dialect into Standard German (HEIDI.md §6) or compete with the page's own recorder - middleware.ts -> proxy.ts (Next 16 deprecation) - drop the dead limitkit git allowBuilds entry (limitkit is on npm) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * docs(changelog): 2026-11-09 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(design): adopt @bitbaum/design-tokens faces and composition grammar The type stack asked for Helvetica Neue, which only Apple ships: Windows drew Arial and Android Roboto. Inter and IBM Plex Mono are now self-hosted from the package (app/fonts.ts, generated by design-tokens-next-fonts, latin, latin-ext and cyrillic), and composition.css is loaded. Heidi keeps its own palette, as the package README asks of a product with its own brand. Also the keyframes for the sitting celebration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(practice): ask what the learner needs Swiss German for 'Meine Situationen': a learner picks the situations they actually face, and every practise button (Today, the dock, the welcome-back card) draws from them through a new multi-scene scope (?scenes=a,b). One choice is the ordinary scene scope; none is everything. Device-only, declared on the privacy page. The signed-in home leads with it; the warm-up invite is a quieter line under it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(home): shorter first screen, welcome back, a finish worth reaching - home at 390px: 10,415px -> 7,270px; the personal moments stay without their paragraphs, society's moments move to /organisations - a returning signed-out learner gets their next step above the intro - the end of a sitting shows the day earned and the week filling (no score) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(voice): server voice when the device has no German voice Read-aloud only used the browser synthesiser, so most Windows/Linux machines said 'no voice'. /api/speak reads the line with a German Gemini voice (GEMINI_API_KEY, already on the box): generateContent on gemini-2.5-flash-preview-tts, then the interactions route on gemini-3.8-flash-lite-tts; PCM wrapped as WAV; rate-limited, 600 chars, small cache. The device's own voice is still tried first, the label stays 'german', and a failed server call reads exactly as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * fix(chat): 'sign in to keep it' keeps it without asking twice Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * docs(changelog): situations, voice, home Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(practice): choose your situations on /practice too A signed-out learner has no signed-in home, so /practice is where they say what they need Swiss German for. The tiles drop their decorative checkbox: at 390px it left 94px for «Treppenhaus» and «Вечернее беспокойство»; the fill and aria-pressed carry the state. responsive audit: 1386 renders, 0 overflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(practice): instant, unmistakable feedback on every answer The right answer used to turn black whether or not it was picked, and 'wrong' had no colour, so a learner had to read the bar to know. Now: the tapped option turns green with a tick or red with a cross (pop/shake, off with reduced motion), the right one is outlined green, and the verdict is a tinted strip with a varied word of encouragement. A right answer moves on by itself after 1.3s (countdown on 'Weiter'; 'Warum?' holds it); a wrong one keeps its explanation. A short vibration on phones. '3 in Folge' when true. New correct/incorrect colour roles in light and dark. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(practice): no two sittings alike orderSession takes a seeded random and uses it only where the order was arbitrary (the alphabetical tie-break between equally due, equally weak, equally fresh questions and kinds); every new sitting gets a fresh seed. Options, word banks and matching columns are laid out afresh each time a question is shown (present.ts), answers remapped. Same seed = same sitting, no seed = the old order; due and weak items still come first (tested). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(practice): build the sentence, 'Stimmt das?', and a recognise-then-produce ladder - build: the Zurich words of a line the learner says (3-9 words), shuffled with one stranger from the same scene, tapped into order, marked by the app (134 items). Production that is objectively checkable. - verify: a heard line with a meaning beside it, true or not, one tap; false meanings come from the same scene (275 items). - ladderOf: until a line is recognised reliably, recognition forms come first; afterwards production forms. A tie-break after schedule and pressure, never before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * docs(changelog): practice rebuilt Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * style(practice): answer feedback in Heidi's own colours No green: it belonged to no other screen. The feedback roles now alias the palette: right is ink (the action colour, black / white in dark) with a tick; wrong is the flag red the theme reserves for errors, as an outline on the existing pale red tint rather than a red slab; the revealed answer is outlined in ink. The verdict strip is neutral grey or pale red; the end-of- sitting check and week cells are ink. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(practice): one measure of distance from German, and a level on every exercise lib/domain/vocabulary/distance.ts classifies a Zurich word against its German as same/close (incl. a dropped -ch/-n: au, no), rule (free once one of the pack's sound correspondences is applied: Chind, chaufe), far (nöd, öppis) or trap (the pack's mistakenFor: Estrich). The vocabulary page's 'guessable' now delegates to it. levels.ts gives every generated item a level (1 like German, 2 by a rule, 3 different) on source.level, server-side: 400 / 593 / 1964 of 2957. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(practice): skills and levels tracked; sittings move up a level as it holds - kinds/meta.ts: what each kind tests (understand, words, sounds, forms, articles, produce) and its rung, in one Record typed against the kinds; the ladder's private list of kind names is gone. - the learner model gains skills and levels axes (old records load); its axes are one MODEL_AXES list that observing, decoding and device sums read. - frontierOf: level 1 until it holds (>=12 answers, <=20% missed), then 2, then 3; stretch ranks after schedule, pressure and ladder. Skills and levels report; they do not add pressure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(home): 'Was sitzt' — answers by skill and by distance from German Right/missed counts per skill and per level, 'holds' on the same bar as the level frontier, and the level the learner is working at. Counts, not a score. Seven languages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(listening): dialect podcasts get a labelled German rendering and questions Measured 2026-11-09: no product or public model writes spoken Zurich German in dialect spelling reliably (best ~46% words right); Whisper renders it into Standard German at ~23% WER, mostly rewordings. So a dialect episode with no publisher transcript is no longer refused: the opening minutes are rendered by the existing recogniser and stored as transcript.source 'rendering', labelled on every screen as German 'sinngemäss — nicht der Dialekt, wie er klingt' (lang=de); questions are asked about content only. Nothing reads a dialect form from it (HEIDI.md updated). - channels followed by feed/app are matched to the register by name on the publisher's domain (lib/channels/spoken.ts), also at request time for channels followed before - migration 0012 re-offers episodes stored as 'none' (UPDATE only) - question prompt stays variety-neutral (leak test) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * fix(practice): what a walkthrough of every exercise found Played a sitting end to end in a browser at 390px and fixed what read wrong: - Self-check cloze said "which word is missing?" with nowhere to answer; it now says to answer aloud or in your head, then reveal. - A word's "Why?" was the same advice for every word. It now follows the distance classification: close to German, a named sound rule with the pack's example (ruleBehind), or a word to learn. - Match grids could be solved by shape (four "add an n" verbs) and could offer one meaning twice (Hoi/Salü = Hallo). Grids now mix closeness and hold at least two words German does not give away; tests pin both. - A checked sentence build kept tile padding, scattering the words; it is now one line with misplaced words marked. - Writing "nid" now notes the pack's house form "nöd" (preferredForms on the display projection; no component imports the full pack). - The finish recap printed the German answer as the missed dialect word; recapOf gives both sides. "1 kommen nochmals" is pluralised in 7 languages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(account): ask once about progress sync; finish the walkthrough fixes Signed up and used a new account on two browsers: - A new account synced nothing and said nothing; the switch lived only in settings. The signed-in home asks once (SyncOffer), either answer is kept; sync stays off until chosen. turnSyncOn/keepSyncOff are shared with the settings switch. - «Meine Situationen» joins synced progress as the `focus` key, decoded on the server like every other key, and adopted on a device only where nothing is chosen. Privacy register and sync copy say so in 7 languages. Two-device check: device two shows the situations, is not asked again. - Verification mail no longer says it "finishes" sign-up for an account that already works. The OrangeCat one-click sentence shows only where the button is (methods.signin). - Chat footer shows the model's name (modelLabel), not the route id; a German reader's gloss is not repeated; chat asks ai-kit for light reasoning so the first words come sooner. - compareWords no longer offers a typed word that matches one pack word as another's near miss. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(mail): account mail as laid-out HTML through mail-kit 0.3.0 The verify, sign-in-link and reset mails were plain text. They now carry the fleet's one layout (@bitbaum/mail-kit renderMail): Heidi's red and cow mark, a heading, one button, the sign-in code to type on another device, a note, and a footer that says why the mail arrived. Dark mode follows the reader's client. The plain-text version is unchanged and still sent alongside. Security mail carries no unsubscribe (footer.unsubscribe: null), by design. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(mail): an opt-in evening reminder that is quiet by construction One email when questions are due, off until the learner switches it on in the settings (offered with progress sync on, since the server reads what is due only from a syncing device). - lib/mail/reminder-policy.ts decides, and errs toward silence: opted in, verified address, not on day one, 18:00 in their own zone, at most every other day, five or more due, not if they practised today, and none after three in a row went unanswered. Pure, with tests. - The mail uses the fleet layout (@bitbaum/mail-kit renderMail): count, the streak only from two days, one real due line from the pack, one button, the reason it came, preferences and unsubscribe. Six languages; worded as a good moment, never as loss (HEIDI.md §3), with a test on loss words. - One-click unsubscribe: List-Unsubscribe + -Post headers (RFC 8058) and a footer link to a page with one button (a GET changes nothing, so a link scanner cannot unsubscribe anyone). Signed, non-expiring token. - mail_preferences (migration 0013), /api/mail/preferences, /api/mail/unsubscribe, /api/cron/reminders (hourly, CRON_SECRET). - Privacy register: the preference row and the mail vendor. - Checked end to end against local Postgres: sends once at 18:00, refuses a duplicate hour, refuses the next day, counts an unanswered one, unsubscribes from the page and from the one-click POST, rejects forged tokens. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * fix(account): deleting an account deletes the person; 404s lead home Found by using Heidi as its users do (64-scenario run, then deleting a test account and counting rows): - Deleting an account removed the login but left the person's synced progress, reminder setting, language, conversations, group memberships, follows, push subscriptions and certificates in the database, attached to nobody. lib/domain/account/erase.ts now removes them in one transaction after the deletion succeeded (a wrong password erases nothing). A group they made passes to its longest-standing member; their group messages stay for the others, unattributed. erase.test.ts walks the schema and fails when a table with a person column is not handled. Verified against Postgres: wrong password 400 and nothing erased; right password, every row gone. - Most unknown URLs (a typo, a removed page, /xx/…) showed Next's bare English "404" with no header and no way home, because the root layout lives under [locale]. app/global-not-found.tsx answers in the URL's or the browser's language and links home (experimental.globalNotFound). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * fix(settings): no reminder switch for accounts that share no address A person who signs in with Google or GitHub through the shared sign-in shares no email address with Heidi by design, so a reminder could never reach them, yet Settings offered the switch and it did nothing. It is not offered now. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * wip: automated passes through paykit * fix(dock): the bar never lies on a control, and the page ends clear of it The Practise / Ask Heidi pill covered Start on /practice at 390px, the password field on sign-in and the warm-up's Try it at 768px. It now checks what is under its resting place and slides away while that is a control, at every width. The footer ends one pill, its offset and the safe-area inset higher, so the last row of links is never under it. The lists the feedback widget's button sat on are marked data-fc-avoid, which the widget honours. Claude-Session: https://claude.ai/code/session_019MDtmsubNtjznXC5pMf4fD * fix(mail): send as Heidi's own domain once it is verified, and say which sender is in use Account mail carried the retired FleetCrown name in its From line. A sender cannot be renamed on faith: mail from a domain the key has not verified is refused. Heidi now asks the mail service which domains this deployment's key may send from and uses heidi.orangecat.ch, then orangecat.ch, as soon as one is verified; until then the shared sender stays. /api/health reports the From line in use and the domains the key knows. Claude-Session: https://claude.ai/code/session_019MDtmsubNtjznXC5pMf4fD * fix(legal): the Impressum names the Heidi project, privacy gives each vendor's company and country, and the offer to care homes says where it stops - Impressum: operated by the Heidi project (bitbaum), with the contact address; no person, no postal address, and no promise of one. - Privacy: each company that answers messages is listed with its legal entity and country, linked to the page that states it; no row names a company twice. - Organisations: a paragraph beside the offer says Heidi is for practising, not for the bedside, and that no personal or health details belong in it. Claude-Session: https://claude.ai/code/session_019MDtmsubNtjznXC5pMf4fD * docs(changelog): keep main's 10 November entries beside this branch's Claude-Session: https://claude.ai/code/session_019MDtmsubNtjznXC5pMf4fD * docs: the recipe for cloning Heidi into a sibling language app, and one source for the product name docs/clone-a-language-app.md: what is config, what is content and what stays in packages, in the order the steps happen. The product name was written in five places; the share card, the title template, the landing config, the manifest and the account mail now read ASSISTANT_NAME, so a clone changes it once. Claude-Session: https://claude.ai/code/session_019MDtmsubNtjznXC5pMf4fD * fix(mail): the reminder carries the same verified sender as account mail Claude-Session: https://claude.ai/code/session_019MDtmsubNtjznXC5pMf4fD * wip: privacy row for passes * wip: service test for the whole payment path * feat(pay): a time-boxed pass, paid in Bitcoin to Heidi's OrangeCat project through @bitbaum/paykit Off until a price is configured. When on: a signed-in learner gets an invoice from OrangeCat through paykit, Heidi stores which learner it was for, and the pass is granted once when OrangeCat's payment.settled webhook arrives or the open checkout page's poll sees it paid. A pass triples the chat allowance. Claude-Session: https://claude.ai/code/session_019MDtmsubNtjznXC5pMf4fD * chore: keep package-plan.json's formatting Claude-Session: https://claude.ai/code/session_019MDtmsubNtjznXC5pMf4fD --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
a3f1255010 |
Commercial readiness: accounts and sync, practice rebuilt with levels, walkthrough fixes (#282)
* fix(privacy): never show an email address as a person's public name Sign-up asks for no name, so requireActor's `name || email` made the email the display name of nearly every account. It was stored on speaking topics, rounds, attendance and group members, and the topics board is readable signed out: GET /api/speaking/topics returned the proposer's address. - publicName(): the chosen name, else a stable '#XXXX' handle from the actor id - migration 0011 writes the same handle over stored addresses (UPDATE only) - public topic/round lists return an account id only to its owner Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(auth): account mail in the reader's language The shared template is English only. Through accountkit's render slot, the verify / sign-in link / reset mails are written in the language of the page the link lands on (its callbackURL); locales without copy use German. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * fix(header): render the account control at request time in every build authEnabled is read at module load, so a build without BETTER_AUTH_SECRET prerendered every page with no sign-in control, and CI's layout audit measured a header narrower than production's. connection() + authStatus() make the header the same in every build; CI now starts with a throwaway secret so the audits see the real header. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * fix(ui): one primary action on the home fold; dock off phone auth forms - 'Jetzt testen' jumps to the chat, which on desktop is the column beside it: shown on phones only, leaving one primary button in the desktop fold - the floating dock launcher covered the sign-in form's buttons at 390px; hidden on phone-sized account forms only (guarded list updated) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * fix(security): outbound fetches, feed parsing and upload limits - channels: every feed/redirect/audio/transcript fetch goes through publicFetch (ai-kit validateFetchTarget per hop, 8 MB body ceiling); a signed-in user could previously make the box fetch internal addresses - push: subscribe only accepts real browser push service endpoints - sweep: one channel that throws is recorded as failed instead of failing the whole hourly sweep forever; entity decoder no longer throws or emits NUL - a pasted transcript never replaces the publisher's/platform's - feeds write at most 200 newest items (Postgres parameter limit) - synced progress kept for at most 10 devices per learner - transcribe routes refuse a declared oversize body before parsing it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * chore(packages): chatkit 0.23, plan bindings, experience ceiling, proxy.ts - @bitbaum/chatkit ^0.23.0 (the registered release) - package-plan: bindings matched to the code (createAuthMailer in mail.ts, ChatApp in workspace.tsx); experience ceiling set at zero - the five dialect/transcript text boxes carry experience-exempt reasons: dictation would turn dialect into Standard German (HEIDI.md §6) or compete with the page's own recorder - middleware.ts -> proxy.ts (Next 16 deprecation) - drop the dead limitkit git allowBuilds entry (limitkit is on npm) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * docs(changelog): 2026-11-09 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(design): adopt @bitbaum/design-tokens faces and composition grammar The type stack asked for Helvetica Neue, which only Apple ships: Windows drew Arial and Android Roboto. Inter and IBM Plex Mono are now self-hosted from the package (app/fonts.ts, generated by design-tokens-next-fonts, latin, latin-ext and cyrillic), and composition.css is loaded. Heidi keeps its own palette, as the package README asks of a product with its own brand. Also the keyframes for the sitting celebration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(practice): ask what the learner needs Swiss German for 'Meine Situationen': a learner picks the situations they actually face, and every practise button (Today, the dock, the welcome-back card) draws from them through a new multi-scene scope (?scenes=a,b). One choice is the ordinary scene scope; none is everything. Device-only, declared on the privacy page. The signed-in home leads with it; the warm-up invite is a quieter line under it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(home): shorter first screen, welcome back, a finish worth reaching - home at 390px: 10,415px -> 7,270px; the personal moments stay without their paragraphs, society's moments move to /organisations - a returning signed-out learner gets their next step above the intro - the end of a sitting shows the day earned and the week filling (no score) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(voice): server voice when the device has no German voice Read-aloud only used the browser synthesiser, so most Windows/Linux machines said 'no voice'. /api/speak reads the line with a German Gemini voice (GEMINI_API_KEY, already on the box): generateContent on gemini-2.5-flash-preview-tts, then the interactions route on gemini-3.8-flash-lite-tts; PCM wrapped as WAV; rate-limited, 600 chars, small cache. The device's own voice is still tried first, the label stays 'german', and a failed server call reads exactly as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * fix(chat): 'sign in to keep it' keeps it without asking twice Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * docs(changelog): situations, voice, home Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(practice): choose your situations on /practice too A signed-out learner has no signed-in home, so /practice is where they say what they need Swiss German for. The tiles drop their decorative checkbox: at 390px it left 94px for «Treppenhaus» and «Вечернее беспокойство»; the fill and aria-pressed carry the state. responsive audit: 1386 renders, 0 overflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(practice): instant, unmistakable feedback on every answer The right answer used to turn black whether or not it was picked, and 'wrong' had no colour, so a learner had to read the bar to know. Now: the tapped option turns green with a tick or red with a cross (pop/shake, off with reduced motion), the right one is outlined green, and the verdict is a tinted strip with a varied word of encouragement. A right answer moves on by itself after 1.3s (countdown on 'Weiter'; 'Warum?' holds it); a wrong one keeps its explanation. A short vibration on phones. '3 in Folge' when true. New correct/incorrect colour roles in light and dark. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(practice): no two sittings alike orderSession takes a seeded random and uses it only where the order was arbitrary (the alphabetical tie-break between equally due, equally weak, equally fresh questions and kinds); every new sitting gets a fresh seed. Options, word banks and matching columns are laid out afresh each time a question is shown (present.ts), answers remapped. Same seed = same sitting, no seed = the old order; due and weak items still come first (tested). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(practice): build the sentence, 'Stimmt das?', and a recognise-then-produce ladder - build: the Zurich words of a line the learner says (3-9 words), shuffled with one stranger from the same scene, tapped into order, marked by the app (134 items). Production that is objectively checkable. - verify: a heard line with a meaning beside it, true or not, one tap; false meanings come from the same scene (275 items). - ladderOf: until a line is recognised reliably, recognition forms come first; afterwards production forms. A tie-break after schedule and pressure, never before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * docs(changelog): practice rebuilt Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * style(practice): answer feedback in Heidi's own colours No green: it belonged to no other screen. The feedback roles now alias the palette: right is ink (the action colour, black / white in dark) with a tick; wrong is the flag red the theme reserves for errors, as an outline on the existing pale red tint rather than a red slab; the revealed answer is outlined in ink. The verdict strip is neutral grey or pale red; the end-of- sitting check and week cells are ink. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(practice): one measure of distance from German, and a level on every exercise lib/domain/vocabulary/distance.ts classifies a Zurich word against its German as same/close (incl. a dropped -ch/-n: au, no), rule (free once one of the pack's sound correspondences is applied: Chind, chaufe), far (nöd, öppis) or trap (the pack's mistakenFor: Estrich). The vocabulary page's 'guessable' now delegates to it. levels.ts gives every generated item a level (1 like German, 2 by a rule, 3 different) on source.level, server-side: 400 / 593 / 1964 of 2957. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(practice): skills and levels tracked; sittings move up a level as it holds - kinds/meta.ts: what each kind tests (understand, words, sounds, forms, articles, produce) and its rung, in one Record typed against the kinds; the ladder's private list of kind names is gone. - the learner model gains skills and levels axes (old records load); its axes are one MODEL_AXES list that observing, decoding and device sums read. - frontierOf: level 1 until it holds (>=12 answers, <=20% missed), then 2, then 3; stretch ranks after schedule, pressure and ladder. Skills and levels report; they do not add pressure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(home): 'Was sitzt' — answers by skill and by distance from German Right/missed counts per skill and per level, 'holds' on the same bar as the level frontier, and the level the learner is working at. Counts, not a score. Seven languages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(listening): dialect podcasts get a labelled German rendering and questions Measured 2026-11-09: no product or public model writes spoken Zurich German in dialect spelling reliably (best ~46% words right); Whisper renders it into Standard German at ~23% WER, mostly rewordings. So a dialect episode with no publisher transcript is no longer refused: the opening minutes are rendered by the existing recogniser and stored as transcript.source 'rendering', labelled on every screen as German 'sinngemäss — nicht der Dialekt, wie er klingt' (lang=de); questions are asked about content only. Nothing reads a dialect form from it (HEIDI.md updated). - channels followed by feed/app are matched to the register by name on the publisher's domain (lib/channels/spoken.ts), also at request time for channels followed before - migration 0012 re-offers episodes stored as 'none' (UPDATE only) - question prompt stays variety-neutral (leak test) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * fix(practice): what a walkthrough of every exercise found Played a sitting end to end in a browser at 390px and fixed what read wrong: - Self-check cloze said "which word is missing?" with nowhere to answer; it now says to answer aloud or in your head, then reveal. - A word's "Why?" was the same advice for every word. It now follows the distance classification: close to German, a named sound rule with the pack's example (ruleBehind), or a word to learn. - Match grids could be solved by shape (four "add an n" verbs) and could offer one meaning twice (Hoi/Salü = Hallo). Grids now mix closeness and hold at least two words German does not give away; tests pin both. - A checked sentence build kept tile padding, scattering the words; it is now one line with misplaced words marked. - Writing "nid" now notes the pack's house form "nöd" (preferredForms on the display projection; no component imports the full pack). - The finish recap printed the German answer as the missed dialect word; recapOf gives both sides. "1 kommen nochmals" is pluralised in 7 languages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(account): ask once about progress sync; finish the walkthrough fixes Signed up and used a new account on two browsers: - A new account synced nothing and said nothing; the switch lived only in settings. The signed-in home asks once (SyncOffer), either answer is kept; sync stays off until chosen. turnSyncOn/keepSyncOff are shared with the settings switch. - «Meine Situationen» joins synced progress as the `focus` key, decoded on the server like every other key, and adopted on a device only where nothing is chosen. Privacy register and sync copy say so in 7 languages. Two-device check: device two shows the situations, is not asked again. - Verification mail no longer says it "finishes" sign-up for an account that already works. The OrangeCat one-click sentence shows only where the button is (methods.signin). - Chat footer shows the model's name (modelLabel), not the route id; a German reader's gloss is not repeated; chat asks ai-kit for light reasoning so the first words come sooner. - compareWords no longer offers a typed word that matches one pack word as another's near miss. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(mail): account mail as laid-out HTML through mail-kit 0.3.0 The verify, sign-in-link and reset mails were plain text. They now carry the fleet's one layout (@bitbaum/mail-kit renderMail): Heidi's red and cow mark, a heading, one button, the sign-in code to type on another device, a note, and a footer that says why the mail arrived. Dark mode follows the reader's client. The plain-text version is unchanged and still sent alongside. Security mail carries no unsubscribe (footer.unsubscribe: null), by design. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * feat(mail): an opt-in evening reminder that is quiet by construction One email when questions are due, off until the learner switches it on in the settings (offered with progress sync on, since the server reads what is due only from a syncing device). - lib/mail/reminder-policy.ts decides, and errs toward silence: opted in, verified address, not on day one, 18:00 in their own zone, at most every other day, five or more due, not if they practised today, and none after three in a row went unanswered. Pure, with tests. - The mail uses the fleet layout (@bitbaum/mail-kit renderMail): count, the streak only from two days, one real due line from the pack, one button, the reason it came, preferences and unsubscribe. Six languages; worded as a good moment, never as loss (HEIDI.md §3), with a test on loss words. - One-click unsubscribe: List-Unsubscribe + -Post headers (RFC 8058) and a footer link to a page with one button (a GET changes nothing, so a link scanner cannot unsubscribe anyone). Signed, non-expiring token. - mail_preferences (migration 0013), /api/mail/preferences, /api/mail/unsubscribe, /api/cron/reminders (hourly, CRON_SECRET). - Privacy register: the preference row and the mail vendor. - Checked end to end against local Postgres: sends once at 18:00, refuses a duplicate hour, refuses the next day, counts an unanswered one, unsubscribes from the page and from the one-click POST, rejects forged tokens. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * fix(account): deleting an account deletes the person; 404s lead home Found by using Heidi as its users do (64-scenario run, then deleting a test account and counting rows): - Deleting an account removed the login but left the person's synced progress, reminder setting, language, conversations, group memberships, follows, push subscriptions and certificates in the database, attached to nobody. lib/domain/account/erase.ts now removes them in one transaction after the deletion succeeded (a wrong password erases nothing). A group they made passes to its longest-standing member; their group messages stay for the others, unattributed. erase.test.ts walks the schema and fails when a table with a person column is not handled. Verified against Postgres: wrong password 400 and nothing erased; right password, every row gone. - Most unknown URLs (a typo, a removed page, /xx/…) showed Next's bare English "404" with no header and no way home, because the root layout lives under [locale]. app/global-not-found.tsx answers in the URL's or the browser's language and links home (experimental.globalNotFound). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * fix(settings): no reminder switch for accounts that share no address A person who signs in with Google or GitHub through the shared sign-in shares no email address with Heidi by design, so a reminder could never reach them, yet Settings offered the switch and it did nothing. It is not offered now. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvF6Smf3iMYnGBqi12 * fix(dock): the bar never lies on a control, and the page ends clear of it The Practise / Ask Heidi pill covered Start on /practice at 390px, the password field on sign-in and the warm-up's Try it at 768px. It now checks what is under its resting place and slides away while that is a control, at every width. The footer ends one pill, its offset and the safe-area inset higher, so the last row of links is never under it. The lists the feedback widget's button sat on are marked data-fc-avoid, which the widget honours. Claude-Session: https://claude.ai/code/session_019MDtmsubNtjznXC5pMf4fD * fix(mail): send as Heidi's own domain once it is verified, and say which sender is in use Account mail carried the retired FleetCrown name in its From line. A sender cannot be renamed on faith: mail from a domain the key has not verified is refused. Heidi now asks the mail service which domains this deployment's key may send from and uses heidi.orangecat.ch, then orangecat.ch, as soon as one is verified; until then the shared sender stays. /api/health reports the From line in use and the domains the key knows. Claude-Session: https://claude.ai/code/session_019MDtmsubNtjznXC5pMf4fD * fix(legal): the Impressum names the Heidi project, privacy gives each vendor's company and country, and the offer to care homes says where it stops - Impressum: operated by the Heidi project (bitbaum), with the contact address; no person, no postal address, and no promise of one. - Privacy: each company that answers messages is listed with its legal entity and country, linked to the page that states it; no row names a company twice. - Organisations: a paragraph beside the offer says Heidi is for practising, not for the bedside, and that no personal or health details belong in it. Claude-Session: https://claude.ai/code/session_019MDtmsubNtjznXC5pMf4fD * docs(changelog): keep main's 10 November entries beside this branch's Claude-Session: https://claude.ai/code/session_019MDtmsubNtjznXC5pMf4fD * docs: the recipe for cloning Heidi into a sibling language app, and one source for the product name docs/clone-a-language-app.md: what is config, what is content and what stays in packages, in the order the steps happen. The product name was written in five places; the share card, the title template, the landing config, the manifest and the account mail now read ASSISTANT_NAME, so a clone changes it once. Claude-Session: https://claude.ai/code/session_019MDtmsubNtjznXC5pMf4fD * fix(mail): the reminder carries the same verified sender as account mail Claude-Session: https://claude.ai/code/session_019MDtmsubNtjznXC5pMf4fD --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
00cdb3bb99 |
fix(mail): send as Heidi's own domain once it is verified, and say which sender is in use (#290)
Account mail carried the retired FleetCrown name in its From line. A sender cannot be renamed on faith: mail from a domain the key has not verified is refused. Heidi now asks the mail service which domains this deployment's key may send from and uses heidi.orangecat.ch, then orangecat.ch, as soon as one is verified; until then the shared sender stays. /api/health reports the From line in use and the domains the key knows. Claude-Session: https://claude.ai/code/session_019MDtmsubNtjznXC5pMf4fD |
||
|
|
9b48fab680 |
chore(deps): bip-kit, limitkit, ai-forms and threadkit from the @bitbaum scope (#286)
Owner, 2026-11-06: the fleet's packages belong under the @bitbaum npm organization (fleet docs/package-scope-migration-plan.md). Same code and versions; dependency keys and import specifiers moved with scripts/packages/rename-package.mjs from fleet. Claude-Session: https://claude.ai/code/session_019MDtmvpWNTLxXNfwUHS7MD Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
a1e72bff25 |
feat(chat): /chat on chatkit's ChatApp (#226)
The full chat is now the fleet's chat app (@bitbaum/chatkit 0.18 ChatApp): header, list as a drawer on a phone and a rail from 64rem with search and Today/Yesterday/Earlier, rename and delete, New chat, Temporary chat, the queue, Stop and the open conversation back after a reload. Heidi keeps its transport, routes, words and answer view. - transport: savedConversationTransport (signed in) or the streamed stateless /api/chat (signed out, temporary), mapped onto ChatTurn; Stop clears the unchecked half answer; a failure keeps its own sentence - stores: httpConversationStore over /api/conversations with serverWritesTurns, rows mapped by fromRows; signed out, chatkit's device store under heidi.chats (declared in privacy.ts; delete-everything now removes a key's whole family) - answer view under chatkit's answer (AnswerFooter in transcript.tsx) - POST /api/conversations takes the title ChatApp derives - the home box's or dock's thread is carried into the list (still going) or offered (older); signed in, device writing is offered to the account - deleted: conversation-list.tsx, the hand-built header, drawer, sidebar, new-chat and restore wiring in workspace.tsx, conversationTransport, MenuIcon, the heidi-chat-scroll CSS Claude-Session: https://claude.ai/code/session_018WZnBnaLP6RhwFkLxRTKgE Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
8a6f7a9a8a |
fix(chat): a sent message is shown once, and a turn with no answer says so (#225)
The solo and group routes return the reader's own stored row as well as Heidi's reply; run() had already drawn the message optimistically and appended the server copy too, so it showed twice, and with no reply it was the only thing on screen. The stored row now replaces the optimistic one. The solo route says answered:false when it made no reply and the transport maps it to the failure bubble with Retry (groups keep silence). A ref gates double submits. Claude-Session: https://claude.ai/code/session_018WZnBnaLP6RhwFkLxRTKgE Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
fb10722852 |
feat(chat): the answer feedback loop — thumbs, transcript export, nightly review (#205)
* feat(chat): the answer feedback loop — thumbs, transcript export, nightly review Every answer in Heidi's chat now carries chatkit 0.14's thumbs. A thumb down asks why in one tap (the reasons in all seven site languages) and the thumb is kept in a new `chat_feedback` table through `POST /api/chat/feedback` (zod, chat-rate limited, same-origin; a saved conversation's thumb needs its owner, the browser-only draft's needs nobody). `GET /api/chat/review-export` hands the fleet's nightly reviewer the saved conversations of the last day — bearer `CHAT_REVIEW_TOKEN` compared in constant time, 401/503 as the spec says, at most 50 conversations of 30 turns, no deleted ones, the gate's verdicts as steps, the thumbs beside them, never an actor id, a name or an address — with Heidi's scope read from her own system prompt rather than typed twice. The fleet's one row under an answer (Copy · Listen · thumbs) replaces the second Speak Heidi drew on the explanation; her own Speak and its caveat stay on the dialect lines, where which voice the device has is a claim worth making. Migration 0009 via drizzle-kit; the export is tested against an in-memory Postgres with Heidi's migrations applied. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018WZnBnaLP6RhwFkLxRTKgE * test(chat): the no-database cases take DATABASE_URL away, not assume it CI runs the unit tests against a Postgres service with every migration applied, so the two "no database on this deployment" cases met a database and got the 201 and the 200 they guard against. Each now removes DATABASE_URL for its own duration and restores it; the routes read it at call time, so the 503 path is what runs. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018WZnBnaLP6RhwFkLxRTKgE --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
0bbab8b516 |
feat(channels): podcasts in the follow loop, a leak gate for the packs, French recorded as the next product (#204)
* feat(channels): podcasts in the follow loop, a leak gate for the packs, and French recorded as the next product Podcasts. A podcast is RSS with an audio enclosure per episode — the same shape as a channel's Atom feed — so the same sweep reads it (lib/channels/rss.ts, source.ts: one Source/Item shape both platforms project onto). A pasted publisher page resolves to its feed through the page's autodiscovery link, an Apple Podcasts link through Apple's keyless lookup; Spotify publishes no feed and the form says so. Every podcast and YouTube row on /listen carries «Folgen», and the channels page suggests the register's podcasts first. An episode plays in the browser's own <audio> element (seek, back five seconds, 0.75× with pitch kept). Its transcript is the publisher's where the feed links one (SRT, WebVTT, the namespace's JSON); otherwise Heidi transcribes the opening minutes herself with the bridge recogniser — the first six megabytes of the enclosure by a Range request, once per episode, shared, labelled as automatic with how far it reaches — and only when the pack trusts a recogniser for the bridge and the register does not call the source dialect, where the recogniser would translate rather than transcribe (§8). Migration 0009 adds kind, feed_url, spoken and image_url to channels and the enclosure columns to items. The leak gate. HEIDI.md's house rule — nothing outside the packs names the variety — now has lib/variety/leak.test.ts behind it: every string literal in lib/ outside the packs, the seams, the dictionaries, the register and the deployment's own config is checked, and the count per file is pinned to a baseline that may only fall. The baseline is the to-do list for the next product. French next. HEIDI.md §4 records the decision (French for Romandie first, Ukrainian after, the French product not named Heidi) and the six-step recipe that makes "now build it" a command: a pack, two seams, the UI languages, the deployment's own facts, the leak baseline, a repo. The roadmap carries it in both languages and ROADMAP.md. Checked signed in, on a 390px viewport, against a local Postgres: sign-up, follow a podcast (Echo der Zeit, page → feed) and a channel (@srfnews), the lists, an episode, a video, settings. No overflow, no console errors. 1207 tests. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKRxpcVWoZwtg6Gfr9m6Rb * fix(listen): two rows that clipped at 320px in Russian The layout audit (`pnpm run audit:responsive`, de/fr/ru × 320/360/390 × light/dark, 594 renders) found two, both on /listen in Russian at 320px, both the same shape: a word wider than the column the button beside it left. - The «Follow channels» card put its title and «To your channels →» in one row; «Подписаться» alone was wider than the 90px the arrow left. The card stacks below `sm` and goes back to one row from there. - A source row's name sits in a two-column header beside «Folgen»; with the Russian button the name's column is 142px and «Wissenschaftsmagazin» is 177px. The name may now break inside a word, but only when the word alone is wider than the column (`wrap-anywhere`; `break-words` leaves a flex item's minimum at the whole word). After the change the same 594 renders measure 0 with overflow. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKRxpcVWoZwtg6Gfr9m6Rb * fix(auth): take accountkit 0.5.2, so signed-in pages see who is signed in The signed-in walkthrough found every server component drawing the signed-out state: accountkit's getSession() returned better-auth's raw user, without the actorId Heidi's pages key on, while the API routes, going through requireUser(), had it. The dashboard and «Your channels» asked you to sign in while the follow itself worked. bitbaum/accountkit#11 (v0.5.2) gives both readers one path. This pins it and records the fix in the changelog. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RKRxpcVWoZwtg6Gfr9m6Rb --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
266e536b69 |
feat(channels): follow YouTube channels, get told about new videos, answer questions about them (#202)
The listening lab, built on the media that already exist. A learner follows
YouTube channels they watch anyway (a link, a video link or the @handle, or
one of the register's rows with what is spoken beside it); Heidi reads each
channel's public Atom feed — no API key — hourly on the box and inline when
the page opens, lists what is new since the last visit, and sends a Web Push
to the browsers that asked. Following rings for the next video, never the
back catalogue, and nothing here reminds anyone to practise.
One video is the lab's exercise in HEIDI.md's order: a gist question before
the first listen, three to five detail questions in the bridge after it,
each wrong answer answered with the line that was said and a button that
plays that second (IFrame API seek), then the transcript, tap a line to hear
it. A count with its denominator, no score. What was answered stays in the
browser (heidi.videos.v1) and feeds the streak.
The transcript is the platform's captions, in a language the pack accepts
(lib/channels/accepted.ts: the target, then sibling/roof bridges; never a
gloss language; automatic captions only where the pack trusts the
recogniser), and its source is printed every time: the publisher's,
automatic («bei Mundart oft falsch») or pasted. YouTube refuses data-centre
addresses the caption tracks often enough that the refusal is a first-class
state: the screen then shows the three steps to copy the transcript from
YouTube's own panel, and parsePasted reads that format, SRT and WebVTT.
Questions are written by the model from the transcript once per video, on
the first follower's request (never in the sweep — no background job spends
the free pool), refused unless every detail question cites a real line, and
shared with every follower.
Schema: channels, channel_videos, channel_follows, push_subscriptions
(drizzle/0008). Routes: /api/channels, /api/videos/[id]/{transcript,
questions}, /api/cron/channels (bearer CRON_SECRET), /api/push/*. Pages:
/channels, /channels/[video], a dashboard panel, a settings section, an
invitation on /listen. Seven dictionaries, privacy flows, HEIDI.md,
CHANGELOG. The box's hourly timer row is in loki's install-app-crons.sh;
CRON_SECRET and VAPID_* in .env.example.
Claude-Session: https://claude.ai/code/session_01RKRxpcVWoZwtg6Gfr9m6Rb
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|
|
2093dd401a |
feat(accounts): Heidi has its own accounts; OrangeCat is one way in, not the only one (#191)
* wip(accounts): Heidi on @bitbaum/accountkit/auth (accountkit pin pending) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QDMxjTqKNLXETMYYuapMa3 * feat(accounts): Heidi has its own accounts; OrangeCat is one way in, not the only one Email and password, passkeys and two-step codes from @bitbaum/accountkit/auth, with the shared screens in Heidi's seven languages. People whose first way in was OrangeCat keep their actor id, so no row moves. next-auth removed; the session secret falls back to the existing AUTH_SECRET. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QDMxjTqKNLXETMYYuapMa3 --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
5d5a9dff68 |
feat(chat): suggested replies — one tap sends the likely next message (#185)
After an answer that asks something back, or whose next step is obvious, two to four replies sit under the LATEST answer, written by the model in the reader's language; one tap sends it through the same `send` the composer uses. From @bitbaum/chatkit 0.6 (bitbaum/chatkit#13). - package.json / pnpm-lock.yaml: chatkit repinned 0.4.1 → 0.6.0 (163c879, chatkit#13 merged). 0.5 and 0.6 are additive (heldAttachments, replies); nothing Heidi uses changed. - respond.ts: REPLIES_PROMPT = chatkit's REPLIES_INSTRUCTION verbatim, plus two Heidi lines — the block goes after the JSON object, and never restates a `next` move. Off for groups (`suggestReplies: false`): a reply "in the person's voice" has no one person in a room, and groups render no chips. - parse.ts: `extractReplies` takes the block out of the raw answer BEFORE the JSON is read, so it never reaches `text`, storage, history, copy or speech. On the variety's own site a reply faces the explanation's gate; a refused one is dropped. The streamed preview reads only `text` (test added). - answer.ts: stored replies re-bounded by chatkit's own rule. - answer-view.tsx / transcript.tsx: chatkit's <ChatReplies>, under the last answer only, never while a turn runs, never on a surface that cannot send. - i18n: `chat.replies`, the row's accessible name, in all seven locales. Fixed on the way: - use-conversation.ts cleared the composer on EVERY send, so tapping a chip (and now a reply) threw away a half-typed message. chatkit's Composer already clears its own draft after a send, and only what it sent. - chat.tsx subscribed to `useCompact()` and never read it (lint warning). Claude-Session: https://claude.ai/code/session_01Mg5wrkfw95JWfmAz8yRT1j Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
1bf6bd3c31 |
feat(practice): questions come back before they are forgotten (#153)
* fix(practice): no two-question tests, no giveaway wrong answers - A scope offers a test only with TEST_MIN (10) markable questions; a test link below that opens practice of the same scope. - Possession and wo-relative transform questions: wrong answers keep the same people and things, so only the dialect form decides. - Split the whose lesson: possession only; new relative lesson for wo. - Template docs: the no-giveaway rule. Co-authored-by: Cursor <cursoragent@cursor.com> * feat(practice): questions come back before they are forgotten - memory.ts: per-question schedule (REVIEW_STEPS 1/3/7/16/35 days), miss back to start, first answer per sitting only. - orderSession seats due questions first (all of them, across kinds), then new, then resting. - Practice and warm-up record; the test does not. - Due today on /practice, due tomorrow at the end of a sitting. - Stored as heidi.practice.memory.v1, declared on /privacy, synced (newest answer per question wins). Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
25d45963c2 |
Heidi answers what you wrote last, Swiss German all the way through, and starting again is one tap (#146)
* fix(chat): Heidi answers the newest message, and starting again is one tap - Render the model prompt ourselves: earlier turns marked as answered context, the newest message set apart. threadkit's flat transcript made «Pire» after three «Le Bilan» turns get a fourth «Le Bilan» sentence in 4 of 6 live runs; none after. - Heidi's past turns carry the dialect line she wrote; the draft route accepts it in history. Context capped at 20 turns on every surface. - Prompt: answer only the newest message; a lone word asks about that word. - decodeAnswer keeps mode 'answer' instead of collapsing it to 'understand'. - One NewChatButton: phone toolbar above the chat, dock header icon, sidebar. - Chats fit above the phone keyboard (interactive-widget + visualViewport). - /chat gets a fresh key per request so the header's Chat link never re-renders the conversation just left; sidebar closes on Escape. Co-authored-by: Cursor <cursoragent@cursor.com> * feat(i18n): Swiss German first, and Heidi explains in it in every conversation - Language menu, footer and settings share MENU_ORDER: dialect first. - A saved conversation follows the page's locale on every message instead of the one it was created in (stored locale is the fallback). - Suggestion labels come from a closed list and render via the dictionary; tones are translated; 'bridge' is no longer printed as a label. - Prompt: every 'english' field is written in the explanation language. - forReader strips translations of dialect suggestions for readers whose locale is the taught variety. - lang on explanation text is the reader's locale, not 'en'. Co-authored-by: Cursor <cursoragent@cursor.com> * feat(i18n): a signed-in learner's language follows them to every device Picking a language in the header, footer or settings saves it to the account (new additive table `preferences`, migration 0006). Every sign-in returns through /api/account/language, which puts the saved language into the page the learner lands on. German stays the default; signed out, nothing is stored. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(chat): the phone toolbar fits 320px in every language «Nouvelle conversation» beside «Conversations» overflowed a 320px phone by 17px (layout audit, fr/chat). Both buttons now shrink to an ellipsis. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
c19c9146a6 |
feat(model): bring your own key through ai-kit — every vendor, the key's own models, no paid check (#138)
Per the Loki session's fleet-wide request (loki#921 is the reference): - Vendors come from @bitbaum/ai-kit BYOK_VENDORS (^1.17.0): ten instead of Heidi's own five, Anthropic and Gemini included; byokChain delegates to ai-kit's (dailyTokens pinned to 0 — Heidi's free chain shares provider ids). - /api/model/check uses probeByokKey: no tokens spent (it made a real completion), the key's own model list with the strongest suggested, the vendor's words on failure (redacted again here), 'unreachable' kept apart from 'wrong key'. - The sheet: paste -> auto-check (600 ms) -> a select of the key's models, strongest preselected and marked; free text only when no list. The key stays in this browser only. - No per-vendor 'text only' guess: ai-kit routes images on observed capability. - Also: 'no streaks' was still claimed in 7 languages (landing pillar, method claim) after streaks shipped — reworded to what is true. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
3e28a8d819 |
feat(dialect): regional forms from the literature, with links on every dialect page (#137)
Researched against the SDS digital edition (sprachatlas.ch), the Dialäktatlas
2025 and the regional grammars/dictionaries (links checked to resolve).
- Regional rules now cite sources (a test refuses one without); the SDS
volume/map is in each reason. New: Wallis (appas, wier, wilt, Häärpfel,
Aache, güet), Innerschweiz (Gumel, Eiker), Ostschweiz (näbis), Glarus
(schüü), Sense (gùgge), Graubünden (eswas), Bern (iig, geisch, geit, Hung).
- Wrong claims removed: het, goht, stoht, nid, nit are attested inside the
canton of Zurich (SDS 3/48, 3/57, 4/167) and d/t in 'Dütsch' is spelling
(DWDS) — all now house style ('dispreferred'), no region named. sai, gäu,
vilmau dropped (no source); güet re-filed as Wallis/Uri (SDS 1/142);
Strassenbahn is Swiss spelling, no longer a 'Germany' form.
- Every area page lists its literature: 24 new sources (DNB/e-helvetica/DOI).
- Our own copy is checked at house-style level; the 'Which is Zurich?'
exercise only quizzes forms the gate refuses outright.
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
||
|
|
9dd35de059 |
refactor(roadmap): a say goes through Solon — remove anonymous votes and comments (#135)
Voting on the roadmap and commenting on changes were open to anyone with a browser key. A voice is a right someone holds: it belongs in Solon, with the OrangeCat account Heidi already uses and a seat in Heidi's organisation there. The roadmap and changelog are read-only again; /api/feedback, lib/feedback, its limiters, labels and the bip-kit stylesheet are removed. The stored rows stay (no destructive migration) and the privacy page still lists them. 'Mitreden über Solon' is back on the roadmap; the changelog records the reversal. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
f1d8e5cdad |
feat(teams): a group can be a team — focus, consented sharing, an organiser's overview (#132)
A group's organiser picks a focus (a situation domain, e.g. care). Each member decides for themselves, per team, whether the organiser sees their standing in those situations, and can take it back; until then the organiser sees a name only. What is shown is the standing per situation (new/met/steady/sure) and the number of certificates — never which lines or answers; the server never sends them. A member who shares without sync shows as 'nothing to see yet', not 'not started'. Migration 0005 (study_groups.focus, group_members.shares_progress). Routes: GET/PUT /api/groups/[id]/team (organiser only), PUT /api/groups/[id]/share (the member themself). The organisations page leads with what a team can do today instead of a disclaimer. Teams move from roadmap to changelog. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
110f6e5ab3 |
feat(progress): progress on every device (opt-in), and a certificate per situation (#131)
Sync: signed in, off by default. Each device stores only what it observed; the server keeps each device's records apart (progress_devices) and pages show the sum, so nothing is counted twice however often devices sync. Model: sum; history: union; streak: newest record, best of all; saved words: the newest list is adopted, so deletions stay deleted. Server-side, every value goes through the browser's own decoder and is stored normalised. Off removes this device's copy; 'delete everything synced' removes all. Certificates: issued by the server from synced progress with the same strengthOf the situation page uses, only at 'sure'. A public, noindex page per certificate shows the situation, date and what was measured; no name (one can be typed for printing and is not stored). The scope line says it is listening comprehension in one situation, not a language diploma. Migration 0004 (progress_devices, certificates); both in APP_TABLES. Privacy flows declared; the practice note now says 'unless you switch sync on'. Roadmap items move to the changelog. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
dcb82c8cf1 |
feat(feedback): the roadmap and changelog can be answered (bip-kit 0.4.0) (#130)
Every roadmap item can be marked 'I need this' or 'not for me' and commented on; anything missing can be suggested, with similar suggestions shown while typing; every changelog entry has a comment thread. No account: a random key the browser keeps. Rules (spam, one vote per browser, duplicates, honeypot) are bip-kit's; Heidi supplies a Postgres FeedbackStore (4 tables, migration 0003), the allowed ids, and rate limits. Roadmap items carry stable ids shared by de/en; changelog entries are numbered within their day from the oldest. Also: shipped items (situations, feedback) move from roadmap to changelog, and the situations notice no longer claims Idiotikon attestation, which nothing checks yet. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
2aaaba0afc |
feat(dialect): where is this message from — a reader built on the gate (#127)
Paste a message you received; Heidi shows which forms point to which dialect area (or to Germany's German), what Zurich says instead, and what each Zurich word means. Built from pack data only: rules with an origin, bridge rules, and the vocabulary with its listed forms. Too little text reads as unclear, never a confident guess. Adds five textbook regional markers (Bern: Giel, Meitschi, Miuch; Basel: Kuchi, Drämmli) and re-attributes 'nid' from Ostschweiz to Bern (the east says nöd like Zurich). Streaks and the reader move from roadmap to changelog. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
d73ac3c391 |
refactor(speech): the engine is @bitbaum/speechkit now — and grammar stops presenting a guess as the answer (#125)
* refactor(speech): the engine is @bitbaum/speechkit now — and grammar stops presenting a guess as the answer Heidi's speech engine — signal measurement, the evidence rule, fluency, hesitations, dialect markers, grammar mapping, the LanguageTool client — moved into github:bitbaum/speechkit#v1.0.0 (dist committed, no build step; npm once bootstrapped). 20 files leave this repo; 82 of their tests moved with them and run there (90 in the package). Heidi keeps what is Heidi's: which measures it CLAIMS (capability.ts), the Zurich pack's marker tests, and the product. The package reads no environment, so the route now passes LANGUAGETOOL_URL itself. THE WIRED GUARD, REBUILT. It checked that a measure's FILE was reachable from app/; once the engine is a package nothing imports its internal files. Each measure now names its entry function and the test requires something reachable to import it. Mutation-proven: dropping checkGrammar from the route fails it by name. The source-link test also now checks the file EXISTS — the old one checked only that a string looked like a path, which is how /technology linked readers to a gate.ts that never existed. The links are real links now. GRAMMAR SHOWED A WRONG CORRECTION. Measured on the live site after #123: LanguageTool offers "dem Buch" FIRST and "das Buch" second for "Er hat den Buch gelesen", and the page showed only the first — a wrong fix presented as the answer. All alternatives now, and a line saying which one fits depends on what the speaker meant (seven languages). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(investors): count the tests that moved, instead of overstating them The data room claimed 111 test files; the speech engine's 11 moved into @bitbaum/speechkit, leaving 103 here. The ratchet caught it. The figure is now 842 across 103, plus its own row for the open-source engine (94 tests, checkable at github.com/bitbaum/speechkit) — moved, not dropped. Also: ADVERTISED_TEST_FILES was declared below METRICS, so the string could not reference it and carried its own literal 111 — 'said once' was false. It is declared above and used now. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
87f7e8bad9 |
feat(speaking): grammar and word-search feedback, and a claim may not outrun the product (#123)
* feat(speech): self-hosted grammar checker, and the client that says 'not checked' instead of 'clean' LanguageTool 6.8 on the box, loopback-only and memory-capped (scripts/box/provision-languagetool.sh). checkGrammar() returns null when the checker is down — never [], which would tell a learner their German was clean on the day the checker was off. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * feat(speaking): grammar wired, hesitations located, and a claim may not outrun the product GRAMMAR. The Swiss Standard German take is now checked by LanguageTool on our own box, gated on mayJudgeForm (WER within the line), filtered to what a listener would notice. null = not checked, never []. WHERE YOU HESITATED. ai-kit 1.16.0 word timings name the word that came after each long gap — usually the one being reached for. Deliberately NOT a second fluency computation: #83 measures rate and pauses on the device from the signal (the better clock), and two answers from two sources would disagree on one screen. The server adds only what the device cannot know. THE GUARD. capability.ts computed what was POSSIBLE and never asked what was WIRED, so /technology claimed grammar while nothing called it. The new test walks the import graph from app/ and requires every offered measure's module to be reachable. It found a second bug on its first run: the "words" row pointed readers at lib/variety/gate.ts, which never existed (now check.ts). Proven by mutation: detaching grammar from the route fails it by name. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * feat(speaking): grammar and hesitations on screen, and the upload the privacy page never listed ON SCREEN. A Standard German take now shows what was said and what to say instead ("den Buch → das Buch"), at most three, with "the first 3 of 5" when there were more, and where the long pauses fell ("1.8 s before «Termin»"). Not-checked renders as a sentence, never as an empty space that reads as "no mistakes". The checker's German explanations are deliberately not shown — they would leak German prose into six other locales; the pair needs no translation. The limit is printed beside the result: it catches agreement, case and verb forms, not verb position after «weil» (measured on the box). PRIVACY. /api/speaking/transcribe has uploaded Standard German takes to Groq since the transcription mode shipped, and the privacy page had no row for it — its code comment still said there was "no upload endpoint for takes". The claim lived in a comment rather than a test, so nothing noticed it go false. New flow `speakingTranscription` in all seven languages: only when you choose Standard German, audio not kept by us, grammar checked on our own server. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(speaking): name hesitations from the signal's pauses, because Whisper swallows them Tested on real audio before shipping: Commons recordings stitched as "Er hat den [1.8 s] Buch gelesen", sent to Groq whisper-large-v3-turbo with word timings. Text right, grammar error preserved — and NO gap between any words: "Buch" came back as 1.84–4.14 s, stretched across the whole pause. Detecting hesitations from word gaps would never have fired on real speech; the unit tests passed only because their timings were idealised. So measure() now records where each pause was (pauseSpans), the route returns the word timings, and the page joins them: a pause belongs to the word still being spoken when sound resumed. Same answer whether the recogniser leaves a gap or swallows it — both shapes pinned, the second with Groq's exact output. pauseSpans is a timeline of where someone went silent: needed on screen, stripped on WRITE by withTake (it would otherwise have been persisted and only dropped on read), with a test. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(speaking): one file for what a pause means, after two thresholds contradicted each other on screen A real take read: 'Längste Pause 1.8 s', then 'Keine langen Pausen', then the new panel pointing at that 1.8 s. Each right by its own number. The three lengths are different things — counts as a pause (250), searching for a word (750), stuck (3000) — so they now live side by side in speech/pause.ts, and the panel says 'Wo Sie nach einem Wort gesucht haben' rather than 'gezögert', which sits honestly under 'you did not get stuck'. PauseSpan moved there too. Verified by recording real Commons audio through the real UI via Chrome's fake microphone at 390px and 1280px. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
667aa64845 |
fix(ai): word examples run on the learner's own key only (#118)
/api/example was fired as a side effect of tapping keep: the learner asked to save a word, and a second, unasked model call went to the free tier every app on the box shares. Standing rule (2026-09-25): free-tier keys are spent only when a person deliberately asks. The route no longer builds the free chain; without a BYOK key it returns no examples (the card shows the source sentence, as before the feature), and the keep button no longer posts without a key. Regression test app/api/example/route.test.ts, proven by mutation: re-adding the freeChain import, dropping the no-key guard, or dropping the client skip each fails it. Signed-off-by: Cato <41178744+catomean@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
2745804212 |
feat(chat): Heidi reads screenshots on the free models (#106)
* feat(chat): Heidi reads screenshots on the free models
A person attached a screenshot on a phone and was told, in German, that
"Heidi ist gratis, und die kostenlosen Modelle können keine Bilder lesen" —
go and get an API key. That sentence was not true of free models. It was true
of a chain nobody had taught to route.
`google/gemma-4-26b-a4b-it:free` was ALREADY in the chain this app installs,
and loki probed it live on 2026-08-13 with a test image and it answered
correctly. What was actually wrong: `freeChain()` is ordered for text, so a
screenshot met four Groq links that cannot read it before reaching one that
can. ai-kit 1.11 routes on that — once, for the whole fleet — so this app gets
to delete a refusal rather than build a second vision chain the way loki did.
WHAT CHANGES FOR A VISITOR
Attach a picture with no key at all. That is the whole feature.
- /api/chat no longer answers 400 "Reading a picture needs your own model".
Pictures are still VALIDATED here and are no longer REFUSED here: whether
one can be read is the chain's question, and it can answer it itself.
- The attach button is live without a key. `canSee` is now `true` when
nothing is connected, because the free chain sees.
- A CONNECTED key still decides for itself, and this is why the check
survives rather than being deleted: a brought key REPLACES the free chain,
so someone on Groq or DeepSeek — text-only, both in our allowlist —
genuinely cannot send a picture. Telling them to attach one would be a
worse lie than the old one.
A NEW OUTCOME, NOT A NEW FAILURE
`respondInThread` gains `blind`: a picture arrived and nothing reachable can
read one. Its own status because it needs the opposite sentence to a failed
turn. "Heidi could not answer just now, try again in a moment" invites a retry
that cannot work — no model in reach has eyes and none will grow them in a
minute. ai-kit decides it BEFORE any request, so it is always free and always
certain. It reaches the reader as 415 on the stateless route, a `blind` flag
on the stored one, and its own `kind` on the stream.
415 and not 503: the client keys its sentence on the STATUS and never on a
flag in the body (see `errorFor`, and the incident that taught it). 503 would
say Heidi is unconfigured, which is false — everything except reading pictures
works.
THE COPY, IN SEVEN LANGUAGES
`connectLead`, `modelBody` and `attachNeedsKey` all asserted that free models
cannot read pictures. Rewritten in en/de/fr/it/ru/rm/gsw to say what a key
actually buys — sharper answers on a dense screenshot, and calls on the
visitor's vendor rather than ours — and `attachNeedsKey` now names the real
case: the model you connected cannot read pictures. Plus `cannotSeePicture`,
the one sentence the blind outcome needs.
The docblock in byok.ts that stated the false claim is corrected in place,
with what it cost: every visitor who attached a screenshot got a 400 telling
them to buy something Heidi could already do, for months, on the strength of a
comment nobody re-read.
NOTE ON THE LOCKFILE
package.json asks for ^1.11.0, which is merged on ai-kit's main and not yet on
npm — the publish needs a tag push, and the session that merged it was refused
one. The lockfile updates with one `pnpm install` the moment 1.11.0 is
published, and CI is red until then. Deliberately not hand-patched.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014RpRyAd15YvFmQ1c1p1Rsk
* test(chat): pin the new picture contract, not the old refusal
Two tests asserted that a picture without a brought key answers 400. That is
the behaviour this branch removes, so they failed — correctly, and on exactly
the line that needed a decision rather than a deletion.
The sentence above them read "only a brought key can see". That was never true
of free models: `google/gemma-4-26b-a4b-it:free` was already in the chain this
app installs, and loki probed it live reading an image. It was true of a chain
with no vision routing, which ai-kit 1.11 fixed for the whole fleet.
So the guard is REPLACED by a stricter pair rather than dropped:
a MALFORMED picture is still refused 400 (this was never covered)
a VALID picture is no longer refused not 400
The first half matters most. The suite pinned "refused for lacking a key" and
never once pinned "refused for being malformed" — so removing the wrong guard
without adding this would have left the validation path untested.
The second is asserted as "not 400" rather than as a specific success,
deliberately: this deployment has no key at all, so the turn lands on the
unconfigured path already pinned below. The claim is only that the PICTURE is
not what stopped it.
The file header is corrected too, because it counted the old refusal among the
guards. Refusing a picture for lacking a key was not a guard; it was a wrong
belief about free models, and a test that pins a wrong belief makes it
permanent.
`pnpm run verify` green: format, lint, typecheck, 855 tests.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014RpRyAd15YvFmQ1c1p1Rsk
---------
Co-authored-by: Claude <noreply@anthropic.com>
|
||
|
|
e227509827 |
Mobile layout, the personal page, dialect depth, essays and practice (#87)
* fix(chat): stop the transcript scrolling the page sideways; open on the chat Two things, both about what the app shows first on a phone. OVERFLOW. A long link in an answer — an ordinary zuerich.ch URL, pasted by a learner asking what it said — has no break opportunity in it, so the line ran past the edge of the card. A block does not grow to fit its overflow, but the DOCUMENT does: at 320, 360 and 390 the page became 710px wide and scrolled sideways, and the reader had to drag it back and forth to read one reply. The same defect hit the flex rows (a gloss, a suggestion's label beside its Speak and Copy buttons), which size themselves from min-content and pushed their neighbours off the edge. One declaration fixes all of it, because `overflow-wrap` inherits: the transcript's root wraps anywhere, and every descendant gets it — including ones added later by somebody who never reads the note. `anywhere` rather than `break-word` is the load-bearing half, since only `anywhere` shrinks the min-content contribution that the flex rows measure. That holds only while the transcript is the one gate, so `transcript.test.ts` pins it: the root carries the class, and `AnswerView` and the bubbles are rendered there and nowhere else. It covers all four chats — home, dock, full screen and a group — because all four already share this component. The composer got the same treatment one element down: a textarea is a flex item that refuses to shrink below its `cols`, which on a 320px phone plus three 44px buttons is wider than the row. Verified in headless Chromium at 320/360/390 with a hostile answer (a long URL, a 48-letter compound, a flag list): document width was 710px before and equals the viewport after, on the home page and the full-screen chat. DEFAULT SCREEN. Signed in, the locale root rendered the dashboard — a list to look at, when what someone with an account opened it for is the conversation. It now renders the full-screen chat, sidebar and all. The dashboard is not gone: `/portal` is still its address and the account control is still the door to it. Signed out is unchanged, so the indexed landing page and its pitch stay exactly where a crawler and a first-time visitor find them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012bciJMTkW3WZ3AmpTZNvAC * fix(mobile): every page measured for overflow; align the read/copy pair The last fix went on the transcript and stopped there, so three reported pages stayed broken. This one starts from a measurement instead of a screenshot. WHAT WAS ACTUALLY WRONG. A grid track defaults to `auto`, whose automatic minimum is min-content — it will not go narrower than the widest unbreakable thing inside it. One `truncate` line is `white-space: nowrap`, so its min-content is the whole sentence. `/portal` with eleven ordinary kept words was therefore 516px wide in a 360px viewport, and 912px once one word had been kept from a link. Nothing on that page was doing anything unusual, which is why nobody caught it by reading the code. `grid-cols-safe` is that missing `minmax(0, 1fr)`, named once in globals.css with the reason beside it, and applied to every grid whose base layout is one column. Kept words and the vocabulary list also hyphenate now: a German compound longer than a phone column is the whole subject of this product. `overflow-x: clip` on the body is the backstop and explicitly NOT the fix — it turns the next mistake into a clipped card instead of a site that scrolls sideways. `clip` rather than `hidden` because `hidden` makes the body a scroll container and silently kills the composer's `position: sticky`. MEASURED, NOT INSPECTED. `pnpm run audit:responsive` drives every page in every language at 320/360/390/414 in both themes, with a browser that has been used — a dozen kept words in three scripts, one of them kept from a 100-character URL — and fails on two things: an element whose box leaves the viewport, and an element whose content is wider than itself and cannot scroll. The second is the one no amount of reading finds. 532 renders, zero overflow. Not in `verify`: it needs a server and a browser binary. THE READ/COPY PAIR. They were two halves of different components bolted together, and looked it: Speak is a 44px control, Copy was 36px, so "Kopieren" rode eight pixels above "Vorlesen". Equal heights now, because the alignment IS the two numbers being equal. Their row also stopped being rigid: in Russian the label wrapped to four lines beside them, and the moment Speak opened its caveat — two sentences about which voice the device really has — the cluster pushed the whole card off the right of the screen. YOUR OWN MESSAGES, FROM A STRANGER. Sending a line in a signed-in conversation returned the stored ROW, whose author is the OIDC `sub`. The transcript is built on `LEARNER_ID`, so it rendered the reader's own sentence in the shell reserved for a third person, left-aligned, with their raw actor UUID printed above it as that person's name. The conversation GET had it too, and was handing the `sub` back over the wire besides. One mapping now, shared by all three boundaries, pinned by a test. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012bciJMTkW3WZ3AmpTZNvAC * feat(dialect): the three branches, and where each dialect can be heard "Swiss German is not one language" was the third fact the page led with, and then it illustrated the claim with eleven names in a flat grid — which reads as eleven flavours of one thing, the opposite of what it says. The structure is the interesting part, and it is not ours to invent: the Alemannic dialects divide into Low, High and Highest, and the divisions are drawn by sound changes that stopped in different places. So the atlas now carries that structure. `DialectGroup` is generic — nothing in the pack type says Alemannic — and each group holds the pair of FORMS that draws its line rather than a sentence about them: `Kind` inside Low Alemannic, `Chind` outside it, `Kind` in the standard both are versions of. A reader sees the line instead of being told about it, and a pair of forms is the same in all seven languages. ABSENT IS AN ANSWER. Innerschwyzertütsch spans Lucerne, which is High, and Uri and Unterwalden, which are Highest; Bündnerdütsch covers Chur and the Walser settlements, likewise on two sides. Both carry no branch and the page says the area straddles the line, because the tidier page would be the false one. WHERE YOU CAN HEAR IT. Every row in the listening register has carried an atlas `area` id since the first commit and no page ever followed the join, so the one question a dialect page could not answer — "where do I actually hear this?" — was already answered in the data. The area pages now list the programmes recorded in that dialect, sharing `/listen`'s own row component rather than growing a second copy of it. STILL NO PER-AREA PROSE, and the page got substantially longer anyway. That is the part worth keeping: three branch explanations, translated once, serve all eleven areas, where eleven descriptions would have been seventy-seven blocks nobody here can check. Everything else added is data. What is deliberately NOT here: invented dialect forms. Seven of the eleven areas still say Heidi cannot tell them apart by form, because that is true. The container for per-area vocabulary and grammar contrasts is what this commit builds; filling it needs rows somebody can cite, not rows that look plausible. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012bciJMTkW3WZ3AmpTZNvAC * feat(essays): somewhere for the long answer, and the first one The dialect pages answer "which forms" and "where", and they are made of data on purpose — eleven areas of translated description would be seventy-seven blocks nobody here can check. But the question a visitor actually arrives with is not a form and not a map: why does a country this small have this many dialects, and why did the big neighbour lose its own? That is an argument with sources, and it had nowhere to live. TYPED BLOCKS, NOT MARKDOWN. A parser is a dependency this repo has spent real effort avoiding, and Markdown would let a page render anything at all — the design system would be one stray element away from not applying. Blocks render through components that already know the type scale, the measure and the one accent, and a block kind nobody implemented is a build error instead of a paragraph that looks wrong in production. `inline.ts` gives prose the three things it needs inside a sentence — a link, emphasis, and a language form set in the dialect face — in forty lines of pure, tested code, so writing an essay is writing sentences. TRANSLATION IS NOT REQUIRED, and that is the whole reason essays are not dictionary entries. A dictionary must have every key in all seven languages or the build fails, which is right for interface copy and impossible for two thousand words of argued history: machine-translating that into Romansh and publishing it under our own name is exactly the overclaiming `/method` exists to refuse. An essay exists in the languages somebody wrote it in, a reader in another gets the version that does exist, and the page says which language it is in rather than letting the site look broken. The sitemap follows the same rule — hreflang names only real translations. THE FIRST PIECE argues that it is not the mountains. Austria is as mountainous and kept a spoken norm, because Vienna was a court and a capital; the Confederation had neither, and until 1848 not even a capital, so there was no place whose pronunciation anyone was supposed to imitate. Where it reaches the causal story it marks it as a conjecture, because the sources under it — Ferguson on diglossia, the HLS on multilingualism and on the Geistige Landesverteidigung — describe the language situation and not why it arose. Every URL was resolved before it was cited, per this registry's own standing rule. `sources.test.ts` now counts essays and dialect branches as citers, and refuses an essay that names no source at all — the reverse check, and the one that matters more on the pages that make the strongest claims. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012bciJMTkW3WZ3AmpTZNvAC * feat(practice): a second attempt before the sitting ends, and the papers on the page Practice is the half of this product that decides whether anybody comes back, and it is the half where guessing is least excusable. Two changes, both argued. A MISSED QUESTION COMES BACK. It used to reveal its answer and move on, which makes a sitting a test with feedback and never a second chance to produce the thing. Rawson & Dunlosky (2011): the durable gain comes from retrieving something correctly more than once, spaced — not from having seen it. Butler & Roediger (2008) is the sharper case here, because three of the five item kinds are multiple choice and choosing a lure can leave the learner holding the lure unless something corrects them. So a missed item returns three questions later, once, labelled as the second attempt rather than appearing again unexplained. The gap of three is OURS and says so. The literature gives the direction and not the number, and a cited estimate presented as a finding is an uncited claim one step better disguised. THE SCHEDULE HEARS THE FIRST ANSWER ONLY. A word got right a minute after being revealed has not been retrieved; grading it twice would advance the very interval the spacing exists to protect, which is the same inflation `review.ts` already refuses when it sends a missed word to the start rather than back one step. MY FIRST GUARD WAS WRONG, and reading it did not show it. It refused to requeue an item already in the QUEUE — but a requeued item leaves the queue to become the current question, so a second miss put it back again. Found by driving a whole session wrong on purpose: eight questions became thirteen and would have kept going, which punishes exactly the learner who is finding it hard. The rule is now stated on what decides it — an item already answered this sitting has had its go — and a test pins the worst case at exactly twice the session size. THE PAGE ARGUES FOR ITSELF. Seven claims on `/practice`, each linking to the study behind it, on the page the design belongs to rather than on `/method`: the person reading has just been told they got something wrong and is entitled to know whether the thing telling them knows anything. The interleaving row states the meta-analysis's moderator — the benefit depends on how similar the material is, and on very similar material blocking can win — instead of quoting the headline and hoping. Every row carries the guarantee the research page already had: a test refuses a row citing nothing, and refuses a locale citing something different for the same sentence. Four sources added, each resolved through Crossref before being written down. HEIDI.md §9 now carries the exercise track in order, including what is deliberately refused: streaks, points, levels, percentages, a daily goal. If that ever costs retention against a competitor with a flame icon, we lose that comparison on purpose. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012bciJMTkW3WZ3AmpTZNvAC * fix(portal): a way around your own page, and the account where people look THE DASHBOARD HAD NO NAVIGATION. Five sections stacked down roughly two thousand pixels of phone with nothing to steer by — no index, no counts, no sign that anything existed below the fold. Somebody wanting their groups scrolled past everything else to find out whether they had any. `DashboardNav` is one component in two shapes, because a phone and a laptop want different things from the same list: a strip that sticks under the header below `lg`, the sidebar this page always needed above it. A second component for the second shape would be two lists that disagree about what sections exist. It wraps rather than scrolling sideways — a strip that scrolls hides its own last item, on the exact class of page this repo has shipped scrolling sideways by accident. The counts are the point: "Groups" says a section exists, "Groups · 1" answers the question a personal page is being asked. THE ACCOUNT IS IN THE CORNER NOW, at every width. It used to appear there only from `lg` up and hide inside the mobile menu sheet below that. "Log out" is the one control people look for without being told where it is, and on a phone there was nothing in the corner at all. Signed OUT it stays in the sheet, and that is not inconsistency: a signed-out bar needs a gear and a full-width sign-in button beside the wordmark, the language switcher and the menu, and five controls do not fit in 320px. An avatar is 44px and does. The right-hand rail is gone. It held the account (now in the header), the roadmap (the project talking about itself on a page about the reader) and the way back into the product — which is now at the END of the page, where you are when you have finished reading your own words. TWO DEFECTS THE CHANGE CAUSED, both caught before shipping and both worth recording because they are the same shape as each other: The account dropdown is `absolute right-0`, which hangs from the nearest positioned ancestor. That was its own button — correct only while the avatar was the LAST control in the bar. It no longer is, so at 360px the 328px panel ran from x = −78 with its labels cut in half. The anchor belongs on the control row, whose right edge is the page gutter. And the bar stopped fitting: 342px inside 320 in Russian, once the avatar was paid for. The wordmark stands down under 380px and the cow stays. That needed a breakpoint Tailwind does not have — every real decision in this product is between a 320px phone and a 390px one, and `sm` at 640 is a tablet. THE AUDIT NOW OPENS THINGS. It found neither of the above, because it measured pages at rest and every dropdown on them was shut. It opens the header's disclosures one at a time on two representative pages and measures each state — which immediately found a third: the theme row inside the dropdown is 328px of Russian in a 302px panel, cut off at the panel edge. AND IT RUNS IN CI. An opt-in script nobody remembers to run would have caught none of the three overflow defects reported from a phone this month. It needs a browser and a built server, which is why it cannot live in `verify` — so it is its own step, against the real build. `AGENTS.md` now opens with the four rules behind every one of these, because they are not obvious and this repo has now made all four. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012bciJMTkW3WZ3AmpTZNvAC --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
41b78827aa |
feat(speaking): fix the measurement, wire the half that was never called (#83)
The speaking tool measured a signal wrongly, buried itself under two empty
social sections, and left an entire tested analysis engine with no caller.
MEASUREMENT. A cough, breath or lip smack inside a long silence is a run of
sound too short to be speech. The segmentation discarded it as a run while
still letting it END the gap before it and START the gap after, so ONE silence
of 1.9 s came back as two of 0.9 s: the count inflated, the longest pause
understated, and `pauseCount` free to exceed `runCount` — impossible for gaps
that by definition sit between runs. Observed on the live site: 16 s of speech
reported with 14 pauses and a mean run of 1.5 s, about eleven runs with
fourteen gaps between them. Blips are now dropped before segmenting rather
than during, and `pauseCount === runCount - 1` is a test rather than a
property of a loop.
The screen also never printed the recording's LENGTH. "You spoke for 16
seconds" is a complete short answer or a microphone that stopped hearing, and
without the denominator the learner cannot tell which. It is now the first
figure, and a note reads the share back.
THE HALF THAT WAS NEVER CALLED. `speech/fluency.ts`, `syllables.ts` and
`grammar.ts` were written, documented and unit-tested; a grep for their
importers found `capability.ts` naming their paths in strings and nothing else
in the app. Meanwhile `packs/gsw-zh.ts` has declared
`bridgeRecognition: { available: true, returnsSpokenVariety: true, wer: 6.4 }`
since it was written, `evidence.ts` reads that as `words`, and `capability.ts`
had been computing a verdict of `bridge` the whole time. Nothing asked.
So the practice screen now asks which variety a take is in, and the pack
decides what may be said about it. Züritüütsch is unchanged and still the
default: measured on the device, audio never sent, the learner types the
sentence (§7). Swiss Standard German — the variety Zurich actually speaks at a
Verwaltung counter — is transcribed, and then speech rate, articulation rate,
filled pauses and the gate all have something to work on. `dialect-marker.ts`
checks the vendor's answer on every take, so "you used dialect words while
practising Standard German" is a finding rather than a silence.
Nothing in that branch names a language. `domain/speaking/varieties.ts` asks
the pack; a pack whose target recogniser becomes faithful gains all of it by
editing one object, and a pack with neither renders no switch.
The ban is untouched. No pronunciation score, in either mode, at any word error
rate — `capability.ts` keeps it `refused` rather than `none` so a future reader
cannot mistake it for "not yet". The rate is reported as a PAIR, because the
pair separates word-hunting from slowness and a single number separates
nothing; where the two do not separate, the screen says nothing.
PRIVACY. One mode now uploads, two lines under a sentence saying nothing ever
leaves the device. `useRecorder` hands the blob back only under `retainAudio`,
default false, fixed before the microphone opens — there is no path from
"recorded without it" to "uploaded anyway". The privacy line reads the mode.
`wired.test.ts` asserts the default, the gate and the ternary, because all
three are one careless edit from making the sentence false and none of them
would fail a unit test.
HIERARCHY. Practice first. The page led with an empty rounds list, a nine-field
hosting form, a second empty list and a second form, and put the one thing that
works alone, signed out, on a phone, today four scrolls below them. The lead
sentence changed with it. Also: the record button was `min-h-20 min-w-20 px-6`,
so padding won and the one control on the page was a lozenge; `<summary>` drew
the browser's own black ▼; a take in the history was labelled "nothing recorded
yet" beside its own duration; notes restated figures printed directly above
them; and the bridge was labelled "Swiss Standard German" in German, Russian
and Romansh — a description posing as a name, which is the leak
`display.test.ts` exists to stop, arriving through a field that looks safe.
HEIDI.md §5, §8, §9 and §10 corrected: the "stated limit" paragraph claimed
this was not built because no pack could test it, and its own pack could.
Claude-Session: https://claude.ai/code/session_01HRcW83vzhVYRpXbrtsC5Gc
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
5f0ce9fb3f |
fix(voice): the correction setting now changes something (#77)
It was offered on the settings page, written to storage, read back on reload — and consulted by nothing. Every unit test passed, because each half worked. A learner could set it to "say nothing" and be corrected anyway, which is a promise the product did not keep in the one file whose subject is not making those. George chose the surface: speaking takes. It is the one place the learner demonstrably produces dialect, and the chat is deliberately left alone — a pasted WhatsApp line and a learner's own attempt are indistinguishable, so correcting the chat would eventually tell somebody their friend's Bernese is wrong. The copy says both halves of that now, in seven languages, because "what you wrote" reads as the chat. WHY `blocking` AND `all` COINCIDE HERE, deliberately. The levels are defined over the gate's severity classes and a spoken take only has one: `feedback.ts` keeps `foreign` findings — a real word of another variety, something you can HEAR — and drops `unattested` ones, which are orthographic, because there is no way to SAY a `ß`. Mapping `blocking` onto "unattested only" would have silenced the word notes at the DEFAULT level, turning another session's working feature off while appearing to configure it. `off` is honoured BEFORE the gate runs. Judging the sentence and then discarding the verdict is the same behaviour and a worse promise. An absent or unrecognised value falls back to the default that SHOWS corrections, never to silence — verified against the running route along with the other three cases. The new tests are source-level, because what failed was that two ends were never joined and a join is what a source check can see. Proved by mutation: reverting the wiring fails two of them. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |