mirror of
https://github.com/bitbaum/evig.git
synced 2026-12-04 22:07:14 +01:00
main
10
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
1c2131e914 |
fix(copy): stop claiming a workshop, partners, receipts and evig.ch evig does not have (#531)
* fix(copy): stop claiming a workshop, partners and receipts evig does not have evig is online-first and in Gründung (org.ts BASE_REGION: no public store), but several public pages still carried Revamp-IT's facts: - get-involved: drop the "Partnerorganisationen" list (Uster, Rüti, HEKS, AOZ) - Revamp-IT's partners, never evig's. - reparaturbonus: drop the "Werkstatt und Verkaufsstelle" card, "seit über zwei Jahrzehnten", "repariert seit 2026 mitten in Zürich" and "bring dein Gerät direkt zu evig"; repairs are found through IT-Hilfe technicians. - faq: drop "Kann ich ohne Termin vorbeikommen? Gerne." and fix the mojibake closing quote in "Right to Repair" (de). - donate: drop "Spendenquittung auf Anfrage" (no receipts until the Verein is recognised) and the uncited 285 kg CO2 figure (co2-impact.ts gives a laptop 150 kg). - about: drop "Werkstatt, Repair-Café" from the repair line. - home/transparenz: drop "kostenlos"/"ohne Gebühren" and "freiwillige Techniker" (technicians can be paid); fix "Als in Gründung" grammar. - changelog: evig.ch is not registered - drop it; `npm run d` -> `pnpm run d`. All eight locales changed together; ru home "Nutzen" card had a wrong string. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * docs(copy): README states TypeScript 6 and no stale table count The badge said TypeScript 5 (package.json pins ^6.0.3) and "~130 table name constants" when TABLE_NAMES has 121; say what it does instead of a count that drifts. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(copy): inquiry confirmation links the site by its real host, not evig.ch The auto-reply to a contact inquiry said "mehr über uns erfahren auf evig.ch" (ORG.emailDomain) while linking ORG.website. evig.ch is not registered (org.ts: no MX, no A record), so the visible text named a domain that does not resolve. Show the host of ORG.website instead (evig.orangecat.ch). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(copy): finish the workshop cut, stop implying a technician network Round 2 after independent review of PR #531. - Workshop/on-site claims left one key away from round 1: donate hero, wishlist, drop-off intro, device path, FAQ, technical-experts benefits (workshop access + "diverse expert team"), founding story, dashboard appointments card. - /api/technicians total = 1: copy describes request -> offer instead of "technicians near you" / "Techniker-Netzwerk" (reparaturbonus, about, home, IT-Hilfe hub + meta, divisions, transparenz, nav, techniker meta). - /api/workshops = []: drop "vor Ort in Zürich" courses and the donate tier's "place in our Linux workshop". - transparenz.mission.body: non-de locales no longer interpolate the German ORG.legalForm; dead keys mission.text + geschichteSection.milestoneDesc deleted; Hirn prompts say "Verein in Gründung". - Admin impact page + metric formula: 285 kg/device replaced by the per-category factors read from config/co2-impact.ts. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(copy): ru transparenz no longer claims no fees, like the other locales Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017cqEJ2nWRCs2CA6GP6BmoZ --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
34ec6f6d20 |
fix(ai): stop the close-decisions cron from spending the free AI (#508)
The nightly close-decisions timer closed expired votes through transitionDecision(), which fired generateOutcomeNarrative() in the background: one free-tier model call (evig's Groq key, then the OpenRouter key shared by eleven apps) per closed decision, with nobody asking. A manual close did the same as an unrequested side effect. Closing no longer calls a model. The Beschluss narrative is now written only when staff click "Beschlusstext mit KI erstellen" on a closed decision: POST /api/decisions/[id]/narrative, rate-limited to 10/h per staff member, living in a module the decisions barrel does not export. Regression test src/lib/ai/__tests__/no-background-ai.test.ts walks the import graph transitively from every cron route, webhook route, boot module and page/layout and fails if any can reach a model module. Mutation-proven: re-adding the decisions-narrative import to decisions-transitions.ts failed 3 of its 6 tests (cron, render, and the narrative assertion); reverting made them pass. Signed-off-by: Cato <41178744+catomean@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
ddd337d68c |
refactor(nav, services): one source of truth for what evig offers and where it appears (#389)
* wip: nav regroup
* refactor(nav, services): one source of truth for what evig offers and where it appears
Two menus were describing the same organisation and drifting apart. This makes
placement DATA and deletes what nothing read.
## The SSOT break was mine, from an hour earlier
Moving Linux and the open-source registry into Lernen, I listed them by hand
in navigation.tsx — while SERVICE_CONFIGS still fed them to the
Dienstleistungen menu. One item, two menus, two independent lists to keep in
step: exactly the drift the config exists to prevent.
Each service now declares `navGroup: 'services' | 'learn'` ONCE, and both
menus derive from that. A service cannot be in two menus or in none, and
`services-nav.test.ts` asserts precisely that — proved by planting the
duplicate back, which fails with "linuxOpenSource appears in 2 menus
(expected exactly 1)".
## The catalogue
Kept: webDesign (George's call — it is real revenue), linuxOpenSource,
openSourceSolutions. Added `aiAdoption` at /services/ai-robotics: pillar 5
existed only as a /contact link. The page describes how the work goes — look
at the work for a day, pick one task, build it, hand it over so someone on
their side can run and switch it off — and carries the required honesty
boundary: not a silver bullet, not a dependency, not a big firm.
Removed:
hardwareRecycling → off-thesis outright. "Verantwortungsvolle Entsorgung"
is disposal; evig is not a recycler, and the homepage
now says so in as many words.
buildYourComputer → 549 lines of interactive configurator for a service
flagged `available: false`, still selling the previous
org's "Revamped"-Zertifizierung under an English title.
computerRepair → redirects to /it-hilfe. It advertised evig repairing
dataRecovery your machine at CHF 70/h, which contradicts the
marketplace model where the technician sets the price.
Its "booking slug" also booked nothing: the seeded
service_types slugs never matched these hrefs, so the
page always fell through to isBookable: false.
Redirects rather than 404s — the URLs are indexed and the visitor still wants
the same thing. Also deleted /services/[service]/repair, a 135-line orphan
that ignored its own route param and rendered the same page at
/services/<anything>/repair.
## Über uns answers one question now
Nine unsectioned items spanning five unrelated groups — identity, a brand
division, a transactional product (join a pool, pay a share), trust pages,
and two operational explainers including a City of Zürich subsidy evig does
not administer and cannot redeem. Two carried a `new` badge simultaneously.
It was the only multi-item menu without `isSection` eyebrows.
Now five items in two groups: Wer wir sind (Mission, Vision, Projekte) and
Vertrauen (Transparenz, FAQ). `evig ai` and `Abos teilen` moved to Marktplatz,
which gains a third section — from the reader's side these are three ways to
get something, not three parts of an org chart. `So funktioniert’s` and
`Reparaturbonus Zürich` left the nav; both pages remain.
## Config that held German nobody read
src/config/community.ts was 644 lines: INVOLVEMENT_OPTIONS,
PARTNER_INSTITUTIONS and seven full PageContent trees with German titles,
descriptions and CTA labels — a second copy of getInvolved.* in the message
files. Nothing imported any of it except one type. It could have drifted from
the real copy forever without anyone noticing, because nothing read it. Now
22 lines: the type.
## A duplication that cannot be deleted yet, so it is gated instead
WORKSHOP_CATEGORIES carries German name/description per category, and the
messages carry the same strings again. The public page renders the MESSAGE
version; the config version is load-bearing elsewhere — normalizeCategoryId
matches legacy DB rows on the German name, and the admin filter uses it as an
option value. Deleting it needs an admin refactor.
So it can no longer diverge: workshops-config-matches-messages.test.ts fails
if you edit one and not the other. Mutation-tested. The real fix is noted in
the file.
Also removed the last "Vintage" copy: the hardware workshop said
"Vintage-Restauration", and a dead components.communitySpace block advertised
a "Museum für seltene Vintage-Hardware" — rendered by no component at all.
i18n baseline fell 2531 → 2430 source findings, most of it the deleted
community.ts tree. The one new entry is the edited workshop description: a
pre-existing violation whose text changed. Baselined rather than marked
i18n-ok, because it IS UI text in the wrong layer and should stay visible as
debt until the admin refactor removes it.
npm run verify green: lint, umlauts, chrome, docs, compliance, typecheck,
7755 tests (535 suites), production build.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
f20d183b3f |
fix(i18n): teach the wrong-language detector what it can actually detect (#387)
Third time in three PRs that this gate flagged correct Italian and Spanish —
"Trovare un tecnico", "Encontrar a quien lo repare", "LO QUE HACEMOS" and
seven more, none of them defects. Twice I verified them by hand and bumped
the baseline. The rule says the third time you stop fixing instances and
close the class.
## Why it was wrong
Not a threshold problem — HOLES in the stop-word lists. `un` was listed only
under fr; it had `una`/`uno` but not the masculine `un`. So "Trovare un
tecnico" scored Italian 0.00, French 0.33 and got flagged. Spanish was
missing `lo` and `a` while Italian had `lo`, which is why "Encontrar a quien
lo repare" looked Italian. A hole in a list makes CORRECT text look foreign.
Filling the holes then made it worse in the other direction: teaching es the
word `su` immediately made correct Italian ("Linux su vecchi ThinkPad") look
Spanish, and `e`, `non`, `nos` did the same across the other pairs. Sibling
Romance languages share their function words. A bag-of-stop-words comparison
cannot separate them, and no amount of dictionary work will change that.
## What it does now
It detects what it CAN detect: untranslated **English or German** sitting in
a translated file. Those function words barely overlap with Romance or CJK
ones, and that is the leak that actually happens here — DE is the source
language and EN the pivot. Sibling-language comparison is dropped.
Three guards, each earned:
- LEAK_SOURCES = ['en','de'] — only judge against languages it can tell apart.
- MIN_TOKENS_FOR_LANGUAGE_GUESS = 6 — the heuristic's resolution is 1/N; on
a three-word string one shared article moves the ratio by 0.33, clearing
the threshold on its own.
- A script guard, because \w is ASCII-ONLY in JavaScript even under /u, so
`[^\W\d_]` counted Hangul, kana and Cyrillic as ZERO letters and my first
attempt at this guard silently did nothing. It uses \p{L} now. Without it
a Korean sentence containing "evig" and "Revamp-IT" scores as English on
those crumbs.
Proved by mutation, not by assertion: 16 cases, eleven correct-language
strings (it/es/fr/ko/ja/ru, including CJK carrying Latin brand names) all
clean, five real English/German leaks all still caught.
## What the fix immediately found
**Real untranslated English shipped to five locales.** es, fr, it, ja and ko
were all rendering English inside the IT-Hilfe hub — "Describe your issue and
receive offers from technicians", "Browse profiles and contact someone
directly", "Help as a technician — requests near you", "Register as a
technician and help people nearby." — plus the privacy page's data-export
sentence in ja and ko. The KEYS existed, so the missing-key audit passed;
only the values were English, and the old detector could not see them. All
translated here.
This is the same class as itHelp.hub.subtitle in #382, which I found by
reading a rendered page. The gate finds them now.
## And a dead storefront
`shop.*` held 140 keys; three loading/error boundaries use SIX. The other 134
describe a storefront whose pages are pure `redirect()` calls to /marketplace
— product grids, cart labels, category breadcrumbs, opening hours — shipped
in every visitor's page payload in eight languages. Pruned: ~54KB of JSON,
6511 deleted lines. Liveness checked by namespace prefix, not just call
sites (the lesson from home.newsletter), then proved by typecheck.
Baseline lowered in the same commit, per the ratchet rule: 706 message
findings → 84, with 632 resolved and 0 new.
Also folded in (was #386, which deadlocked against this: its new Italian and
Spanish headlines were flagged by the very detector this fixes):
- /it-hilfe still showed "Computer reparieren, OS neu installieren,
IT-Probleme lösen" as its H1 — a keyword list. #382 reframed the metadata
and subtitle and missed the line a visitor reads first. It now matches the
homepage pillar's link text exactly, so clicking "Jemanden finden, der es
repariert" lands on a page with that headline.
- "CHF 300.00" wrapped onto two lines on a 390px pool card. A price must not
wrap; the title beside it gives way instead.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
f6b9a73b8b |
feat(brand): evig repairs becomes evig technicians, and evig stops asking for printers (#382)
Three changes from the same focusing pass, all of them cases where the copy
described an organisation the code had already outgrown.
## The division is named after the person, not the service
`evig repairs` → `evig technicians`. "Repairs" names what happens; a user is
looking for someone who will do it. The surface has worked that way for a long
time — post a request, receive offers from technicians nearby, choose one, with
a budget filter that already splits "Gratis / Community" from "Mit Budget" —
only the naming lagged behind the product.
Contained to `src/config/divisions.ts` plus the `divisions.items.<id>` key in
eight locales, because the wordmark is composed (`${ORG.name} ${id}`) and every
consumer derives from the array. No component changed.
## IT-Hilfe stops promising charity
The page called itself "Kostenlose Community-Reparatur" and said "kostenlos"
three times over: meta title, meta description, subtitle, tagline. That framing
does two bad things at once — it hides the marketplace the code implements, and
it forecloses the half of the model where a technician actually earns. Rewritten
to what it is: describe the problem, get offers, choose. "Über die Community
gratis oder fair bezahlt" keeps the free path visible without making it the
whole promise.
Fixed alongside: `itHelp.hub.subtitle` was stored as literal ENGLISH in es, fr,
it, ja and ko. Not a missing key — a wrong value, so no fallback could catch it
and no missing-key audit could see it. Five locales showed an English sentence
in the middle of a translated page.
## No more printers
The donation pages solicited "Laptops, Desktop-PCs, Monitore, Tastaturen,
Mäuse, Drucker" while the new homepage copy says evig does not deal in
printers. One of the two had to go. A printer is the archetype of what evig
deliberately does not take: low value, hard to refurbish, and — per
co2-impact.ts, which already refuses to publish a factor for the category —
without a defensible open number, so we could not even honestly claim a saving
for keeping one alive. GPUs take their place in the list, which is what the AI
thesis actually needs.
The erfassung category '60' (Drucker & Scanner) deliberately STAYS. Existing
inventory rows point at it, and deleting a category that historical records
reference would corrupt them. Not soliciting new ones is the change; rewriting
the past is not.
## /revamped deleted
294 lines selling "die REVAMPED-Zertifizierung … unser exklusives REVAMPED-
Label" — the previous organisation's name, as a product label, after the
rebrand. It was orphaned from nav and footer but still listed in the sitemap,
so it was indexable. It also advertised a certification for computers "we
build" on behalf of a service flagged `available: false`, and its inbound CTA
copy had sat unmaintained long enough to contain a German grammar error ("Hol
sich deine" for "Hol dir deine"). Page, messages, sitemap entry and the
inbound certification block are all gone. If evig wants a quality label later,
it belongs on the QC Prüfsiegel the intake pipeline already produces.
Also removed `ROUTES.public.transparenzKennzahlen` — a route constant used by
nothing, pointing at a page that deliberately calls notFound().
## One baseline moved, deliberately
Two new "wrong language" findings, both false positives of the same kind as the
last batch: "Trovare un tecnico" (correct Italian) and "Encontrar a quien lo
repare" (correct Spanish), each scored `own 0` because the words are absent
from the detector's own word list for that language. Verified by reading, then
accepted.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
c9db8c32ed |
feat(home): state the five pillars, and put shared subscriptions with evig ai (#381)
The hero already said the right thing — "Zugang zu Intelligenz. Für alle
bezahlbar." Everything under it was still the story of the organisation evig
came from.
## The homepage
Two bands are gone: a "zweites Leben / weitergeben" ribbon, and a "Drei
Schritte. Ein Kreislauf." funnel that opened by asking the reader to donate
their old kit. That story is true, but it is the consequence, not the reason,
and it answered a question nobody arriving here is asking. In their place, one
section driven by a new SSOT (`src/config/pillars.ts`):
hardware → machines good enough for real work, at a price people can pay
technicians → finding someone to fix it, as easily as booking a ride
software → Linux and open source, because the machine gets faster
training → retraining for a labour market that AI is rewriting
adoption → helping organisations actually put AI and robotics to work
`adoption` points at a conversation, not a service page. Writing a consulting
page for work nobody has scoped yet is exactly the claim the honesty rule
exists to prevent. The section count is ICU-driven from the array — the
divisions subtitle taught us why: it hand-wrote "vom Gerät bis zum Gebäude"
and kept promising a building division for hours after that division was
deleted, sitting directly under a heading that correctly read "3 Bereiche".
That subtitle is fixed here too, along with two nav keys for the removed
divisions that were still being serialised into every page payload.
Pillars are deliberately NOT derived from EVIG_DIVISIONS. Divisions are how the
org is named; pillars are what it does. `training` and `adoption` have no
division and should not get one — inventing "evig academy" to make the lists
match is the brand proliferation that got architecture and health deleted.
## Subscription pools moved
They sat under "Mitmachen → Mitgliedschaft" as a generic Netflix/Spotify swap
board. The /ai page states the exact problem they solve — "Wer ein teures Abo
bezahlen kann, lernt schneller, arbeitet besser und kommt an Chancen, die
anderen verschlossen bleiben" — and then never said how. So: `ai` is now the
first pool category and the default, the page leads with the real number
(CHF 22 alone, CHF 5.50 split four ways), the nav entry sits beside evig ai,
and /ai gains a fourth strand that links to it. Strand links are a new optional
config field implementing the contextual-links rule: a paragraph naming an
offer with no way to reach it is a dead end.
## Metadata that had not caught up
The JSON-LD told search engines evig does "Reparatur und Aufbau von
Vintage-Computern" — a term for the opposite of what evig sells. And the SEO
keywords were a German array frozen into the component, so seven locales were
served German keywords. Keywords now come from the messages like every other
sentence, split from one comma-separated string per locale (the shape
`jsonld.areaServed` already uses — avoids the array-in-messages fragility,
since the DE fallback replaces arrays wholesale with no per-element merge).
## Chrome drift on the pools page
CreatePoolModal was a hand-rolled `fixed inset-0` overlay with its own
useFocusTrap and its own rounded-2xl surface — a second encoding of the
centered-dialog shape. It uses <Modal> now. PoolCard used `card-shell
rounded-2xl`, overriding the shared radius, so pool cards were visibly rounder
than every other card on the site; it uses <Card>. The loading skeleton
hand-rolled the shell in a way the ratchet grep could not even see
(`rounded-2xl` slips past a pattern matching `rounded-(lg|xl)`).
## One baseline moved, deliberately
The i18n gate flagged 8 new "wrong language" findings on the Spanish and
Italian strings. All 8 are correct in their own language ("Trova un tecnico",
"LO QUE HACEMOS"). The detector scored them "own 0" — the words are absent
from its Italian/Spanish word lists entirely, which is the sibling-language
limit, not a translation error. Accepted into the baseline; net it FELL
(48 insertions vs 53 deletions), it did not rise.
npm run verify green: lint, umlauts, chrome, docs, compliance, typecheck,
7746 tests, production build.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
2b0699faba |
ci(compliance): five named gates had never run — wire four, state the fifth (#374)
package.json defined 'compliance' (ssot + i18n + i18n-hardcoded + i18n-leaks + i18n-stale). grep across .github, .husky and package.json found ZERO callers: the only one was scripts/ship.sh, which is manual. npm run verify — the bundle CI actually calls — did not include it. Five named gates buying confidence none of them had earned, while docs/TRANSLATION.md said 'Pipe it into CI'. Unrun, they had drifted far red: 1723 hardcoded-string violations, 175 missing translation keys, and locale leaks at ja 169 / ko 170 / ru 35 against a baseline of 9. compliance:ci (ssot + i18n + hardcoded + leaks) now runs inside verify, so it gates every PR AND the deploy. The three baselines are refreshed to today's counts: that ACCEPTS the existing debt, deliberately. Ratcheted debt that cannot grow beats invisible debt that has been growing for months, and the numbers are stated here rather than buried. compliance:i18n-stale is deliberately NOT in the bundle. Its --update records that locale strings match the current German text — a claim only a translator can make. A machine refreshing it to go green would be writing down something false. It stays a manual command. Mutation-tested rather than trusted, which surfaced a real blind spot: the hardcoded scanner only reads QUOTED string literals, so a German sentence written as JSX TEXT (<p>Keine Einträge…</p>) yields '0 new' and a green gate. Attribute values and props ARE caught. Documented at the top of the scanner so nobody reads green as 'no hardcoded German'. Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
52acb231dc |
tools(ci): wire i18n leak audit into compliance gate
scripts/i18n-leaks.mjs now supports --check (CI mode, fails if leak count grew vs baseline) and --update-baseline (rebaseline after a deliberate fix). Initial baseline captures the 49 known false-positive leaks (Swiss NGO names, file paths, brand/tech tokens like Strapi/Tina, Linux distro names, email placeholders). package.json: - new script: compliance:i18n-leaks → node scripts/i18n-leaks.mjs --check - compliance umbrella now chains: ssot → i18n → i18n-hardcoded → i18n-leaks i18n-hardcoded baseline refreshed: the recent JA/KO/RU translation batches confused the "wrong-language" heuristic (it expects Latin stop-words for locale-fingerprinting). The new findings are all legitimate translations — accepted as baseline. After this commit, any future German value leaking into a non-DE locale (e.g. someone hand-copies a German blob into es.json instead of translating) fails CI immediately instead of slipping in silently. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|
|
f3851779d4 |
chore(i18n): mark workshops level-normalizer match-strings i18n-ok
normalizeLevelId() compares incoming DB strings against literal German
phrases ("anfänger bis fortgeschrittene", etc.) to canonicalise legacy
free-form workshop levels. These are pattern-match strings, not UI labels,
so the i18n-hardcoded audit was a false positive. Append // i18n-ok to
silence and re-baseline.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|
|
aab03321bf |
tools(i18n): expand audit + translation-pipeline scripts
New scripts: - i18n-leaks.mjs / i18n-apply-leaks.mjs — detect+merge per-locale values that are identical to en.json/de.json source (untranslated leaks) - i18n-hardcoded-audit.mjs — catches German UI strings hardcoded in tsx outside messages/ AND wrong-language values inside messages/<locale>.json - i18n-split-chunks.mjs / i18n-merge-chunks.mjs — split _missing/<locale>.json into N chunks for parallel translation, then reassemble Modified: - i18n-apply.mjs / i18n-audit.mjs / i18n-missing.mjs / merge-messages.ts — accept 'ru' as a valid locale - package.json — new npm scripts: compliance:i18n-hardcoded, i18n:leaks, i18n:apply-leaks; bundled into the compliance umbrella Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |