Files
CatoandClaude 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>
2026-11-26 10:39:16 +01:00
..