mirror of
https://github.com/bitbaum/heidi.git
synced 2026-12-04 05:37:48 +01:00
batch-2
14
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
37edcd8b99 |
Round two: situations, reading, dialects map, photographs, R2-ready media (#364)
* feat(dialects): one sourced register of dialect forms, and the language map's data The same twelve everyday items in seven Swiss German dialects, each form with the atlas map or article section it was read in (accessed 2026-11-26), Zurich's column read from the pack, and a cell nobody could read safely left «nicht belegt». The register lives with the pack (`family.register`), so the leak gate holds; `lib/dialects/` only resolves, compares and narrows. Re-reading the Kleiner Sprachatlas maps at full resolution corrected five cells: Basel and Chur say «eppis», Lucerne «mier», St. Gallen «hend» and «Chend»; Chur's butter shows Schmaalz beside Butter. The language map: swissBOUNDARIES3D (©swisstopo) coloured by the BFS typology «Sprachgebiete 2020»; the language figures moved to `lib/config/languages.ts`, with the Italian region counted correctly (121 municipalities, not 114). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * feat(dialects): an interactive language map opens the area, with profiles, comparison and a helper /dialect opens with one map of Switzerland: every Swiss German dialect area links to its page, the Romandie, Italian Switzerland and the Romansh region to a new language page each (/languages/fr, /it, /rm, one template: where, in BFS figures, what Heidi offers today, what is planned without a date, and the interest form). Under the map: the seven dialects a learner meets (where, three forms to recognise by ear against Zurich, what that means for following), the same words side by side, «which dialect am I hearing?», the message reader and every area by branch. Each area page opens with the same map, its area in red, and for the seven compared dialects the profile and the comparison with Zurich. The home page shows the map instead of the town dots and links it from its ways in; the languages page opens the language pages; both new kinds of page are in the sitemap and the responsive audit. Dictionary text was checked against the sources: claims without one («Lucerne sounds between Bern and Zurich», «asking again is normal») are gone, the superlative about Valais German is softened to what Wikipedia says. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * fix(practice): the stretch in a sitting stays a stretch A new question may be one band above the learner's level, and which kinds take the first seats is luck. With more kinds that have nothing on level 1 than kinds that do, luck alone could deal a beginner a sitting that was mostly one band too high: seventeen new situations moved the scene items around and one seed of the "fit" setting came out 3 of 8 on the level. While a kind still has a question on the nearest level, at most half of what one deal seats is above it. Seats are never left empty for it: once the nearest level runs out, the next band is the nearest. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * feat(situations): a purity gate over every line, and seventeen new situations THE GATE. `lib/variety/purity.ts` holds what we publish in the taught variety to three things the chat gate does not check, all read out of the pack: no Standard German word where the pack gives the Zurich form (leaks, correspondences, every one-word pair of the word list); no marked form of another dialect (the regional rules, each with a source); one spelling per word, the pack's. A test runs it over every scene line, the template validator over every hand-written sentence, and a third test holds the pack to its own spelling. What it finds in the 412 lines of 2026-11-25: 37 lines — 29 spellings («gschlaafe», «sii», «staa», «umstiege», «laufed», «nüüt» …), 5 Standard German words («Hauswart» twice, «Nachbar», «redet», «weg»), 4 Weinland «üs» — four words spelled two ways across scenes, and the pack itself writing seven words two ways (nüt/nüüt, gä/gää, lüted/lüüted, Aabig/Abig, blibe/bliibe, blibed/bliibed, gärn/gern) plus «do» for «hier» where every line says «da». Fixed at the cause: the pack's examples and leak suggestions, then the lines, then 29 hand-written question sentences. «gäng» was a Zurich word in the list; German Wikipedia names it a Bernese speciality and it is now a regional rule. «schwierig» is «schwirig» in the line and wherever the copy quotes it. THE SCENES, all `reviewed: false` with the pack: relative on the phone, pain in more detail, medication round, a new resident's first day, washing and dressing, the night round, the doctor's round and — new in this commit — a resident at the front door who wants to go home (care); pharmacy, post office, a repair with the Abwart, bank, Coiffeur, bakery, asking the way, Badi, a first evening at a Verein (everyday). The municipality scene gains a second beat, the permit renewal. Every beat now falls between two exchanges, not inside one. Words outside the pack were looked up in the Idiotikon register; the at-the-door scene records the columns. THE ORDER. The care list runs the way a day runs (handover, morning care, washing, meals, medication, pain, the doctor, visitors, the phone, the new resident, the evening, the door, the night); everyday runs the way settling in does, so a learner who says "I have just moved" is handed the way to the station, the municipality and the bank first. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * feat(reading): texts to read in Zurich German, held to one purity gate - /reading: a shelf of texts, easiest first. The course's own situation lines composed into short exchanges, and passages from the Alemannic Wikipedia's Zurich German pages, verbatim, each with page, revision, history link and licence (CC BY-SA 4.0). No text claims a review. - One gate for reading texts, purityProblems(text, pack): standard forms derived from the pack (paradigm rows, cognate headwords, correspondences, the article mapping, small leaks with a dialect ending, st where the course writes scht); other dialects' marked forms, each sourced; one spelling (house rules, shapes of other conventions, letters the course never writes, and words that fold onto the course's own written another way). A shelf-wide check keeps every word to one spelling across texts. - scripts/reading-harvest.ts lists and fetches all 375 pages of «Artikel uf Züritüütsch», gates every sentence and prints the counts the page shows; --verify checks each shipped passage verbatim against the revision it names. - A text is read in large type with pressable words (meanings only from the vocabulary, none guessed), then three to five questions, then the shared ending. Reachable from the menu, home, Mein Bereich and the end of a situation with a text of its own. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * fix(dialects): area pages lead with where the dialect is spoken; a thinner, legible map The map draws thin muted borders instead of white gaps, so its areas read in the dark theme too; a hovered area gets a red edge, a focused one a thick one; on the dialects page it is no wider than 56rem. An area page states where the dialect is spoken under its name rather than repeating the name in a profile below. «Not attested» is a quiet status rather than a form, and the Russian label is «нет данных»: the long one ran out of its column at 320 and 390px on the Basel and Graubünden pages (responsive audit). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * feat(glosses): every new scene line in English, French, Italian and Russian HEIDI.md says these four exist for every word, scene line and hand-written question text. The new situations arrived without theirs: 381 lines, 54% coverage of the phrases. All four are now at 792 of 792, drafted from the Zurich line and its German together, unreviewed like the rest of the set — and a test now fails the day a line is added without them, so the sentence in HEIDI.md is a gate rather than a hope. «Und wie chume ich dänn an See?» was answered «Nei, nur über d Brugg» — a no to a how. It is «Eifach über d Brugg». Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * fix(reading): the opener names the texts, and a number keeps its unit The /reading opener said «Alle Situationen», borrowed from the situations page; it now says «Alle Texte». In a text, «8 km» no longer breaks between the number and its unit; the words themselves are untouched. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * feat(design): legible in both themes, sharper openers, and a list of 37 situations that reads THE LIST. The short list of a learner's own situations (practice, Mein Bereich) printed every one a reason gives — fourteen for somebody in care — above the rest of the page. It shows five, from where the learner is (`previewOf`): finished ones drop off the front, the order never reshuffles, the one recommended next is always there. The full list opens with one line of links to its two domains, so the ward is not twenty-three rows down. THE OPENERS. A 16:9 photograph covering a phone screen is drawn about 1500 pixels wide; `sizes` said 150vw, so a DPR-2 phone was served 1200 pixels at quality 75 and it looked soft. It says 200vw and the quality is 85, one step each (`images.qualities` allows it). Bytes at 390px, DPR 2 / DPR 3: home 130 KB / 225 KB → 272 KB / 272 KB, practice 127 / 215 → 257 / 257, listen 99 / 194 → 240 / 240 — the whole 1600-pixel file at DPR 2 now. LIGHT AND DARK, measured at 390px over sixteen pages (solid text against its real background, focus on the first tab stops): every token pair passes. What did not: controls that cannot be used yet were drawn at 40–60% opacity — «Leichter» 2.7:1, a disabled «Prüfen» 2.7:1 in dark — and an answer that is out of the running was muted ink at 60%, grey on grey. They are muted ink at full strength now (4.5:1 or more on every surface). A wrong answer's words were flag red on its own tint, 4.4:1; they take the deep red ink (`--color-incorrect-ink`, 7.1:1; dark keeps its lifted red, 5.8:1). ALSO. The listening opener's button said «Zwanzig Minuten»; it says what it leads to, «Drei für heute», in seven languages. The six sectors on /organisations were a ragged stack of chips on a phone; they are a list there, chips from `sm`, in their own component. The Badi opens on the Strandbad picture already in the register. The responsive audit measures two of the new scenes. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * docs(situations): the short list and the domain links in HEIDI.md, and where each new word was looked up HEIDI.md §4 says how the list of situations reads with thirty-seven of them. The new scenes now name, beside the lines, the Idiotikon register entries their words outside the pack were checked against (volume, column), the way the at-the-door scene already did. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * merge: dictionaries keep the dialects and the reading namespaces; one entry per source Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * refactor(purity): one gate for every line the course prints The reading gate and the situations' gate become one module, lib/variety/purity.ts, with one API used by the situations, the reading shelf and the authored questions. It keeps the stronger checks of each: paradigm, cognate and inflection-derived standard forms, the scht rule, letters and diacritics the course never writes, the shelf-wide one-spelling check, the leaks, correspondences and word pairs, and the sourced regional rules. - The other-dialect list is one list in the pack's rules: the Bern and Basel forms the reading pack carried move there, deduplicated; the shapes of the standard language and of another spelling convention are the pack's houseMarks; the distinct spellings are one list. - The pack gave «Aache» as Wallis/Fribourg butter citing SDS 5/179. Kleiner Sprachatlas map 28 (SDS 5/179), opened today, prints no such form: Wallis «Aichu», «Aihu», «Öi(c)hu»; Sense «Ou(c)he»; «Aahe» in the south-west Bernese Oberland. The rule now says so. - The pack wrote «gsee» and «gseh» for one word; it now writes «gseh». - Reading: one situation text per scene from the current lines (36; the post-office scene has no word to ask about and waits); the harvest was run again against the one gate; «Villa Liebegg» lost one sentence («nachhär»), and --verify found all eight passages verbatim. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * fix(dialects): a readable map in dark, the map on the first screen, a row of sections that says it scrolls - The language map has its own colour roles (land, edge, hatch, water, hover) in globals.css; in dark the land is lifted off the page and the edges and hatches are light enough to count twenty areas. - From lg the dialect area's map sits beside its title (PageHeader `aside`), so 1280×900 opens on it; the area rows follow (MapAreaList). - The section rail fades the end that has more behind it and keeps the current chip in view, so a cut-off chip no longer looks like the last. - «Welche Mundart?»: on a phone the verdict rides along the bottom of the clues once one is ticked, with a way down to the reasoning (reduced motion respected). - Mein Bereich offers reading from the start, not only after a text. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T * feat(photos): stronger openers, places for everyday scenes, and photographs ready for object storage Every photograph was rendered where it is used, at 390 and 1280, light and dark. Replaced: - station (practice, asking the way): the front was crossed by tram wires and parked cars; now the main hall (Dining Car from Wien, CC BY-SA 2.0). - the lake (reading, Mein Bereich, care): a strip of hills and grey water on a phone; now the Glarus Alps over Lake Zurich (Roland zh, CC BY-SA 3.0). - the dawn lake (dark of the same pages): an empty orange gradient on a phone; those pages now use the city at night already on the site. - the night sky on Über Heidi: haze over a dark strip; now the Blüemlisalp glacier under stars (Deralpinbergsteiger, CC BY-SA 4.0). New places: the Seebad Utoquai for the Badi, Butterzöpfe for the bakery, the Fraumünsterpost for the post office, the Erismannhof courtyard for neighbours, the laundry room and the Bünzli. Author and licence from each file's record at Wikimedia Commons; alt text in all seven languages. Served bytes: next/image now prefers AVIF; every opener at 390px DPR 2 is 58-162 KB (WebP at the same quality was up to 272 KB). A test holds each registered width and height to the file's own header. Object storage: NEXT_PUBLIC_MEDIA_BASE (lib/config/media.ts) makes every photo resolve to <base>/photos/<file> and gives next/image the host; unset, nothing changes. scripts/media/upload-photos.mjs uploads public/photos to an S3-compatible bucket with PHOTOS_S3_* settings named like Solon's: dry run by default, skips objects already there, SigV4 signed with node:crypto (checked against AWS's published example). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmvb6xi489TfZMg7n9T --------- Co-authored-by: Claude <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> |
||
|
|
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> |
||
|
|
43f9109794 |
chore(chatkit): the broken-word audit runs on every page (#208)
* chore(chatkit): the broken-word audit runs on every page audit:responsive now also lays out every word with findBrokenWords from @bitbaum/chatkit/audit (chatkit ^0.13 -> ^0.14.2) and fails on one drawn across two lines, at rest and with the header's dropdowns open. Its first run found three, fixed in CSS, never by trimming copy: - the footer's language list: two 56px columns inside one grid cell drew «Schwiizerd / ütsch» on every page; one column, break-words. - the listening row: «Wissenschaftsma / gazin» beside «Подписаться» at 320; the row wraps and the button drops under the name instead. - the answer card's «Schriftdeutsch» badge at the end of a long label: inline-block, nowrap, so it moves to the next line whole. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018WZnBnaLP6RhwFkLxRTKgE * fix(vocabulary): a known word is never cut — break-words, not wrap-anywhere The word audit found «Entschuldigung» split across two lines on the vocabulary list at 320px in de, fr and ru. The list is words we wrote, so it gets a column wide enough for them (AGENTS.md); wrap-anywhere and hyphens-auto were willing to cut them. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018WZnBnaLP6RhwFkLxRTKgE * fix(vocabulary): on a phone the German sits under the dialect word, so no word is cut break-words still cuts a word whose column is narrower than it, and the third column of the row was ~100px at 320px against «Entschuldigung» at ~110px. Below sm the row is two lines (word, then its German); from sm it is the three columns it was. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018WZnBnaLP6RhwFkLxRTKgE --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
f62286ee7a |
feat(chat): one row under an answer — suggested replies first (#186)
Since #185 the latest answer could carry three rows of buttons under three captions: chatkit's suggested replies, «What now?» (`next` moves) and «Learn from this» — up to ten buttons. Now every answer has at most one row. - lib/domain/chat/row.ts `answerRow`: replies first, then the moves, then the learn chips; nothing twice (case- and accent-insensitive, on the label and on what it sends — the reply "Wie antworte ich darauf?" and the reply move that sends exactly that are one button); at most five. The grammar move is the one button that NAVIGATES instead of sending, so when the replies fill the row a sentence gives way, never it. - answer-view.tsx: NextMoves + LearnRow + <ChatReplies> folded into one AnswerRow. Styled with chatkit's `ck-replies`/`ck-reply` classes (themed by the existing `--ck-*` tokens), not <ChatReplies> itself, because the grammar item stays a <Link>. One `role="group"` named by `chat.moves.title`. Replies still appear only under the latest answer and never while a turn runs; every send goes through the conversation's own `send`. - i18n: `chat.replies` and `chat.learn.title` were only the names of the rows that no longer exist; removed from all seven locales. - scripts/audit/responsive.mjs: the fixture answer now carries four replies (one 43 characters long, one a duplicate of the reply move) and a grammar move, so the full row is measured at every width. Claude-Session: https://claude.ai/code/session_01Mg5wrkfw95JWfmAz8yRT1j Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
74adcda92e |
feat(practice): exercises run on their own session screen (#150)
Practice, the test and the warm-up open /practice/session and /warmup/session: close and progress on top, the question as the only scrolling part, answer buttons in a bottom bar. No site header, footer or dock launcher. /practice and /warmup become launchers. - views hand their buttons to the bar through ActionSlot/Actions - a sitting is saved after every answer and resumed for 12 hours - close target via ?back=, guarded by safeNext - FocusSurface is now the home chat's only - fix: a card reported its answer twice and skipped the next question Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|
|
8cc909dc80 |
fix(dialect): Zurich German is Züridütsch — and the gate now knows more regions (#136)
The site named the variety it teaches «Züritüütsch» 90 times in 7 languages, on the dialect map and in its URL, while its own gate called the t-onset an eastern form: the rule exempted compounds. Now: - Züridütsch / Hochdütsch / Schwiizerdütsch everywhere; the Zurich area slug is zueriduetsch, with a 308 from zueritueuetsch. Other regions' own names for their dialect (Glarnertüütsch, Ostschwiizertütsch) stay — they are names. - The rule matches the bare word and the Zurich/generic compounds. - lib/variety/zurich-name.test.ts runs the name rule over every reader-facing string in every language (mutation-checked). - Eight more regional rules (Bern: ig, wosch, het, Grüessech, vilmau; Basel: nit, goht, stoht). They immediately found 17 errors in Heidi's own Swiss German copy (het -> hät, stoht -> staht), now fixed. They also feed the dialect pages' marks, the message reader, and the gate on every chat reply. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
e49acd7849 |
fix(nav): sign-in in the corner at every width, and 44px targets at desktop (#116)
Reported from a phone: "log in log out should be easier on the mobile
version", and "i hope we do use the packages for header, footer, etc."
SIGN-IN VANISHED BELOW 1024px. Signed out, the bar showed sign-in only from
`lg` up. On every phone AND every tablet it sat inside the menu sheet, while a
signed-in reader had their avatar in the corner at every width. The old reason
was a real measurement — a gear, a labelled button, the wordmark, the language
switcher and the menu do not fit in 320px — and the answer was a SMALLER
control, not a hidden one. Below `lg` sign-in is now a 44px person icon in
exactly the slot the avatar takes once you are signed in; from `lg` it is the
labelled button beside the gear, as before. Settings moves into the phone
menu, labelled, which the bare gear never was. Sign-OUT was already in the
avatar menu at every width.
ON SHARED PACKAGES FOR THE HEADER: the fleet deliberately does not share nav
markup. `fleet/SHARED.md` records the experiment — `sitekit` served 2 of 20
repos and shipped 28px targets and no focus style to both, unfixable
downstream: "centralizing the markup centralized the bug." What IS shared is
the eight-rule navigation contract. So this checks Heidi against the contract
rather than swapping its header for a package.
THE CONTRACT FOUND TWO BREACHES, at widths this repo never rendered:
1440px the desktop nav — Start, Chat, Lernen, Üben, Über Heidi — was 16 to
20px tall against rule 3's 44px, and had been since it shipped.
320px the logo link was 30px wide once the wordmark stands down.
Both fixed; the bar does not grow, because the header is a fixed token height
and 44px fits inside it. Measured after at 320 / 390 / 834 / 1440: sign-in
visible at every width, nothing under 44px, nothing crossing an edge, no
sideways scroll.
WHY IT WAS INVISIBLE: `audit:responsive` sweeps 320-390px only. The contract's
own note is that one width "was never a sample of the layout, only of one
branch of it". The audit now checks the header at 834 and 1440 per locale for
rules 3 and 7 — six renders, not a doubled sweep. Mutation-tested: restoring
the old desktop links fails it with "SMALL Start 32x16", "SMALL Chat 30x16".
Verified: verify exit 0, 882 tests.
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
||
|
|
398b472978 |
fix(nav): make the mobile section rail actually stick, and give the header one height (#104)
THE DEFECT, FOUND BY MEASURING RATHER THAN READING. `SectionNav` carries a
full mobile treatment — `sticky top-0 z-20`, a translucent background, a
backdrop blur, a bottom border — for a state that could never occur. Scrolled
to 2500px on `/de/method` at 375px wide, the rail sat at `top: -1489`: it had
scrolled away like any static block.
A sticky element can only travel inside its containing block, and
`SectionNavLayout` wrapped the rail in a grid-item div exactly as tall as the
rail itself. Zero room to travel, so `position: sticky` did nothing and every
style written for the stuck state was decoration. `display: contents` below
`lg` takes the wrapper out of layout, the nav becomes the grid item, and it
inherits the grid's full height.
And it had pinned to `top: 0`, which is where the 69px site header already is
with a higher z-index — so had it ever stuck, it would have stuck underneath
the header.
WHILE FIXING IT, THE ROW GOT HONEST ABOUT SIZE. Seven sections wrapped to four
rows: 153px, a fifth of an 800px phone screen, held permanently to show a table
of contents nobody asked to keep looking at. It is now one row that scrolls
sideways — 57px — which is what documentation sites converged on for the same
reason. Measured after: pinned at exactly 69px, links clickable, and the
document still 375px wide in a 375px viewport.
ONE HEADER HEIGHT, REPLACING FOUR GUESSES. The header had no height; 69px
emerged from `min-h-11` plus `py-3` plus a border. Headings meanwhile carried
`scroll-mt-20`, `scroll-mt-24` AND `scroll-mt-28` — 2, 15 and 7 of them — three
answers to "how far below the top does an anchor land", each clearing 69px by
luck. `--header-height` in globals.css is now the single value: the header is
given it, the rail pins below it, and one `scroll-mt-anchor` utility (which
also accounts for the rail on phones) replaced all 24 occurrences.
TWO MORE DUPLICATIONS, EACH WITH A COPY THAT HAD DRIFTED:
- `lib/text/words.ts` replaces FIVE whole-word matchers. `saysWord`,
`says` and `demonstrates` were byte-identical under three names; `check.ts`
and `text.ts` each kept a private `escape`. `display.ts` says in its own
comment that it is copying the variety gate — the author knew they were
writing the second one, because there was nowhere to put it. `text.ts` opens
by arguing these operations belong "in one place" while holding a fifth copy.
Eight tests pin the cases the five copies each half-knew.
- `lib/i18n/dates.ts` replaces THREE date formatters whose comments all said
"the reader's own date format, never a hardcoded one" and which then
disagreed about the month and the fallback. The tag was resolved at three
different layers: not at all, at the caller, and at the use site — so
`SavedWords` declared `locale: string` and was handed a pre-resolved
`de-CH`. Now the formatter owns it and the prop is `Locale`. A test asserts
the chat workspace's date is byte-identical in all seven locales, because a
refactor that changes a glyph is not one. Also ends `essays/[slug]`
importing a helper out of another page module.
THE AUDIT LEARNED TWO THINGS, BOTH PROVEN BY MUTATION:
- Its two checks disagreed about scrollers. `clipped` exempts a deliberate
`overflow-x: auto` ("a real scroller is a deliberate choice"); the horizontal
`over` check did not, and reported four findings against a correct page whose
document did not overflow. They now agree. Mutation-tested: widened the rail
to 900px and `OVER` still fires, on the nav itself.
- It now fails if the header's CONTENT outgrows the token height. The first
version compared the header to the token and could never fail — the header
IS the token — which is worse than no check. Mutation-tested at `2rem`:
"the header contains 68px of content in a 32px bar".
Note that lint and type-check both passed while globals.css was unparseable
(`@utility` cannot nest inside `@media`); neither compiles CSS. The dev server
was what said so.
Verified: verify exit 0 — 852 tests, 72 suites; audit:language 20 pages / 0
English; audit:responsive 116 renders across de/fr/ru, 320–375px, light and
dark — 0 overflow, 0 header drift; `/de/method` screenshotted at 390px
scrolled to 2200, rail pinned under the header.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
|
||
|
|
5e09a7ba5c |
Learning surfaces: navigable reference, scoped practice, two new exercise kinds, a learner model — and 3× the content (#90)
* feat(practice): scoped sessions, two new exercise kinds, a learner model, and enough material to stop repeating The complaint was that the questions repeat, the system is not smart, and the exercise code is one file doing four jobs. All three were true. REPETITION WAS ARITHMETIC, not scheduling: eight questions a sitting out of sixty-seven items means meeting the same ones within the week, and no shuffle fixes that. So: a second situations domain (`everyday` — the shop, the tram, the stairwell, the telephone, the lunch table), the short words no correspondence rescues (`grad`, `äbe`, `gäng`, `aalüte`), and paradigms for `si`, `gah` and `cho` built only from forms the packs already publish, so each table is a reorganisation rather than a new claim. `gsi` is in it because it carries every past tense in a variety with no preterite. practice items 67 → 136 scenes 6 → 11 lines 60 → 110 vocabulary 48 → 61 and the pool is no longer 76% one kind SCOPE is the spine. `/practice?topic=…&scene=…&group=…` filters the existing pool, so every reference surface now opens a sitting about ITSELF. It works because `ItemSource` already recorded where each question came from — the field built to make a wrong answer traceable turned out to make a pool addressable. A topic scope unions the topic's own examples with the real scene lines that turn on the same rule. NAVIGATION. `/grammar` was four screens with every topic expanded; it is now an index in two bands — the topics a sentence does not survive, and the ones it survives while you do not — with a page per topic carrying practice, previous and next, and the scenes where the rule actually occurs. `/vocabulary` gained a filter over both languages, jump links, a session per group, and the scenes each word is said in. TWO NEW KINDS, both objective, neither inventing language. `match` is four words and four meanings; `gaptext` is a four-line passage from a scene with three words lifted out and offered back — the word bank is what makes a passage markable in a variety with no settled spelling. A word-order exercise was considered and refused: this variety tolerates more than one order. SMARTER. A learner model in the browser, beside the kept words and for the same reason: it keeps Heidi from holding a record of what a person cannot understand. It reorders every sitting so the weak half leads and names the two or three areas worth going back to. No number is shown anywhere — the diagnosis points at the material, never at the person. Declared on /privacy and deletable from /settings, along with the seen-history, which had been undeclared since the exercises shipped. ENGINEERING. `lib/domain/practice/kinds/` — one module per kind plus a registry. Adding `match` had touched five places, one of them a bug shipped in the same commit as the feature. Four defects found by the new tests rather than by review: - two cloze items from one topic could share an id, so answering one marked the other asked and one of the two was never served again - the model's first smoothing let one wrong answer out of one outrank a topic missed nine times in twenty - the pack spelled `Chunnsch` in its showcase and `Chunsch` in a grammar example, against its own orthography note - four places still linked `/grammar#<topic>` after topics became pages, including the chat's grammar button — the product's main loop verify green (797 tests); responsive audit 522 renders, 0 overflow. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * feat(learn): three new grammar topics, 35 more words, three more scenes — and the renderers become modules Content, design and engineering, in one pass over the learning surfaces. CONTENT. Practice items 136 → 195 (67 at the start of this work), scenes 11 → 14, lines 110 → 140, vocabulary 61 → 83, grammar topics 8 → 11. - `question-words`, `indefinite-article` and `imperative` — each names something the packs had been teaching by example without ever saying it. `wänn` heard as German `wenn` turns a question into a condition; the article `es` is identical to the pronoun `es`; the polite imperative ends `-ed`, not `-en`. Every example is a line the packs already publish. - Twenty-two nouns WITH their articles, which took the article drill from 3 questions to 24. Gender is the error a German reader is least able to avoid, because it is carried by a word they never had to learn. Every row differs from German in the word too — the vocabulary test refuses a row whose halves match, so `Zimmer`, `Tür` and `Bahnhof` are deliberately absent. `s Tram` is the sharpest: Germany says `die Straßenbahn`. - `restaurant`, `at-work` and `school-parents`. The last aims at PARENTS, because kindergarten in the canton of Zurich is conducted in dialect — the electorate decided that in 2011 — so the people who cannot follow it are the adults. ENGINEERING. The renderers followed the generators into modules: `_components/exercises/` is one view per shape plus a registry, and `practice-session.tsx` went 1123 → 390 lines. A view now owns its whole question — prompt, controls, keyboard, verdict — which removes the last shared `item.kind ===` chain. That chain is not a style complaint: its fallthrough was the self-marked branch, where Enter means "I knew it", so adding `match` shipped a grid a single keypress answered correctly. Two registries now meet at the kind id, with a test in both directions, plus one asserting the session component binds no `keydown` at all — the structural form of "no shared handler to fall through". DESIGN. The matching grid was collapsing to ONE column on a phone, which put the four dialect words above the four German ones and made a matching exercise impossible to do — fixed to two columns at every width. And the situations lead and the grammar "where this comes up" line both described a care SHIFT, which stopped being true the day `everyday` became the first domain. verify green (800 tests); build 413 static pages; responsive audit 522 renders, 0 overflow. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
cfa55d349c |
feat(situations): where you need it — six care scenes, and the claim they were standing under (#89)
Adds a third axis beside the variety and the locale: domain, as data. `lib/situations/` holds the contract, the seam that filters packs by the variety this build teaches, and a projection guarding the same prose leak `lib/variety/display.ts` was built for. The first pack is care and nursing homes: six scenes from a shift — handover, the morning, pain, meals, the evening, visitors — with sixty lines, each carrying its Standard German, a direction (`hear` or `say`) and the grammar topic it turns on. `/situations` and `/situations/<scene>` render them in all seven locales; twenty-seven `hear` lines became practice items, taking the pack's question count from forty to sixty-seven. It was built now because `/organisations` had been telling care homes that Heidi "practises the sentences that are actually said on your ward" while the product held forty-eight words, none of which was said on a ward — a claim with nothing behind it, on a live page, which `sectors.ts` says in its own header it must never do. The sentence now says what is actually there, and the row links to the scenes; a sector with proof links to it and one without does not. Three things hold the content honest: - every line passes the deterministic gate at the generation threshold, so a Bernese form fails the build rather than reaching a learner who could not detect it — proven by mutating a line to `güet` and watching it fail - every line names the source vouching for its lexis, while the arrangement stays ours, because examples must be written for this product rather than lifted from non-commercial resources - a pack declares whether a native speaker has read it. `care` says NO, and the pages print that above the lines. It flips when a named person has read every one, and a test refuses a claimed review that names nobody Nav: `reference`, not `use` — the header test caps `use` at five, and the doing half of a situation is `/practice`, which every scene links into. verify green (767 tests); responsive audit 468 renders, 0 overflow. Co-authored-by: Claude Opus 5 <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> |