635 Commits
Author SHA1 Message Date
CatoandClaude f06bd768a5 fix(perf): bound memory and crawler load (quality-log LRU, per-IP limits, ?at= canonical, robots) (#691)
- quality-log: at most 2 languages kept (LRU, 30 min TTL), expiry drops before rebuild
  (never old+new resident); warm only the default language at boot
- explore-cache byte bound; geography fileFacts and explore-tax bounded
- heavy-limit: per-address and per-crawler token buckets (bounded maps) on law, places,
  statistics, /api/v1 and /_next/image; 429 + Retry-After
- law ?at=: canonical to plain URL + noindex
- robots: Crawl-delay, disallow sign-in/sign-up, ?at=, /_next/image; nofollow on sign-in?from=
- /api/health reports memory {heapUsed, heapTotal, rss, external} in MB

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-04 00:51:08 +01:00
CatoandClaude 42a4f5135a fix(places): a place's law row carries the same in-force count as /law (#688)
Co-authored-by: Claude <noreply@anthropic.com>
2026-12-02 10:10:16 +01:00
CatoandClaude 3990d0e93d feat(places): Italy, region by region and comune by comune (#681)
Italy as a pack of its own, from ISTAT's SITUAS at the current date
(2 December 2026): the 20 regions, five of special statute; 110
supra-municipal units (83 provinces, 15 metropolitan cities, 6 free
municipal consortia, the autonomous provinces of Trento and
Bolzano/Bozen, and Friuli-Venezia Giulia's 4 non-administrative units,
as ISTAT lists them); and 7,894 comuni, each in its unit. Sardinia's
units are those of its reform, recoded from 1 January 2026. A comune's
German, Ladin or Slovene name stands beside the Italian one where ISTAT
gives it. ISTAT content is CC BY 4.0; names in other languages from
Wikidata (CC0).

The country, every region and the 102 units whose Wikidata item holds
the world pack's ISO 3166-2 code move over with their pages; the
provinces of Sassari and South Sardinia, which the reform abolished,
end.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-02 09:42:11 +01:00
CatoandClaude 8b92d8e192 feat(support): Support Solon block on home, footer and pricing, through OrangeCat (#687)
Co-authored-by: Claude <noreply@anthropic.com>
2026-12-02 09:39:51 +01:00
CatoandClaude 971ced18c6 docs(design): world law model proposal; user feedback of 2026-12-02 (#686)
Co-authored-by: Claude <noreply@anthropic.com>
2026-12-02 09:33:12 +01:00
CatoandClaude b30459050a fix(ask): the write step always ends; no 'provided provisions' wording; one in-force count; busy page is 503; neutral session corner (#685)
Co-authored-by: Claude <noreply@anthropic.com>
2026-12-02 09:29:40 +01:00
CatoandClaude 9ac74a3d4f docs: one source for agent rules; tokens live in @bitbaum/design-tokens; fleet links to git.orangecat.ch; ROADMAP counts (#684)
Co-authored-by: Claude <noreply@anthropic.com>
2026-12-02 08:49:10 +01:00
CatoandClaude 4a54d75f78 fix: law ask reliability, cited sources, honest law count, account email, build sha (#683)
* wip: law ask reliability and prompt

* fix(law): reliable ask with one retry, cited sources, no prompt wording, honest headline, widget clearance, account email words, build sha

- law ask: whole-stream cap raised, first-token deadline, one automatic retry on the next model, errors logged, localized failure text
- answers list the provisions they cite as links; no-result wording never leaks the prompt
- /law headline = sum of what place pages print (register acts), not text-held subset
- feedback widget avoids the place tiles (data-fc-avoid)
- /account: plain words for a missing email with one primary button, all locales
- /api/health build and <meta name=solon-build>

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-02 08:17:39 +01:00
CatoandClaude 71bbcde64a feat(places): Austria, Land by Land and Gemeinde by Gemeinde (#682)
Austria as a pack of its own, from Statistik Austria's regional
classification (open data, CC BY 4.0, as of 2026-01-01, checked code by
code against the 2026 lists): the nine Länder, 79 political districts,
14 statutory cities (each a Gemeinde that is its own district, held once
with both codes), 2,077 Gemeinden in the districts, and Vienna as Land,
district and Gemeinde with its 23 districts. 2,092 Gemeinden and 94
districts, as Statistik Austria counts them.

Each Land keeps the ISO 3166-2 code the world pack held it by, so its
page moves and the old path redirects. The 22 Burgenland Gemeinden the
Volksgruppengesetz, Anlage 1, names whole carry their Croatian or
Hungarian name. Names in other languages from Wikidata.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-02 07:54:46 +01:00
CatoandClaude Opus 5.5 63d7a82cc7 feat(i18n): every world route and local-say example in eight languages (#679)
* fix(law): world routes say who signs in plain words; a region's own routes first

whoMaySign held whole sentences on 40 world routes, so the signature line read
"Signatures from In a commune, one tenth of the voters ... equal to 10% of ..."
or "30 signatures from The NPC Presidium; ...". Each is now the plural noun
phrase the line reads after "signatures from", from the route's own quoted
provision; bodies that may start a route without signatures move to a new
alsoBy field, shown as "Also started by ...". On a region's page, the local
routes and examples that name it come first. The section's heading names no
country, since "a part of United Kingdom" needs an article no template has.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

* Routes: every world route and local-say example in all eight languages

The 195 world routes and the 25 local-say examples gain German, French,
Italian, Russian, Chinese, Japanese and Korean text, kept in
src/lib/config/law/routes-world-text/<locale>.ts by route key and by an
example's place and year, and joined onto `text` in routes-world.ts.
Machine-translated, not yet read by a native speaker; every English number
is kept (a test checks it), and where a provision is quoted in the
language, its official terms are used.

RouteText gains alsoBy and concerns, which localizeRoute now reads; each
language's whoMaySign and signatureBase are written to read inside its own
routeBar/routeShare (the Italian share and alsoBy labels are reworded so a
base with its article fits). place-change shows an example's place and
words in the reader's language and still matches by the English place.

Chinese, Japanese and Korean get the Amend.amendment labels the route card
prints; Amend stays pending there otherwise, and the parity test now reads
a pending namespace that is filled in part.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

* French route bar names the signers after a colon

"Signatures de électeurs…" broke elision for every base that starts
with a vowel; the bar and the share now read "… ; signataires : {who}".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-02 06:32:45 +01:00
CatoandClaude e5f2d25dd1 fix: law-ask steps, test data, session corner, statistics speed, law counts, placeholder (#677)
* fix(law ask): plain-language progress steps in every locale, no tool names or JSON

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(proposals): smoke-test rows stay off public pages

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(header): the session corner claims nothing until the session arrives, so every page agrees

Co-Authored-By: Claude <noreply@anthropic.com>

* perf(statistics,i18n): serve the quality log stale-while-revalidate and warm it at start; ship only the sentences the browser reads; one law count; shorter law search placeholder

Co-Authored-By: Claude <noreply@anthropic.com>

* style: prettier; restore loadLatestChecked

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(i18n): activity sentences and law placeholder for zh, ja, ko

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-02 05:37:27 +01:00
CatoandClaude 9a3b4e8786 fix(law): world routes say who signs in plain words; a region's own routes first (#676)
whoMaySign held whole sentences on 40 world routes, so the signature line read
"Signatures from In a commune, one tenth of the voters ... equal to 10% of ..."
or "30 signatures from The NPC Presidium; ...". Each is now the plural noun
phrase the line reads after "signatures from", from the route's own quoted
provision; bodies that may start a route without signatures move to a new
alsoBy field, shown as "Also started by ...". On a region's page, the local
routes and examples that name it come first. The section's heading names no
country, since "a part of United Kingdom" needs an article no template has.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-02 05:20:08 +01:00
CatoandClaude Opus 5.5 ebcb85af72 feat(i18n): the start-a-business guide in eight languages; per-language pending lists for the messages check (#675)
* fix(i18n): check:messages leaves out each language's own pending namespaces

langkit's command line takes one --pending list for every language, but
Amend is pending only outside AMEND_LOCALES, so main failed check:messages
with 366 missing Amend keys in zh, ja and ko. scripts/check-messages.ts
calls langkit's checkMessages with a per-language map, read from
src/i18n/pending.ts, which the parity test now shares.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

* feat(i18n): the start-a-business guide in all eight languages

The page's words are the StartBusiness messages (metadata too); the guide's
facts stay written once, in English, and read their other languages from
data/i18n/config.json by their English words. guideTexts() lists every
text the page can show from the guide files, for every country and
region, so pnpm run i18n:config finds them and the configuration test holds
each to every language. Official names keep their original (in brackets
where the English has them; as they are in German). The route counts as
translated. The title no longer hyphenates words that fit a 320px line.
Chinese, Japanese and Korean are machine translations, not yet read by a
native speaker, as for the rest of the site.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-02 03:12:31 +01:00
CatoandClaude 913de0f9b5 feat: starting a business in one shape for every country; Berlin beside Zürich (#658)
The guide becomes a shape each country fills in (config/guides/
start-business/types.ts): forms, steps in order, who does each, fees as
amounts. Switzerland moves into it; Germany is added: sole trader, GmbH
and UG, Berlin's trade office, fees and channels from service.berlin.de,
and the federal rules (GewO 14, GmbHG 2, 5, 5a, 7, AO 138, UStG 19,
AufenthG 21) quoted from the text Solon holds.

The page picks the country from ?in=, and ends with "The same thing
elsewhere": steps, offices and published fees counted the same way in
every place with a guide (a permit step, which only some take, is not
counted).


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-02 02:29:16 +01:00
CatoandClaude Opus 5.5 e24eb72e42 feat(places): Belgium by its parts, side by side in Eurostat's figures (#674)
* feat(places): the Netherlands and Belgium as packs

- The Netherlands from Statistics Netherlands' "Gebieden in Nederland 2026" (86247NED, CC BY
  4.0): 12 provinces and 342 municipalities by CBS code, Amsterdam GM0363 among them; Bonaire,
  Sint Eustatius and Saba as public bodies (GM9001 to GM9003, table 83698NED).
- Belgium as Statbel nests it on be.STAT, with the NIS codes of Eurostat's LAU 2026 list: 3
  regions, 10 provinces, 43 administrative arrondissements, 565 municipalities after the
  mergers of 1 January 2025. Brussels has no province, so its arrondissement and its 19
  municipalities are levels of their own under the region.
- The Flemish, French and German-speaking Communities as an overlapping level: each overlaps
  the municipalities of its language area (285, 252 and the 9 of NUTS 3 BE336), from the
  Constitution (Art. 2, 127, 128, 130), vlaanderen.be and federation-wallonie-bruxelles.be;
  none overlaps Brussels' municipalities, where their decrees reach institutions.
- Names in other languages from Wikidata (CC0), matched by CBS code (P382) and NIS code
  (P1567). ISO 3166-2 rows move from the world pack. Built by scripts/places/netherlands-units.py
  and scripts/places/belgium-units.py.
- A test holds every repository batch file that carries a whole pack to its levels: parents,
  overlaps and identifier forms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

* fix(i18n): the City of Zürich's tasks and departments in Chinese, Japanese and Korean

#666 merged after #668 with nine new phrases in five languages, so main's
parity test failed for zh, ja and ko. These are the nine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

* fix(places): the Netherlands' and Belgium's names in Chinese, Japanese and Korean

Main gained three languages while this branch was open: the two packs'
level names and attributions in zh, ja and ko, and main merged in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

* feat(places): Belgium's parts in Eurostat's figures, side by side

Belgium, the Flemish, Walloon and Brussels-Capital Regions and the
German-speaking Community's area (NUTS BE336) get their population on
1 January, area, GDP and GDP per inhabitant from Eurostat's regional
tables (demo_r_pjanaggr3, reg_area3, nama_10r_3gdp), read live by the
existing eurostat_json adapter, which now takes NUTS codes beside
country codes. Each is a statistic with its definition, scope and plain
words, so every part's page shows the four figures with their source and
each opens the statistic's page, where all five places stand side by side.

- regional-metrics.ts: the four metrics and the requests that read them
- eurostat-regions-be: the source, NUTS code to the pack's places
- profile figures: a "Population, area and output" group; a place that
  is not a country is no longer ranked among the countries; an area
  draws no trend line (a square kilometre re-measured reads as a leap)
- themes, plain words, 8 locales

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-02 02:12:44 +01:00
CatoandClaude 7e16bbf5df fix(i18n): restore dropped links in fr/it, Russian plural forms; langkit in verify (#661)
* fix(i18n): restore dropped source links in fr/it and Russian plural forms

An ASCII apostrophe right before a tag opens an ICU quote, so French and
Italian readers saw the literal text "L<geostat>office statistique</geostat>"
instead of a link (Statistics.why.example.sources, Places.profile.source).
Those strings now use the typographic apostrophe. Three Russian plurals
(Places.compare.law.whyHint/whySure, Statistics.checks.sum.result) gain
the few and many forms they need.

Co-Authored-By: Claude <noreply@anthropic.com>

* chore(i18n): run langkit check:messages in verify

Adds @bitbaum/langkit and a check:messages script (with the parity test's
PENDING_TRANSLATION namespaces as --pending) to the verify gate, as the fleet
template does, and documents it. The verify lines in AGENTS.md, README.md and
.claude/CLAUDE.md now list every step the script runs.

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-02 01:55:22 +01:00
CatoandClaude 585884e63e feat(places): Brazil, Argentina and Chile, state by state and commune by commune (#673)
Brazil: 26 states, the Federal District, 5,569 municipalities and the
state district of Fernando de Noronha, from IBGE's localities API.
Argentina: 23 provinces and the Autonomous City, 512 departments and
partidos, the City's 15 comunas and 1,877 local governments, from IGN's
units in the Georef API (CC BY 4.0). Chile: 16 regions, 56 provinces and
345 communes by CUT code, from the Library of the National Congress's
vector maps. Names in other languages from Wikidata.

Each state, province and region keeps the ISO 3166-2 code, and so the
page, the world pack held it by. Antarctica and the South Atlantic
islands stay places of their own in the world list: Tierra del Fuego's
departments for them and Chile's commune of Antártica are not added.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-02 01:16:20 +01:00
CatoandClaude Opus 5.5 c313dd9f41 feat(places): what people in Amsterdam most often need, and who runs the city (#672)
* feat(places): what people in Amsterdam most often need, and who runs the city

Ten tasks in the order of the city's own "Direct naar" list (reporting a
move, registering from abroad, passport and ID card, parking permit,
bulky waste, the waste levy, municipal taxes and their remission,
holiday rental, registering a business), and who runs the city: the
mayor, the aldermen and their portfolios, the council's seats and the
district boards. In Dutch and English, read 2026-12-01 from
rijksoverheid.nl, government.nl, the city's regulations on
lokaleregelgeving.overheid.nl, kvk.nl, organisaties.overheid.nl and the
city's September newspaper: www.amsterdam.nl refused automated readers
that day, so its links are the homepage's own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

* fix(places): tasks lead and source line name no single city

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-02 00:39:28 +01:00
CatoandClaude 7d635cbb59 feat(law): how the law is changed in 22 more countries, and how a part of each gets more say (#671)
195 official routes, each quoted from the text that makes it and linked
to where it was read on 2026-12-01: who may put a bill, how the
constitution is amended, and every route open to people (petitions,
citizens' initiatives, referendum demands, requests to review a rule,
constitutional complaints) for North Korea, China, South Korea, Japan,
Singapore, Belarus, Germany, Israel, the Netherlands, Belgium, Brazil,
Argentina, Chile, France, Italy, Austria, the United Kingdom, Spain,
Denmark, Finland, Sweden and Norway.

78 of them are how a part of a country (a state, region, island or
commune) obtains more powers, a statute or a vote of its own under the
country's own law; a place's page shows them under their own heading,
with the 25 places that took one (Greenland 2009, Corsica 2018, South
Tyrol 1972, ...). Each route shows the provision's words, and the
original beside a translation.

Route types move to route-types.ts so the lists can share them. Also
carries the nine zh/ja/ko phrases of #670, which this branch needs to
pass.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-02 00:24:05 +01:00
CatoandClaude 9a92df0ba5 fix(i18n): the City of Zürich's tasks and departments in Chinese, Japanese and Korean (#670)
#666 merged after #668 with nine new phrases in five languages, so main's
parity test failed for zh, ja and ko. These are the nine.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-02 00:08:49 +01:00
CatoandClaude Opus 5.5 ad3d22ea92 feat(places): what people in the City of Zürich most often need, and who runs the city (#666)
* feat(places): what people in the City of Zürich most often need, first on its pages

Eight tasks, each with the office, how, cost, when and where to start,
from the office's own page (stadt-zuerich.ch, zh.ch, read 2026-12-01):
moving within the city, moving in from elsewhere in Switzerland and from
abroad, the debt-register extract, the tax return and its extension, the
residents' parking card, the Züri-Sack, passport and ID. Witikon and
every place in the city show the list; in German and English, English
for other readers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

* feat(places): who runs the City of Zürich: its departments, their heads and offices

The eleven departments and central offices as the city lists them, each
with what it does, who heads it and the offices under it, each linked to
its own page (stadt-zuerich.ch, read 2026-12-01). Shown on the city's
page and on every place in it, after the funds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-01 23:36:12 +01:00
CatoandClaude e8696eb56d feat(i18n): Solon in Chinese, Japanese and Korean (#668)
Every message, configuration text, contested-place question and area
name in Simplified Chinese, Japanese and Korean, with the three in the
language menu. Each language has its list of words that take a side
about a place, matched anywhere in a text because these languages run
words together; the neutrality test reads all eight catalogues. The
chat and law-question endpoints accept every locale, model prompts name
the language from Intl rather than a table of five, and <html lang> is
zh-Hans for Chinese so the browser picks Simplified glyphs.

Translated by a model, checked for placeholders, tags and the loaded
terms; not yet read by a native speaker (AGENTS.md says so).


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-01 22:56:27 +01:00
CatoandClaude 1f49c3bf0a fix(places): Taiwan's page says the People's Republic regards it as its territory (#667)
Kosovo, Abkhazia, South Ossetia, Transnistria, Northern Cyprus and
Somaliland each say which state regards them as part of its territory;
Taiwan did not, although ISO 3166-2 lists it as CN-TW and the PRC
constitution's preamble says so. One fact, stated as the others are,
quoted from gov.cn: the page now says it governs itself, is not a UN
member, and China regards it as part of its territory, with the
contested places list naming it.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-01 22:24:11 +01:00
CatoandClaude 2edbbc7b6f fix(places): the World Bank's indicators are read by the box again (#665)
The World Bank source was marked `fetchFrom: "runner"` on 2026-11-12 because its
API answered the box HTTP 403. The runner that drained that queue was a GitHub
Actions schedule (places-load-cloud.yml), and Actions has run nothing in the org
since 2026-11-15, so the source would never be read again (next due 2026-12-09).

Measured 2026-12-01 from the box (167.233.22.31) with the importer's user-agent:
all 8 retrievals of the source answer HTTP 200 with one page of rows each. The
source goes back to the box's hourly appcron worker; `fetchFrom` and the runner
side of the queue stay for the next publisher that refuses the box.

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-01 22:08:54 +01:00
CatoandClaude 0f7394030a feat(places): 8053 is Witikon: the City of Zürich's postcodes by quarter (#664)
Every official address in the City of Zürich (swisstopo's register of
building addresses) placed in the city's statistical quarters and
counted per postcode: 98.6 % of 8053's addresses are in Witikon. The
table (data/places/switzerland/zurich-postcode-quarters.csv) is made by
scripts/places/zurich-postcode-quarters.py and imported as a postcode
source. A postcode search puts a quarter holding most of a postcode
before the city it lies in.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-01 21:51:55 +01:00
CatoandClaude Opus 5.5 db6c8ece61 Places: Ukraine, Russia, Belarus, Latvia, Lithuania, both Koreas and Singapore as packs; both claims held for six areas (#663)
* feat(places): Ukraine, Russia, Belarus, Latvia and Lithuania as packs; both claims held for six areas

- Ukraine from its KATOTTH codifier (order No. 1321 of 7 July 2026): 27 regions, 136 raions,
  1,772 territorial communities. Russia: the 89 subjects of Constitution Art. 65 with the
  Federal Tax Service's subject codes. Latvia from the ATVK (CC0), Lithuania by Statistics
  Lithuania's codes, Belarus from Wikidata until one of its registers answers. ISO 3166-2 rows
  move from the world pack and keep their pages; the world files leave these countries out.
- A contest may be an area two packs' units each claim: every side names its unit and quotes
  its claim; listed alphabetically. Crimea, Sevastopol and the Donetsk, Luhansk, Zaporizhzhia
  and Kherson regions compared from each side's own constitution (and Russia's admission laws).
- Paths from Cyrillic and Hangul names are transliterated; pages are read in the charset they
  declare (the weekly source check and the constitution reader); "1 straipsnis" is an article.
- Latvia's, Lithuania's and Belarus's constitutions chosen in the plan from their official
  publishers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrUENEfGK4f785HStF

* feat(places): South Korea, North Korea and Singapore as packs

- South Korea from the Ministry of the Interior and Safety's legal-dong code register: 16
  provinces and metropolitan cities (Gwangju and South Jeolla as one unit since 1 July 2026),
  229 cities, counties and districts, 39 districts of cities.
- North Korea's 13 ISO 3166-2 places and Singapore's 5 CDC districts from Wikidata, their own
  registers not having answered; both on the ROADMAP with their plans.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrUENEfGK4f785HStF

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-01 21:36:24 +01:00
CatoandClaude bcfd87d971 feat(places): the West Bank, East Jerusalem, Gaza and the Golan, side by side; Israel's localities (#662)
The contest model holds layered places (shape C, design 2026-11-contested-law.md §5.2) as data:
a side may name its own world place or names of its own, administer the place, govern only the
zones a source draws, and must quote the words its role rests on; a contest quotes how others
(UN Security Council resolutions) describe the place, attributed. No place is named in code.

- world list: west-bank, east-jerusalem, gaza-strip, golan-heights (Wikidata items), claimedBy
  the State of Palestine / Syria.
- contests (src/lib/config/places/contests/levant.ts): Areas A, B, C and each side's
  jurisdiction from the Interim Agreement (1995, UN-circulated text); Israel's Basic Laws
  (Knesset translations) and the Golan Heights Law; the Amended Basic Law of Palestine and its
  UN membership application; Syria's Constitutional Declaration (2025); SC resolutions 478, 497,
  2334, 2803; PwC tax summaries cited as summaries. Every page opened 2026-12-01; every quote
  translated in data/i18n/config.json for de, fr, it, ru.
- the weekly source check reads PDFs by their text layer (unpdf), so the resolutions and the
  Basic Laws are checked like any page.
- an israel pack from the Central Bureau of Statistics' locality file on data.gov.il
  (scripts/places-il-cbs-localities.ts): 7 districts and 1,267 localities, 127 in the file's
  Judea and Samaria Area; Israel and its ISO districts move out of the world pack with their ids.
  A pack may name the language its paths are read from (Hebrew is not transliterated).
- ROADMAP: what is still open (PCBS localities, CBS subdistricts, a second reader, statutes).


Claude-Session: https://claude.ai/code/session_019MDtmuGwYBfhKDBa4xK9Ui

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-01 20:59:20 +01:00
CatoandClaude 1116362880 fix(law chat): look on the web when the law held does not answer, and stop assuming Switzerland (#660)
The research step always offers web search: a configured backend first,
Wikipedia and GDELT's news index (no key) behind it. Its prompt lists
the law Solon actually holds and asks for each place's law in its own
language (Russian for South Ossetia). The answer may not say yes or no
from a provision's silence, must name the place searched, and never
applies one place's law to another.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-01 20:33:37 +01:00
CatoandClaude ffd5a01ddd feat(places): choose who you pay: the funds of a place and every place it lies in (#659)
Every place's page lists the place and each place above it, nearest
first, with its level, and for each the local funds founded for it: give
to one through its OrangeCat group, or start one for that place. Then
what the people there would choose (OrangeCat's civic split, averaged
once three have declared) and a link to say your own. Voluntary, on top
of what the law takes, never instead: the section says so.

Solon groups bound to an OrangeCat group keep its address
(organizations.orangecat_group_slug, migration 0040, additive).


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-01 20:02:33 +01:00
CatoandClaude 6274392991 feat: start working for yourself or a company, the steps in order on one page (#657)
/do/start-a-business?in=CH-ZH&form=sole|gmbh: the two forms side by
side (capital, liability, register, fee), then the chosen form's steps
in order: permit, capital, deed, commercial register, compensation
office, VAT. Each with its cost and time from the office's own page,
the office's link, and the law it rests on, quoted from the text Solon
holds. The permit step opens Causius's own-account case. Every Swiss
place's "What do you need done?" leads here.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-01 17:45:26 +01:00
CatoandClaude f97cf8ca91 feat(places): "What do you need done?" first on every place's page, into Causius (#656)
Seven problems people bring (work for yourself whatever your permit, rent
increase, debt collection, dismissal, tax assessment, insurance refused,
found an association), each opening a case in Causius with the problem and
the place chosen (the canton's code up the chain, else the country's). Then
asking the law on the page and organising with others there.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-01 13:31:55 +01:00
CatoandClaude eacd85d4b1 feat(places): who is organising here; found a group for a place from its page (#655)
Every place's page lists the groups founded for it or a place inside it
(organization_places, migration 0039, additive; design 2026-09 §4.8),
most active first, and offers to start a civic group or a local fund for
it. The founding page takes the place by its path, says which place the
group is for and that it speaks for its members, not the authority, and
fills in the place. A path Solon does not hold is refused.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-01 12:39:43 +01:00
CatoandClaude ee8689fb0f feat(pricing): the owner gets one mail when somebody new joins a waitlist (#654)
At most twenty an hour from one process; the rest are stored and counted
in the next mail. A repeat sends nothing, and without a mail transport
nothing is sent. The prices stay as proposed: the owner asked on
2026-12-01 to go ahead without changing them.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-12-01 12:01:40 +01:00
CatoandClaude Fable 5.2 e17644712a feat: the reader chooses the model; pricing with a waitlist until Solon can charge (#653)
* feat(chat): the reader chooses which model answers: a free one, or their own key

Both chats (the law, governance) get chatkit's model button and sheet
through useModelOptions; /api/law/ask and /api/chat choose the chain
with ai-kit/choice. A reader's own key replaces Solon's models for
their questions and is never stored here. Under a long answer a free
model wrote, one line leads to the sheet.

Needs @bitbaum/ai-kit 1.33.0 and @bitbaum/chatkit 0.48.0 (kits#20);
the lockfile follows once they are published.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

* feat(pricing): what Solon offers, at what price, with a waitlist until it can be sold

/pricing shows four tiers (Free, Plus, Professional, Organization) as
sitekit's PlanTable, in five languages. The paid ones are not on sale:
the price is what we plan to charge and the button takes an address
(plan_waitlist, migration 0038, additive) through paykit's joinWaitlist.
The model sheet's third way and the Hire page lead there.

Prices live in lib/config/plans.ts only and are a proposal, not yet
confirmed by the owner.

Needs @bitbaum/paykit 0.5.0 and @bitbaum/sitekit 0.9.0 (kits#21) and
kits#20; the lockfile follows once they are published.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

* chore: lockfile for ai-kit 1.33.0, chatkit 0.48.0, paykit 0.5.0, sitekit 0.9.0

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-30 21:39:41 +01:00
CatoandClaude 18a8d0deb6 fix(load): the page that earns a pass is not an error (#652)
Sent as 503 it made everything that checks the site from outside without
a browser call it down: the deploy of #651 was marked failed while its
release was live. Asked to earn a pass: 200, noindex, no-store. Told to
try again because the process is never free: 503 with Retry-After, as
before.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-30 10:09:52 +01:00
CatoandClaude c6196db02f fix(load): the box's own check is told by its address, not by a header Next always adds (#651)
solon#650 (the guard) was rolled back on its deploy, 2026-11-30 08:20 UTC:
"RESULT solon: systemd=active http=503". The box's health check
(curl http://localhost:<port>/) was to be recognised by having no
X-Forwarded-For. Next writes that header itself when there is none, with
the socket's address, so the check was taken for a visitor without a pass
and, with the guard up, got the busy page. #647 to #649 deployed only
because the process happened not to be refusing at that second.

load-shed.ts `cameThroughWebServer`: a request is a visitor's when the first
address in X-Forwarded-For is not loopback (127.x, ::1, ::ffff:127.x). The
web server writes the visitor's address there; the box asking itself is
loopback.

Checked on a production build with the guard up and a scraper running:
the box's check as deploy.sh makes it, six times: 200 each; the same request
with a visitor's address and no pass: 503; the scraper 4 pages and 1,476
small answers; the health count now exact (the box's checks are not
counted: 4 served, 1,477 asked to earn a pass). An earlier test had counted
14 for 13 requests and I did not follow it up; that was this.

load-shed.test.ts: 18 tests. The unit suite and the gates pass.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-30 09:42:15 +01:00
CatoandClaude 951485917f fix(load): once under pressure the guard stays up; a free second no longer lets the scraper in (#650)
Read from /api/health on production, 2026-11-30 07:58-08:00 UTC, with the
pass asked for only while the process was 60 % busy (#648):
  requests without a pass: 1,900 to 2,400 a minute; with a pass: 0
  served: about 50 a minute; busy: 0.70
The scraper runs no script, so it never has a pass. But each time the load
dipped under the mark the next requests without one were served, about 50
heavy pages a minute, and that was the load: a threshold alone hands the
scraper whatever capacity is free.

load-shed.ts `guardUntil`: pressure is the process 60 % busy, or 120
requests a minute without a pass (SOLON_GUARD_PER_MINUTE). The guard stays
up for ten minutes after pressure was last seen, and while it is up every
request without a pass gets the small page that earns one. Readers with a
pass, named crawlers and the box's own checks are not affected. /api/health
`load.onGuard` says whether it is up.

Measured on a production build, a scraper at about 30 requests a second
without a pass for 70 s:
  before (#648): the process stayed busy; 9 pages in 40 s
  after: 3 pages served, 2,349 small answers; the process 2 % busy
         (4 s CPU in 45 s); a real browser on its pages in 0.3 to 1.1 s

load-shed.test.ts: 15 tests. The unit suite and the gates pass.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-30 09:15:20 +01:00
CatoandClaude 36d11c7ab8 feat(health): the health check says how busy the process is and what it was asked for (#649)
On 2026-11-30 the site was saturated for hours. The web server's error log
(read through forge-ops box-status) showed who was asking; how many requests
arrived, and how many carried a reader's pass, could be read nowhere. So it
cannot be told yet whether the scraper earns the pass (it runs a browser) or
whether the number of requests alone keeps one process busy.

/api/health now carries `load`: the share of its time the process works
(last 3 s and last 8 s) and, for the last minute and the last five, how many
page requests were served (with a pass, by a named crawler), asked to earn a
pass, or told to try again. Counted in memory in ten-second slots
(src/lib/load-count.ts); the box's own checks are not counted; nothing about
any one request is kept.

Checked on a production build: 12 reader requests, one crawler and one
request without X-Forwarded-For gave served 14, servedCrawler 1 after the
slot closed. load-count.test.ts: 3 tests; the unit suite and gates pass.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-30 08:49:42 +01:00
CatoandClaude f1193ac4ce fix(load): while busy, a request without a reader's pass earns one in the browser (#648)
Read from the web server's log on 2026-11-30 (forge-ops box-status, #35): in
forty minutes 4,608 requests to solon were aborted unanswered. Hundreds of
addresses, each naming itself an ordinary browser (Windows Chrome, macOS,
Firefox), walking /law/<id>, the same in it, ru and de, /law/<id>/amend?at=
for single articles and the sign-in and sign-up pages those redirect to. One
scraper behind many addresses: it names no crawler, so the crawler rules
never applied, and each address asks too rarely for a limit per address.

src/lib/reader-pass.ts: a pass is <nonce>.<answer>.<seal>. The seal is this
server's HMAC over nonce and day; the answer is a small sum over the nonce
that the page's script computes. Good for the day and the next.
load-shed.ts: while the process works 60 % or more of the last 3 s, a
request without a valid pass gets the small busy page with that script,
which keeps the pass as a cookie and loads the page again. With a pass a
reader is served as before (refused only when never free for 8 s). Nobody is
asked for anything while there is time to spare. A browser that keeps no
cookies is not reloaded by the script, so it cannot loop.

Measured on a production build: a scraper with no cookies and a browser's
user agent, 20 at a time for 40 s, each request from another address:
  the scraper: 9 pages served, 11,091 answers of 733 bytes
  a real browser meanwhile: 503 then 200, on the real page after 0.6 s,
    pass kept; its next pages 200 at once
  health check during it: 10 ms; server CPU 26 s of 46 s

reader-pass.test.ts runs the page's script in a VM as a browser would
(8 tests); load-shed.test.ts 12. The unit suite and the gates pass.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-30 08:14:51 +01:00
CatoandClaude 872c23eccd fix(load): when the process is never free it says so, instead of making everybody wait (#647)
Read from the box, 2026-11-30 05:17 UTC: solon's one thread at 147 % CPU
since its start sixteen minutes earlier, seven connections, no database
query over five seconds, nothing answered (health included), and the
reconciler's restart changed nothing. The crawler budget admits a page a
second however long each takes; it cannot see that.

src/lib/load-shed.ts: the process measures the share of its time its event
loop spends working (perf_hooks eventLoopUtilization, read every 250 ms).
- 60 % or more over the last 3 s: crawlers get 429, Retry-After 30.
- 95 % or more over the last 8 s and the last 3 s: a new reader gets 503
  with a short page in their language that reloads by itself after 5 s.
- A request that did not come through the web server (no X-Forwarded-For:
  the box's own health check after a deploy) is never refused.
Thresholds are env-overridable (SOLON_CRAWLER_BUSY, SOLON_READER_BUSY).

Measured on a production build, flooded with heavy explorer pages 40 at a
time while other requests were made alongside:
  before: all 240 served, slowest 38 s; health check 32 s; /law 45 s
  after:  what fits is served (about one of these pages a second), the rest
          answered at once with the busy page; health instant, /law 0.2 s
A first version judged by how late timers fired; in the same flood they
were never late enough, so it shed no reader. The share of time is the
measure that moved.

load-shed.test.ts: 11 tests. The unit suite (1,686) and the gates pass.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-30 07:06:19 +01:00
CatoandClaude 48e13a8c6b feat(chat): the chats in a page open over the whole screen (chatkit 0.47 expandable) (#646)
Owner, 2026-11-29, on the law chat in Lugano's page: the window should be
expandable to full screen, designed and working like the other chats, from
the package. chatkit 0.47.0 (kits#18) adds `expandable` to ChatApp; this
turns it on for LawChat (place pages, /law/ask, the amend form) and the
governance chat.

- @bitbaum/chatkit ^0.45.0 → ^0.47.0.
- `expandable` on both ChatApps; labels expand/collapse in en, de, fr, it, ru.
- globals.css: opened, the chat screen fills the screen instead of the
  75dvh it has in the page.

Checked in a browser on a production build with the package's tarball,
phone and desktop, /de/law/ask and a place page: the button is there, open
it covers the screen exactly and nothing of the site is drawn over it, the
typed words stay, Escape puts it back, no page errors (24 checks). tsc,
eslint, prettier, design:check, check:cycles and the unit suite pass with
the published 0.47.0.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-29 22:05:06 +01:00
CatoandClaude 4a5ba063c2 fix(law): a question is also searched by its own words, whatever the model plans (#645)
Asked from Lugano's page on 2026-11-29, "Welche Kündigungsfrist gilt hier für
Mieter?" was answered with "the law names no notice period". The plan a free
model made for it was "Abruf", "Amtswochennummer", "Jahresende" and an act
called "Mietrecht"; nothing found applied. The rule is Art. 266a to 266f OR,
which hold neither "Kündigungsfrist" nor "Mieter": they say "Miete von
Wohnungen", "Frist von drei Monaten", "kündigen".

ask/stems.ts turns the question's content words into ideas with no model:
stop words out, endings shed, a German compound as itself or as both of its
parts. Every idea must be in the provision:
  ((kündigungsfrist:* | …) | ((kündig:* | …) & frist:*)) & miet:*
retrieve() searches that first, per authority (16 hits, the Confederation
and the place asked about), then the plan's words as before. Measured on the
live register through /api/mcp law_search: kündig & frist & miet returns
Art. 266a, 266b, 266c, 266d, 266e, 266f, 266g, 266h, 266i, 266k within its
first sixteen federal hits; the phrase as typed returned none of them.

The query is built from letters only (a test feeds it tsquery operators).
A question in English or Russian shares no stems with a German text and
finds nothing here; the plan still translates for it.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-29 21:05:28 +01:00
CatoandClaude f699b90e05 fix(crawlers): one page a second for all crawlers, not three (#644)
Three a second was the box's whole capacity: measured on 2026-11-29, 317
pages six at a time took 121 s, about 2.6 pages a second for everyone.
Default now 1 a second with bursts of 10 (SOLON_CRAWLER_RPS,
SOLON_CRAWLER_BURST still override).


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-29 17:34:24 +01:00
CatoandClaude 1d44e5d11a fix(links): a link does not preload its target; one page read is one page drawn (#643)
Next preloads every link that scrolls into view, and every page here is
rendered on request. Measured with a browser on a production build, a phone
viewport, scrolling to the bottom:

  page                     requests to the server   after
  home                     101 (91 preloads)        10 (0)
  /law                      93 (91)                  2 (0)
  /places/switzerland      104 (101)                 3 (0)
  /places/explore           93 (91)                  2 (0)
  /places/explore?all=1    780 (778)                 2 (0)

Server CPU for those five visits: 11 s before, 4 s after. The box draws
about three pages a second (317 requests six at a time took 121 s on
2026-11-29), so a few readers, or one person scrolling the explorer, kept
the one process too busy to answer anyone. The site stopped answering on
2026-11-28 (three times) and on 2026-11-29 from about 14:50 UTC.

The shared Link (src/i18n/navigation.ts, used by all 103 importers) now
passes prefetch={false} unless a link sets it. Clicking a link navigates as
before (a commune from the explorer: 459 ms locally).


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-29 16:56:07 +01:00
CatoandClaude b4ef90e9ae fix(crawlers): every crawler together gets a budget of pages a second (#642)
Solon stopped answering three times on 2026-11-28 (from 09:15, 18:05 and
18:55 UTC) while the process was alive. During the third, a favicon (no
database) took 4 s: requests were queued behind each other, not blocked on
the database. The sitemap lists over 50,000 acts and the places thousands
more; at ~100 ms a page, crawlers alone can ask for more than one process
can draw. #618, reverted in the meantime, was not the cause: it renders as
fast as before, and the third outage came with it reverted.

The proxy now gives all crawlers (the existing CRAWLER pattern) one token
bucket: 3 pages a second, bursts of 20 (SOLON_CRAWLER_RPS,
SOLON_CRAWLER_BURST). Above it they get 429 with Retry-After: 30. People
are never limited; robots.txt, sitemaps, API and assets are outside the
matcher.

Checked on a production build: 30 rapid Googlebot requests to /law, 25
served and 5 refused with 429 and retry-after: 30; a phone browser 200;
robots.txt 200 for the bot; after 4 s the bot is served again.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-28 20:16:39 +01:00
CatoandClaude 3525ac1854 Reapply #618: place pages, home, /law and /budgets answer first (#641)
Measured on a local production build, one cold and five warm requests each,
#618 (49acf74) against the revert (0257e16):
  /                          7 ms vs 9 ms warm
  /places/switzerland       90 ms vs 100 ms
  /places/switzerland/zurich 80 ms vs 70 ms
  commune page              27 ms vs 23 ms
  /budgets                  41 ms vs 45 ms
  /law                      50 ms vs 53 ms
and the site recovered on its own at 18:36 UTC, before the revert deployed
(18:42). The outage was load, as this morning's, not this change.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-28 20:02:54 +01:00
CatoandClaude 0257e1691c Revert #618: Solon stops answering under load after it deployed (#640)
solon.orangecat.ch went unresponsive about 20 minutes after #618 went live
(17:46 UTC, healthy at deploy, unanswered from ~18:05). A forced redeploy at
18:19 was rolled back by the box health check (http=000), and the site
answers only now and then, after ~4 s: the process is saturated, not
crashed, as in this morning's outage. It was stable for seven hours before
#618. Reverting to restore the site; #618 comes back once the expensive part
is found.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-28 19:38:09 +01:00
CatoandClaude Opus 5.5 49acf74622 feat: place pages, home, /law and /budgets answer first and fold the reference (#618)
* feat(compare): answer each topic on one screen, fold the working away

George: the page scrolled sideways, ran ~9,300 px on a phone and read as
a wall of prose. Each topic is now its verdict, the scale drawn as a bar
with every place's numbered mark on its step, and one line per place. The
articles, their words and the enforcement reports fold underneath; tax,
single-place topics and sources fold too. A place's level is a native
menu instead of a sideways-scrolling row; suggestions wrap. Phone height
9,338 -> ~3,150 px, document width = viewport.

Adds the shared ui/Disclosure (same API as the statistics redesign's).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>

* feat(places): a place page answers in four numbers; the reference folds

A place page (country, commune, world region) now opens under its
photograph with the place in four numbers: laws in force, laws that took
effect in the past twelve months, official ways to change them, places
inside. Each is a link to the part that explains it, and opens it
(OpenOnHash: a link to a folded part's summary opens the <details>).

The three newest changes show, the rest one row away; the first group of
figures shows, the others fold; how the law is changed, the places
inside and the record are one row each (the shared ui/Disclosure, now
with an id on its summary). Switzerland 9,828 -> 6,135 px at 375 px,
Zürich 6,400 -> 5,001 px; no sideways scroll.

Home: the sixteen problem cards show the problem and open to the
answer, 19,775 -> 16,393 px; audience photographs are shorter on a
phone.

Stacked on feat/compare-glance (#615) for ui/Disclosure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(law, budgets): /law starts from search and the deepest places; /budgets is one chart

/law: the example searches are buttons. The places are tiles with their
act count and a chartkit Meter against the largest, deepest first.
Places with fewer than ten acts, and the cantons, states and communes
under a country, fold to one row each (ui/Disclosure). "Ask the law" is
a button. 5,435 -> 2,938 px at 375 px.

/budgets: one ranked chart. Each government's newest spending is a bar
in the reader's currency, with its largest function and balance under
it. BudgetIndexRow gains spendingAmount (null for a share of GDP or
without a rate for its year, so no bar misstates money); tested both
ways.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 18:42:04 +01:00
CatoandClaude c794c39c13 places: crawlers get the explorer's plain address (#639)
Every vote on every commune page links to the explorer with its own
columns, sort and marked commune: over 200,000 addresses, each drawing
all 2,115 communes. A crawler asking for one is redirected (301) to the
plain address; robots.txt disallows the variants; the links are nofollow.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-28 11:42:15 +01:00
CatoandClaude f7f1e9b812 places: commune ranks worked out once and shared, explorer series kept (#638)
Every commune page read all communes' figures (~100,000 rows) and ran the
checks on each to rank the commune, per page view. Since 09:15 UTC on
2026-11-28 the site stopped answering and three releases were rolled back
for not answering in time. Ranks are now built once per ten minutes and
shared (250 ms to 0.02 ms a page, same ranks), and the explorer keeps the
series it reads for ten minutes.


Claude-Session: https://claude.ai/code/session_019MDtmvTCDbJAYNKQpNyKzz

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-28 11:09:19 +01:00