Serve the picks from the API, so the live picker reads them #9

Merged
mesh-tools merged 2 commits from fix/picker-reads-picks into master 2026-11-30 09:25:39 +00:00
2 Commits
Author SHA1 Message Date
jschoubben 250828710c Serve the picks from the API, so the live picker reads them
The picker read circuits/photos.json and seasons/photos.json relative to
itself. The API serves only /examples/, so the live page showed two HTTP
404 errors and a "Load it from disk" box for each.

The API now serves both picks files, read-only, at /picks/circuits.json
and /picks/seasons.json. Each answer is the file as the poster service
has it loaded, from the same loader it draws from: the notes first, then
the entries, a refused entry left out. The root route lists both routes.

The picker reads them from the API its site picks. Only a page opened
from a working copy (file:, or a loopback host) falls back to the
repository's files. A failure names each address and why.

Builds: docs/posters.md, Picking photos, as written in 780984064f (the lead's lines 1-4 of 2026-11-30 and answers Q1, Q2)

Claude-Session: https://claude.ai/code/session_01JG73KFhbaNj3tyJ8tKmE3W
2026-11-30 10:18:16 +01:00
jschoubben 780984064f Write the lead's lines and answers for the picks routes into the design
The operator's symptom of 2026-11-30: the live picker showed two HTTP 404
errors, one for circuits/photos.json and one for seasons/photos.json,
each with a "Load it from disk" box. The page read the picks relative to
itself, and the API serves only /examples/.

These are the lead's lines and answers of 2026-11-30, written into
Picking photos. The API serves both picks files, read-only, as the poster
service has them loaded, at /picks/circuits.json and /picks/seasons.json:
the notes first, then the entries it draws from, a refused entry left out.
Both routes have the CORS of every route and, like the other JSON routes,
no Cache-Control (answer Q1). The picker reads them from the API base and
falls back to the repository's files only on file: or a loopback host:
localhost, 127.0.0.1, [::1] (answer Q2).

Claude-Session: https://claude.ai/code/session_01JG73KFhbaNj3tyJ8tKmE3W
2026-11-30 10:18:11 +01:00