A url link now opens in the app instead of the browser. The server fetches
the page (robots.txt honoured, public addresses only, size and time caps),
keeps a snapshot on disk until it is reloaded, and cuts it into a lead and
sections: by its headings, else by pseudo-headings, else in chunks, or by a
model when asked (s), within a daily budget. The pane has its own amber
ground, the author and date in its head when the page gives them, and the
source in its foot. W opens the original, R reads it again. See
docs/pages.md.
Pictures and videos are kept, in web pages and in Wikipedia articles:
pictures through the server (only addresses seen in a page that was read),
videos as a still that loads the player on a click.
A section that is only a link (a target, no text, no sections) opens as
its article at once, and L opens a target to the right of the node's own
pane, never under it.
Article text is sized to read like the reader's own.
Panes: a pane that already has all its column can give beside the others'
tabs no longer peeks over them on hover, and the curves of tabs under a
peeking pane are no longer drawn over it. The keypress timing test judges
each of its two passes on its own, so a stall from outside the app does
not fail it.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yB6q4BHMwptTX3YFtkRab
The findings and decisions behind server/wiki.ts, server/embed.ts and server/links/ (the model
reviewer that judges what the scanner finds is §9). Sources
were read on 14 November 2026. The Wikimedia rate limits are new this year and its own page calls
them "subject to experimentation and change", so check the links again before relying on the
numbers.
1. What an unauthenticated client may do
Rate limits.Wikimedia APIs/Rate limits
(last edited 8 Nov 2026). The limits apply per user across the Action API and the REST APIs:
Client
Requests per minute
Unidentified ("no identifying traits beyond IP address")
10
Unauthenticated browser requests
200
Unauthenticated bots with a compliant User-Agent
200
Authenticated, new account or few edits
200
Authenticated, established editor
2000
Bot-flagged accounts, Toolforge with compliant UA, granted exemptions
exempt (robot policy still applies)
The same page says to "limit concurrency to 3 or fewer requests" and to "respect the Retry-After
header on 429 responses". 429 and 503 "typically include Retry-After"; without one, "wait at least
five seconds or use exponential back-off". It mentions no headers that report remaining quota,
and the live responses had none. The limits are not split by endpoint family: one budget covers
the Action API and REST together. The changelog
dates the rollout: Phase 1 enforcement from 12 Mar 2026, Phase 2 for identified requests from the
week of 28 Apr 2026, and the API Portal (api.wikimedia.org) sunset in June 2026.
The User-Agent is parsed by machine, and the contact in it decides the tier.User-Agent policy
(edited 27 Mar 2026): a client should identify itself "in a way that isn't going to be confused
with many other bots, and supplying some way of contacting you, the operator". The format is
<client name>/<version> (<contact information>) <library>/<version>, and the contact is "an
email address, a website, or a wiki user", e.g. (wikipedia:de; User:DuesenBot). On the
rate-limit talk page WMF staff
explain how it is enforced. A contact the gateway did not recognise "dropped you to the lowest rate
limit tier". The contact must match "the regex used for extracting the contact info", which reads
the parenthesised part as a semicolon-separated list with no spaces inside an element, and only
the last element is used (15 Apr 2026). A client that sent (wikipedia:en User:Name) without the
semicolon was throttled after about 500 requests; with the semicolon it ran 2,500 requests at 1/s
without a 429. Browser requests are limited by IP or user id, "not based on the user agent at all".
Consequence for this app. The privacy rule (no name, email or host in the UA) and the policy pull
in opposite directions. With no contact, the default UA Explicata/0.1 (personal knowledge tool)
should be expected to fall in the 10/min "unidentified" tier. I did not provoke a 429 to check
this. The client therefore spaces requests 6.5 s apart when there is no contact. If the owner sets
EX_WIKI_CONTACT to an email address, an https:// URL or User:Name, the UA becomes
Explicata/0.1 (<contact>) and the spacing drops to 1 s, a third of the 200/min budget. The
policy does expect a contact. A throwaway address or a wiki user page is enough, and either keeps
the owner's real identity out of the UA.
maxlag.Manual:Maxlag parameter:
maxlag=5 is the recommended value on Wikimedia wikis. It applies to any api.php request:
"Interactive tasks … may omit it. Noninteractive tasks should always use it." A lag error comes
back as HTTP 200 with error.code = "maxlag" and a Retry-After header. The client sends it on
bulk work only.
Serial requests and batching.API:Etiquette
(edited 13 May 2026) asks for requests "in series rather than in parallel", says "there is no hard
speed limit on read requests", and recommends Accept-Encoding: gzip, the pipe (titles=A|B|C)
"whenever possible", and caching.
Pictures (upload.wikimedia.org). Since articles keep their pictures (§3), the server also
reads thumbnails from upload.wikimedia.org, through /api/wiki/media: only addresses an article
it served shows, and only those the reader's browser asks for (they load lazily, as they scroll
into view). These go through a fetcher of their own (server/pageFetch.ts), not the API queue:
the same User-Agent as the API requests (with the contact when EX_WIKI_CONTACT is set), at most
two at a time, starts 250 ms apart with a contact and 1 s without, no redirects
followed off the host, 15 s and 10 MB per picture, and after a 429 or 503 nothing more to that host
for its Retry-After (else 10 s; a wait longer than a read may take is answered at once with
"asked for fewer requests"). robots.txt is not read for it: Wikimedia's own policies govern it.
The renditions asked for are only those the article's HTML lists (src, and srcset up to 2x:
a 250 px thumbnail's 500 px one), never a size constructed by the app and never a large
original. Not checked against Wikimedia's current policy, and to be rechecked before relying on
it: whether upload.wikimedia.org counts these requests against the API budget above or has
limits of its own, whether the 2025–26 changes to which thumbnail sizes are served still include
every size an article's srcset names, whether the concurrency and spacing chosen here are within
what the robot policy asks for media, and whether a larger standard size (such as 960 px) could be
asked for instead of the 2x rendition. Nothing was fetched from Wikimedia to check.
Authentication only raises a new account to the same 200/min a compliant UA already gets (the
2000/min tier needs an established editor account), and Wikimedia Enterprise is overkill for one
user, so neither is used.
2. Endpoints used, and why
Need
Request
Notes
Batch title check
GET /w/api.php?action=query&format=json&formatversion=2&redirects=1&prop=pageprops|description&ppprop=disambiguation&titles=A|B|…
"limited to 50 titles per query, or 500 for those with the apihighlimits right" (API:Query). The answer has normalized, redirects (with tofragment), and pages with missing/invalid. A disambiguation page carries pageprops.disambiguation. The short description is in description. Pages are not returned in request order, so inputs are mapped back through normalized → redirects.
Senses of a disambiguation page
same, with generator=links&gplnamespace=0&gpllimit=max on the one title
One request gives every linked article with its description. "Set" returned 73.
Title autocomplete
GET /w/rest.php/v1/search/title?q=…&limit=…
Documented for this: "a typeahead search that automatically suggests relevant pages by title" (REST reference). Returns title, description and thumbnail, limit 1–100. action=opensearch returns empty descriptions on Wikimedia wikis (API:Opensearch). list=prefixsearch gives titles only. The completion index is "updated once a day" (Help:CirrusSearch).
Preview
GET /api/rest_v1/page/summary/{title}?redirect=true
Extract, description, thumbnail, revision, type: "disambiguation". Edge-cached (s-maxage=1209600), so it is cheap for Wikimedia. rest_v1 is RESTBase, which is being retired: there is no date for page/summary (RESTBase/deprecation). The client falls back to prop=extracts|pageimages|description|info if it disappears.
Article by section
GET /w/api.php?action=parse&page=…&redirects=1&prop=text|tocdata|revid|displaytitle|properties&disableeditsection=1&disablelimitreport=1&disabletoc=1
One request for the whole page (Octopus: 480 KB raw, 69 KB after sanitising), split on the server at div.mw-heading boundaries and cached for 7 days. A section then costs nothing. prop=sections now warns "deprecated … use prop=tocdata". With section=N, both come back empty, so the section list cannot be had alongside one section's text. REST /page/{title}/html (Parsoid, with <section> wrappers) also works; the splitter flattens either.
Two route parameters (server/wikiRoutes.ts) shape the answers for the UI. article?full=1
returns every section's sanitised HTML along with the section list and the disambiguation
flag (read from prop=properties), so a whole article costs the browser one request and the
server at most one. summary?cached=1 answers from the server's cache only, fresh or expired,
and never waits on Wikipedia: 404 reason: "uncached" when nothing is cached. The UI uses it to
put a summary in a model prompt without delaying the prompt.
What gets stripped (seen in real output): inline <style> (TemplateStyles), sup.reference
markers, the reference list, COinS spans (Z3988), navboxes, infoboxes, sidebars, hatnotes,
clade tables, the hidden short description, edit links, maintenance boxes and noprint. Pictures
are kept as figures since November 2026 (§3), loaded through the app's own route, never by the
browser from upload.wikimedia.org. MathML is kept, because the parser now emits native MathML and
browsers render it.
Services not used. The Link Recommendation API ("Add a link") takes an existing article, not
arbitrary text, and is scheduled for deprecation from July 2026; its underlying idea (anchor
dictionary and link probability) is the right one, see §4. CirrusSearch's semantic search is an
internal, undocumented path. The Wikidata Embedding Project searches Wikidata items, is in alpha,
and would send node text off the machine. wbsearchentities adds nothing over search/title.
3. Licence and attribution
Article text is CC BY-SA 4.0 (and GFDL where applicable)
(Reusing Wikipedia content).
When text is shown in the app it must carry:
Credit: "a hyperlink or URL to the page(s) being reused" is acceptable. The client gives the
article URL and a permanent link to the revision shown (oldid).
Modifications: one "must indicate in a reasonable fashion that the original work has been
modified". We remove references, boxes and edit links, so article() returns
attribution.modified and an attribution.text that says so: "Adapted: references, navigation
boxes, infoboxes and edit links removed; each picture is credited on its own file page (click
it)."
Share-alike applies to modified article text that is redistributed. If a node quotes or adapts
article text and that text is exported or shared, that part is CC BY-SA. Linking to an
article and writing your own prose about it is not affected.
Images each have their own licence and need their own credit. They were dropped for that
reason until November 2026. That decision is reversed (the owner's): pictures sometimes
carry the most important information in an article (a diagram, a map, the thing itself), and
dropping them loses it. Each picture is credited as Wikipedia itself credits it: by a link to
its File page, where its author, source and licence are. Clicking a picture opens that page in
a new tab (its data-full); a video has a "File page: author and licence ↗" link under it. A
picture with no File page to link to is not shown.
The UI must show attribution.text, with its links, next to every pane of article text, and next
to summary extracts too.
What is kept, and how (server/wikiHtml.ts). Thumbnails (<figure typeof="mw:File/…">, and
old-style div.thumb), each picture of a multiple-image block (div.tsingle), and each box of a
gallery (ul.gallery, its caption a paragraph) become `
…`, the caption with its links. The infobox is still dropped, but its main picture (the
one in its `infobox-image` cell, else its first picture worth keeping) is lifted to the top of
the lead with its `infobox-caption`. Not kept: pictures declared under 50 px wide or tall (icons,
flags, buttons), those marked `noviewer`, `flagicon` and the like, pictures inline in a sentence
or a table cell (a figure may not sit inside a paragraph), anything inside a box that is dropped
(navboxes, maintenance boxes, sidebars), any address not on upload.wikimedia.org, and sound
files. The rendition is the largest of `src` and its `srcset` up to 2x. The File page is the
`a.mw-file-description` (or old `a.image`) link, made absolute on the article's own wiki. A
`