Repository navigation
feat(components): a MoodPicker for the user-choices index block - #337
sydevs-bot wants to merge 21 commits into
Conversation
A `user-choices` block now renders the app's mood screen on the web: one round tile per featured mood that has a published meditation for the visitor's time of day, each a link straight to that meditation. The page adds no wording — the heading is the editor's own lexical content and each tile shows the mood's own localized title. The slot is resolved twice. The server reads the visitor's zone from Cloudflare, so nearly every visitor gets the right moods in the first paint and nothing moves; the browser re-reads its own zone after mount and swaps only where the two disagree. `useTimeOfDaySlot` answers `null` on the render that hydrates, which is what keeps the two from rendering different markup. The boundaries are the app's own — morning opens at 3am, not 5 — so a mood opens the same meditation on both surfaces. The slot meditations are read by id at `locale=all`, never at the page's locale: `filterMeditationsByLocale` answers `totalDocs: 0` to a `find` at any single non-English locale, so a page in any of the nine other launch languages would offer nothing. A slot whose meditation is a draft or gone is dropped with a bounded warning naming the mood and the slot, and a mood left with no slot is dropped with it, so no tile links nowhere. The icons are SahajCloud SVGs drawn in `currentColor`, so each is a CSS mask filled with the mood's colour rather than an `<img>`, which would render them black. A colour that is not a hex value falls back to the site teal. `ContentIndexBlockFields.type` now comes from the generated block instead of restating it, and the two new stored filter fields are declared, which is what `blocks.test.ts` asked for once the schema carried them. Refs #334 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXBkv8QoXfemTq8d1B
… path The slot is proven from both ends: `visitorTimeOfDay` reads a stubbed Cloudflare zone, where Sydney and London at one instant resolve to different slots, and a jsdom suite drives the after-mount swap through a stubbed browser zone — confirming the server's guess, replacing it, narrowing the full set, and leaving it standing where `Intl` will not answer. That stub has to be a `function`, not an arrow: `timeOfDaySlot` reads the hour through `new Intl.DateTimeFormat(zone, …)`, and an arrow is not constructible, so the `TypeError` landed in that function's own catch and read as an unusable zone. Every case passed for the wrong reason until the two zones were expected to differ. The axe gate's article fixture now carries a resolved `user-choices` block, because none of its targets held a content-index block at all — the gate passed over a page with no tiles in it. A second case pins the picker on the walked path, as the existing one does for the Dropdown atom, so a fixture that drifts fails rather than going quiet. `target-size` and `color-contrast` stay off by name there, so the 44×44 target and the focus ring remain the keyboard walk-through's to measure. Refs #334 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXBkv8QoXfemTq8d1B
An upload's `url` comes from SahajCloud and goes straight into the mood tile's `mask-image`. React escapes a `style` value for HTML only — `["'&<>]` — and the HTML parser hands the quote back to the CSS parser as a quote, so escaping is not what stops a `"` in that value from closing the CSS string and opening a declaration after it. A full-viewport overlay and an off-origin image fetch are both reachable that way, in our own origin. The quote can really get there: SahajCloud slugifies an upload's base name and re-attaches the extension verbatim, and Payload's own `getFileTypeIdentity` takes it verbatim too, so `"`, `;`, `(` and `)` survive into `filename` and into the virtual `url` built from it. It needs an admin manager — uploads are admin-only — and it executes no script, which is why this is a gate rather than an incident. `cssUrl` is the gate, beside the three `isSafe*` ones, because a scheme and a spelling are both how a URL is spelled. It refuses anything that is not http(s) and re-serialises through `new URL`, whose WHATWG parser percent-encodes `"` to `%22` and drops tabs and newlines — so the string cannot be terminated from inside it. A refused icon drops the icon, not the tile. `SplashLoader` joins this: it is the same sink fed the same way, from a Cloudflare Images URL built off a CMS id, and its `url()` was unquoted, which is the easier of the two to break out of. One line, and the helper this change adds is what it needed. Refs #334 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXBkv8QoXfemTq8d1B
…lds up `server/sahajcloud/AGENTS.md` said there was one locale-agnostic fact worth `locale=all`. There are two now: the meditation a mood names for a time of day, where `all` is the only spelling that answers at all — a single non-English locale comes back `totalDocs: 0`, and `locale=en` answers while silently dropping a localized slot. `server/CACHING.md` gains the fact the mood picker's slot depends on and the file did not state: nothing stamps a page response, so no colo keeps a copy, which is what makes a per-visitor render safe. Anything that adds HTML caching has to narrow that read first, or one visitor's time of day is served to the next. Refs #334 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXBkv8QoXfemTq8d1B
Gating `SplashLoader` turned out to break what it documents: its background may be a site-relative path, which an absolute-URL gate must refuse, and its own spec pins that. Percent-encoding a path that may already be encoded is how `%20` becomes `%2520`, so the gate stays strict and says so, rather than growing a looser branch for one caller. That atom's unquoted `url()` is left as it was. No page renders it — only the atoms barrel, its spec and its story reach it — so the sink is unreachable by a visitor, and the helper is there if it is ever wired up. Refs #334 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXBkv8QoXfemTq8d1B
…lpers
Two review passes found the resolver re-implementing four things the repo
already had, and one of them was costing a double Sentry report.
The meditation read is now `getPublishedMeditationIds` in
`server/sahajcloud/meditations.ts`, a typed collection read through the SDK
with a `MeditationsSelect`-checked select, where AGENTS.md says every read
belongs. The hand-built query string gave that up: a renamed field came back
absent, which reads as "no meditation for this slot" and silently drops a
tile, where the typed select makes it a compile error. It degrades through
`degrade` with `withRetry(..., { reportFailure: false })` — the pairing
`docs/rules/rest-api.md` names — because the hand-rolled try/catch let
`withRetry`'s own default fire a `captureException` at error level beside the
warning, billing two events for one outage at a level this class of gap must
not use. It answers `null` rather than an empty set, so a read failure drops
the picker once instead of warning per mood.
`refId` and `asText` replace local copies of themselves, and the block's
`select` is built from `SLOT_FIELDS` rather than a second list of the same
three field names — a slot missing from the select was invisible in exactly
the way the typed select now prevents.
`resolveContentIndexMoods` joins its two siblings in `content-index.ts`, so
the orchestrator's three branches read alike and the one-key `{ moods }`
wrapper is gone, along with a candidate shape that built a `ResolvedMood`
whose own doc comment said it could not exist.
Two silent failures reported, each with a test that fails without it:
- A featured mood with `timings` unfilled names no meditation at any hour. It
was dropped with no event at all — the one editor mistake that empties the
whole picker was the one case that reported nothing.
- An icon URL the CSS gate refuses. A delivery host left unset makes every
upload `url` relative, so outside production every circle drew empty with
nothing to say why.
The tile is a grid item again rather than `display: contents`, which has a
history of dropping an `li` out of the accessibility tree — and which jsdom
and axe both call fine, since neither computes CSS.
Refs #334
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjXBkv8QoXfemTq8d1B
The `locale=all` note credited `select[_status]` with preventing the dead link. A client read of a drafts-enabled collection is already filtered to published documents by the access config, and this repo sends no preview secret, so an unpublished meditation is simply absent from the answer. The select is the second line of defence, and the note now says which is which. Refs #334 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXBkv8QoXfemTq8d1B
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
|
Not fixable in this pass. The red step is the contract check, which aborts the job before lint, typecheck and unit run.
Nothing else is red. The lean gate passes on this branch as it stands: lint, Pushed nothing. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
wemeditate-web | 05fa79b | Commit Preview URL Branch Preview URL |
Nov 25 2026, 08:33 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
wemeditate-design | 05fa79b | Commit Preview URL Branch Preview URL |
Nov 25 2026, 08:33 PM |
Both sides appended a describe block to the end of lib/urls/urls.test.ts:
cssUrl here, encodeUrl on main. Both kept, in that order.
encodeUrl and cssUrl stay separate functions on purpose. encodeUrl is
idempotent and leaves reserved characters alone, because a sitemap <loc>
carries an upstream canonical this repo must pass through; cssUrl
re-serialises through new URL so a quote cannot close url("…"). Neither
can do the other's job.
The contract-check failure on this head is unrelated to the conflict and
survives the merge: the hand-copied user-choices delta in
types/payload/payload-types.ts is still ahead of SahajCloud main, as the
PR body states. sydevs/SahajCloud#1259 merges first.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjXxR21yDq1bUHMW4eN
|
Merged The two helpers stay separate on purpose. Lean gate green on the merge: lint, Prettier, The 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
Right shape for #334 — resolver, organism, wiring, the server/browser slot split it specifies, no new dependency — and the widened ContentIndexBlock['type'] is guarded at every consumer. Two things cut against it: the generated types carry three deltas unrelated to this ticket under a body line saying nothing else drifted, and it is heavy in indirection and prose — a cache, a resolver hop, a one-caller hook in its own file, one fact in three places.
Findings, each on an inline thread.
blockerpayload-types.ts:1080— the delta is not the one the body describes.should-fixblocks.ts:78— extend the generated block.should-fixMoodPicker.tsx:68— the ⚠ and #334 disagree on the CORS rule.should-fixuseTimeOfDaySlot.ts:16— fold the one-caller hook in.should-fixtime-of-day.ts:65— drop the formatter cache.should-fixcontent-index.ts:249— fold the resolver hop.should-fixsahajcloud/AGENTS.md:113— prose restates its JSDoc.should-fixCACHING.md:32— cut to the ⚠ and a pointer.should-fixurls.ts:97— trim a 28-line JSDoc.consideruser-choices.ts:21— type the slot map againstkeyof UserChoice.
What was checked. #334 and the outline, hunk by hunk — accurate. Read whole on the branch: the five server files, the three lib files, both components, both docs, the a11y fixture. Ladder beyond new-pieces.mjs: no dependency, the new QUERY_BY_TYPE entry reuses SLOT_FIELDS, no round-tile or mask helper to reuse. Streamliner: 37 pieces and a whole file, 32 kept, 7 findings, all checked. Every fields.type comparison: user-choices branches before contentIndexCard and resolvedItems. payload-types.ts diffed against origin/main — no consumer. No preview URL in the body, no fixture in .claude/workflow.json. No question threads.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
`Record<TimeOfDay, string>` accepted any field name. An upstream rename, or a field left out of the select, comes back `undefined`, which reads as "no meditation for this slot" and drops the tile with no event at all — `content-index.ts` warns about exactly that in a comment the compiler could not enforce. `satisfies Record<TimeOfDay, keyof UserChoice>` makes it a build failure instead. Refs #334 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjX2t7feivHHdYPZx9s
`resolveContentIndexMoods` was a single-purpose hop with one caller and no test of its own, unlike `resolveContentIndexItems` and `resolveContentIndexTracks`, which the spec calls directly. Every user-choices case already goes through `resolveContentIndexBlocks`. Refs #334 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjX2t7feivHHdYPZx9s
The slot resolves once per render and once after mount, so the map was machinery against a cost nobody measured — and most of its twenty lines was the JSDoc arguing that cost. Building the formatter inside the existing `try` keeps the same hour and sends the same `RangeError` to the same `catch`, and drops the module-level state a stubbed `Intl.DateTimeFormat` could outlive. Refs #334 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjX2t7feivHHdYPZx9s
`useTimeOfDaySlot` and `browserTimeZone` had one caller each, inside this folder, yet the barrel published both. The hook now sits beside the component that uses it, with the same `null` first render and the same eslint-disable, and the barrel publishes only what another module can reach. Counter-precedent for a hook in its own file: `MeditationPlayer/useCircularProgress.ts`. Refs #334 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjX2t7feivHHdYPZx9s
`ContentIndexBlockFields` restated all eight stored fields, which is what the `shortcut:` marker above it was waiting to discharge. Extending `Omit<ContentIndexBlock, 'id' | 'blockName' | 'blockType'>` is type-identical — `blocks.test.ts` asserted exactly that equality — and leaves the generated type as the one source for a field or a `type` added upstream. The guard goes with it: it now compares the interface against its own base. Refs #334 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjX2t7feivHHdYPZx9s
Both ⚠ claims and the SahajCloud reason a `"` reaches an upload `url` stay — that is the gotcha. The WHATWG percent-encoding walk-through goes, because the `new URL` call shows it, and so does the closing paragraph on where the helper lives, which restates AGENTS.md's rule that URL spelling lives in this module. Refs #334 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjX2t7feivHHdYPZx9s
The `filterMeditationsByLocale` story, the `totalDocs: 0` answer, the `locale=en` trap and the access-config note all sit in `getPublishedMeditationIds`' own ⚠ JSDoc. Prose never restates code, so the `locale=all` section names the read and the one fact that sends a reader to it. `MEDITATION_STATUS_SELECT` loses the same duplicated clause. Refs #334 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjX2t7feivHHdYPZx9s
The `cache-headers.ts` inventory is mechanism, and the rule above it already says Cloudflare bypasses what the app does not stamp. The closing sentence on the first paint is in `visitorTimeOfDay`'s own JSDoc. What is left is the ⚠ and the pointer to the read that depends on it. Refs #334 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjX2t7feivHHdYPZx9s
#334's *Interfaces* records the rule on `assets.sydevelopers.com` going live for production, every preview and localhost on 2026-11-24. The ⚠ still said the circles draw empty until it does, which reads as a live blocker. What remains is the standing hazard: a host that stops answering cross-origin draws them empty with nothing in the markup to show why. Refs #334 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjX2t7feivHHdYPZx9s
The URL-spelling rule listed an `href` and `window.location` as the destinations a gate stands in front of, and `isSafe*` as the gate names. This branch adds a third destination and a gate that is neither — `cssUrl` also re-serialises, because a scheme check cannot see a quote closing the CSS string. Refs #334 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjX2t7feivHHdYPZx9s
The gate claimed re-serialising through `new URL` is what stops a `"` closing
`url("…")`. That holds for the path, query and fragment, and not for the
authority: `"` is not a forbidden domain code point, so
`https://h");z-index:0/**/;background-image:url(…);a:b/*` round-trips intact —
the host supplies the quote, the port the `:`, the path the rest.
Only the configured delivery host can put a quote there, never an editor, so
this is the gate matching its own claim rather than a reachable sink. The check
reads the serialised string, because that is where the remaining quote is, and
nothing legitimate carries one by then.
Refs #334
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjX2t7feivHHdYPZx9s
|
Ten critic threads, nine adopted and one rebutted. Each thread carries its reply and SHA. Pushed dac2fef. Adopted, one commit each: extend the generated block, discharging the Rebutted, the Found while trimming that JSDoc: Lean gate green: 1853 tests in 176 files, plus the build. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
#342 landed the same two files from the other side: it re-synced the copied payload types and, with no resolver for the new `user-choices` index type, added a stopgap that emptied the block. `types/payload/payload-types.ts` takes main's copy whole. It is the newer `pnpm types:cms` output — SahajCloud #1268 against this branch's #1259 — and carries every field this branch reads, so re-running the command here would only reproduce it. `server/content-index.ts` keeps this branch's resolver and drops main's stopgap. The two cannot both stand: the early return in `fetchContentIndexDocs` empties the read the mood resolver is built on, and `Exclude<…, 'user-choices'>` on `QUERY_BY_TYPE` refuses the entry that performs it. The stopgap's own limit — an empty index until a user choice renders — is what this branch lifts: a mood tile resolves to a meditation href, never to a card through `contentIndexCard`, so nothing drops. `lib/content/blocks.ts` keeps this branch's `interface … extends Omit<…>`. Both sides derived `ContentIndexBlockFields` from the generated block in the same commit window; only the spelling differed, and this one holds `ResolvedMood` and the two `resolved*` fields the picker attaches. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYj4chcqF9CeraaTYq
|
Merged
Lean gate green on the merge: lint, Prettier, 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Summary
user-choicesblock renders the app's mood screen on the web: one round tile per featured mood with a published meditation for the visitor's time of day, each linking straight to it. The page adds no wording of its own.url():cssUrlinlib/urls/urls.tsgates it, beside the threeisSafe*gates."through in the authority, whichnew URLdoes not encode. It now refuses one.Change outline
Flow — a
user-choicesblock, from the editor's page to the tilesresolveContentIndexBlocks(content, { locale }) server/content-index.ts per content-index block, by type songs → resolveContentIndexTracks pages/… → resolveContentIndexItems + user-choices + fetchContentIndexDocs # the block's own endpoint + + select title/type/isFeatured/url/filename/color + SLOT_FIELDS, depth=0 + + the page's locale — the titles are localized + moodsFromChoices(docs) server/user-choices.ts + keep type === 'mood' && isFeatured # else warn once, drop + refs: the three slot relationships, by id + none at all → warn once, drop + iconUrl: cssUrl(doc.url) # refused → warn once, keep the tile + color: hex only # else null → the site teal + getPublishedMeditationIds(ids) server/sahajcloud/meditations.ts + locale: 'all', select MEDITATION_STATUS_SELECT, one read for every slot + failure → null → drop the picker, reported once + per slot: published? → documentHref('meditations', { id }) + else → warn once, drop that slot + no slot left → drop the mood + resolvedSlot = visitorTimeOfDay() # cf.timezone, this read onlyComponents — the tile, and who decides the slot
The slot is resolved twice on purpose. The server reads the visitor's zone from Cloudflare, so nearly every visitor gets the right moods in the first paint and nothing moves; the browser re-reads its own zone after mount and swaps only where the two disagree.
useTimeOfDaySlotanswersnullon the render that hydrates, which is what keeps the two from rendering different markup.Types
Preview
Both aliases are read off the Cloudflare bot's comments, never derived from the branch name. Two previews build for this diff (it touches
components/andlib/):Test results
tsc --noEmit, full Vitest suite — 1853 tests in 176 filescomponents/organisms/MoodPicker(20, including a jsdom file for the after-mount swap),server/content-index.test.ts(27),lib/time-of-day.test.ts(19),lib/urls/urls.test.ts(66),components/organisms/RichText,tests/a11y/page-types.test.tsx(17),tests/guards/pnpm buildManual verification
assets.sydevelopers.comhas to answer a cross-origin request for them; feat(components): a MoodPicker for the user-choices index block #334's Interfaces records that rule going live for production, every preview and localhost on 2026-11-24. Confirm a circle draws filled on the web preview. The Ladle story uses inline data URLs, so it shows the real colour and hover behaviour regardless.target-sizeandcolor-contrastare off by name in that gate. Each tile draws at about 168×100px, well over 44×44, and carriesfocus-ring— but measuring a hit area and seeing an outline needs a drawn page, which isdocs/accessibility-walkthrough.md's job.Australia/Sydneyat 09:00 local, the morning moods show; set toEurope/Londonat the same instant, the evening ones. Both are asserted inlib/time-of-day.test.tsandserver/content-index.test.ts, but the override is what proves the browser half end to end.Notes for reviewer
This is the consumer half of a two-PR set for #272, and the producer, sydevs/SahajCloud#1259, merged at 19:15Z on 2026-11-25.
types/payload/payload-types.tsis no longer a hand-copy: it ispnpm types:cms's own byte-for-byte output from SahajCloudmain, re-run and verified on this head. So it also carries three additions this ticket did not ask for —Page.parent,Page.pathandWmWebConfig.indexPages, each with its*Selectentry — which the copy had been holding back and which no consumer here reads yet. Reverting them would make the committed copy differ from the command's output, which is what the contract check compares.It shares
server/content-index.tswith #291 (PR #293, cut back to themeditationstype's language fix). Whichever merges second rebases onto the other. This PR does not addwithRetrytofetchContentIndexDocs— that is #291's line, and it is still the one read missing it (#128).display: contentscame off the list item. It had made theLinkthe grid item, but it has a history of dropping anliout of the accessibility tree, and neither jsdom nor axe can see that — neither computes CSS. Theliis the grid item now.Reviewed in three passes, and what each changed.
/code-reviewwas not run as such; the branch went through the built-in/security-reviewplus two agents, one on reuse and simplification, one on correctness and silent failures. Nopr-review-toolkithere (ListPluginshas none).stylevalue for HTML only, and the HTML parser hands a"back to the CSS parser as a quote — so a"in an upload'surlclosesurl("…")and opens a declaration after it, in our origin. It can get there: SahajCloud slugifies an upload's base name and re-attaches the extension verbatim, and Payload's owngetFileTypeIdentitydoes too. Needs an admin manager, and runs no script, so a gate rather than an incident.cssUrlrefuses a non-http(s) scheme, re-serialises throughnew URL, and refuses any quote still standing after that.timingsunfilled names no meditation at any hour; it was dropped with no event at all — the one editor mistake that empties the whole picker was the one case that reported nothing. Now warned, with a test that fails without it.cssUrlrefuses a relative URL, andCLOUDFLARE_R2_DELIVERY_URLis unset outside production, so every uploadurlis relative there — every circle would have drawn empty with nothing to say why. Now warned, with its own test.server/user-choices.ts; it is now a typed SDK read inserver/sahajcloud/meditations.ts, where AGENTS.md says reads belong, with aMeditationsSelect-checked select — a renamed field was coming back absent, which reads as "no meditation for this slot" and drops a tile silently. The hand-rolled try/catch also letwithRetry's default fire acaptureExceptionat error level beside the warning: two events for one outage, at a level that class of gap must not use. It goes throughdegradenow.Dismissed, with reasons.
ChoiceTile, which the ticket pins; the reviewer who found it said the claim needed a drawn page, and a comment was the cheaper outcome. It has one.Europe/Londoncase fromvisitorTimeOfDay's spec as duplicatinglib/time-of-day.test.ts. It does, but feat(components): a MoodPicker for the user-choices index block #334's verification checklist asks for Sydney and London at one instant in that file by name.SplashLoader's unquotedurl()with the same helper. Tried, and reverted: its background may be a site-relative path, which an absolute-URL gate must refuse, and its own spec pins that. No page renders that atom — only the barrel, its spec and its story reach it — so the sink is unreachable by a visitor. The helper is there if it is ever wired up. Percent-encoding a path that may already be encoded is how%20becomes%2520, so the gate stayed strict and says so.Docs:
server/sahajcloud/AGENTS.mdrecords the secondlocale=allread and corrects which mechanism keeps a draft out of the answer (the access config, not the select).server/CACHING.mdgains the fact the slot depends on and the file did not state — nothing stamps a page response, so no colo keeps a copy, which is what makes a per-visitor render safe. The rootAGENTS.mdnames the CSSurl()gate beside theisSafe*ones.Detail
Why
locale: 'all'and not the page's locale.filterMeditationsByLocalefilters everyfindtoreq.locale, so?locale=fr&where[id][in]=…answerstotalDocs: 0and the picker would render empty in nine of the ten launch languages.locale=enanswers, but drops a localized slot — a French mood may name a French meditation.allis the only spelling that serves both, andmeditationsreturns_statusas a plain string there rather than a per-locale map, whichpageswould not.Why the server guesses at all. Resolving on the browser alone leaves the first paint showing whatever hour the Worker's UTC clock is in, and then moving. Reading Cloudflare's zone server-side renders the right moods immediately for nearly every visitor, and the browser corrects the rest after mount. Page HTML is not edge-cached, which is what makes a per-visitor render safe;
server/CACHING.mdnow says so, and says what would have to change first if HTML caching is ever added.The axe gate was passing over a page with no tiles. None of its targets carried a resolved
content-indexblock at all, so the picker was never rendered by it. The article fixture carries one now, and a second case pins the picker on the walked path — as the existing one does for theDropdownatom — so a fixture that drifts fails rather than going quiet.One test stub was passing for the wrong reason. The jsdom suite stubs
Intl.DateTimeFormatto report a chosen zone. As an arrow function it is not constructible, sotimeOfDaySlot's ownnew Intl.DateTimeFormat(zone, …)threw, theTypeErrorlanded in that function's catch, and every case read as "unusable zone" — which happened to match the expectation. It is afunctionnow, and the two zones are expected to differ, which is what catches this.Why the quote survives in a host.
"is not a forbidden domain code point, sonew URL('https://h");z-index:0/**/;background-image:url(…);a:b/*')round-trips intact — the host supplies the quote, the port the:, the path the rest of a declaration. Only the configured delivery host could put one there, never an editor, so this was the gate matching its own claim rather than a reachable sink. The check reads the serialised string, which is where the remaining quote is.Night folds into evening. The upstream choices define a night slot and leave it empty on all 14 featured moods, so hours 0–2 resolve to evening.
nightMeditationis selected by nobody here.Closes #334