Skip to content

feat(server): switch wemeditate.com over to the new site - #288

Open
sydevs-bot wants to merge 20 commits into
mainfrom
claude/feat-280-cutover
Open

sydevs-bot wants to merge 20 commits into
mainfrom
claude/feat-280-cutover

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Change outline

Behaviour — the Pages data hook

A locale a page has no translation in renders 404 today. It now falls back to the English URL. No second SahajCloud read: status is already in the hook's Promise.all.

 data(pageContext)                                        pages/[slug]/+data.ts
   Promise.all[ site, getPageBySlug(locale), getPageLocaleStatus ]
   slug collides with settings.homePage.slug → 302 localePath(locale, '/')
   !page
+    not previewing, locale ≠ en, advertisedLocales(status, offered) has en
+      → 302 localeHref(en, `/${slug}${searchOriginal}`)
+                                            # `index` normalizes to `/`, and
+                                            # the search rides along (#276's
+                                            # 301 keeps it, and may chain here)
     → render(404)

Four ways it deliberately does not fire, each a test:

locale === 'en'                   → 404 stands   # nothing to fall back to, and /about → /about
status read failed, so `{}`       → 404 stands   # nothing known, nothing claimed
en published but not offered      → 404 stands   # site-context would 404 the target too
a live-preview session is open    → 404 stands   # moving an editor to /about ends the session

Contract — the links a visitor can click

Five rendered hrefs pointed at the old Rails site's slugs. All five measured 404 on the preview Worker, and every target measured 200 except /app, which has no page in SahajCloud yet.

 components/organisms/DiscoverMeditation
-  /meditations  /live  /classes
+  /meditate-now  /live-meditations  /classes-near-me

 components/organisms/MeditationPlayer        # rendered only by the embed route
-  https://wemeditate.com/meditations   external
-  https://wemeditate.com/app           external
+  /meditate-now    external locale=en   # pinned: the embed fetches no settings
+  /app             external locale=en   # shortcut: 404s until the page exists

external stays on both, which departs from one acceptance criterion — see the question thread on the diff.

locale={DEFAULT_LOCALE} on both, which the ticket does not ask for. The embed route fetches no
settings, so it renders under any KNOWN_LOCALES code, and server/site-context.ts 404s a prefix
outside availableLocales before the page is read. availableLocales is ["en"] today, so a
visitor-locale prefix would make these two links dead on every non-English embed. Cost: a
translated embed points at the English page.

Contract — the deploy

 wrangler.toml
   name, compatibility_date, compatibility_flags, main
+  [[routes]] pattern = "wemeditate.com", custom_domain = true
   [vars]
 .env.production
+  PUBLIC__TURNSTILE_SITE_KEY   # SahajCloud's own pair; unset, every submission is captcha_failed

Files — three comments the ticket calls out as wrong

 pages/[slug]/+route.ts     # claimed a `pages/[locale]/[slug]` route that has never existed
 layouts/useSiteNav.ts      # claimed the dropdown and the hreflang cluster cannot disagree
                            # (#283 moved the derivation there)
 AGENTS.md                  # named only the design Worker's custom domain

Preview

https://claude-feat-280-cutover-wemeditate-web.contact-c66.workers.dev — / and /meditate-now
both 200 on it.

Worth opening:

  • /meditations/142/embed — the upsell line's link, now /meditate-now, opening in a new tab
  • any page with a contact form — grep -c '0x4AAAAAAEFpp8n3BBZfG0KF' on it should print at least 1, and a submission should no longer come back captcha_failed

⚠ Two of this branch's changes cannot be seen on a preview at all.

  • The untranslated-page 302. SahajCloud serves availableLocales: ["en"] (re-read live), so server/site-context.ts 404s every non-English prefix before the page is read — /it/techniques and /fr/techniques both measured 404 for that reason, not this one. The tests are the only evidence until The player and site speak every visitor's language #163 publishes the launch locales.
  • The DiscoverMeditation links. See the notes — nothing renders that organism yet.

Test results

  • Lean gate: ✓ lint + tsc --noEmit + vitest run — 126 files, 1203 tests, on main merged in
  • Targeted specs: ✓ pages/[slug]/data.test.ts (9 new cases), pages/[slug]/route.test.ts, layouts/LayoutChrome.test.tsx, components/organisms/DiscoverMeditation, components/organisms/MeditationPlayer, pages/meditations/[id]/embed/Page.test.tsx
  • Build: ✓ pnpm build, then wrangler deploy --dry-run — 3165.83 KiB / gzip 783.21 KiB
  • Security review: ran twice, because the diff touches wrangler.toml and .env.production. No
    findings. The second pass traced the request query string into the 302's Location: slugSchema
    admits no /, ., : or %, searchOriginal is null or starts with ? and carries no #,
    and localeHref reattaches it after the path, so the value always begins / + [a-z0-9] and the
    scheme and host are never reachable.

Every new case was watched failing first. Reverting the redirect fails the three positive cases; loosening its condition to locale !== DEFAULT_LOCALE alone fails the three status guards; dropping !preview.active fails the preview case.

Manual verification

  1. Before this merges — the apex binding needs all of: feat(server): legacy redirect map and lookup for the wemeditate.com cutover #276 (the legacy redirect map), chore(analytics): ship the Fathom tag, and clear both placeholders #103 (the analytics tag, already on main), wemeditate.com added to the Turnstile widget's hostname allowlist in the Cloudflare dashboard, and The player and site speak every visitor's language #163's launch locales. This list lives here only: the wrangler.toml comment keeps the deploy mechanism and no longer restates the ordering, which would read as history a day after cutover.
  2. Create a page slugged app in SahajCloud. The player's second upsell link points at /app, which 404s until that page exists; Switch wemeditate.com over to the new site #160's "Not included" allows exactly this page, and the slug is fixed, so do not substitute another.
  3. Immediately after the switch: curl -s https://wemeditate.com/robots.txt should print Allow: / and a Sitemap: line; /sitemap.xml should be a non-empty <urlset>; /techniques's canonical should name wemeditate.com; and PREVIEW_URL=https://wemeditate.com pnpm test:smoke should pass. All three are host-derived and correct themselves at cutover — measured on the preview today as Disallow: /, an empty <urlset>, and a workers.dev canonical.

Notes for reviewer

Two of the ticket's nine parts are not in this branch, because they are already open. Neither was rebuilt: a second copy would conflict with the PR that has it and win nothing.

Ticket part Where it is
1 — the 404-path redirect layer and its map #276, approved and mergeable. Its core.ts carries the pt-br → pt-BR respelling, sitemap.xml.gz, the section walk-up and the unsupported-locale fallback.
6 — the two missing usePageHead calls #284. It adds them to each (full) route's own +Page.tsx, not to the shared templates, as the ticket requires. Both routes still serve <title>We Meditate</title> on the preview, so part 6 is unmet until #284 merges.

Merge order: #276 and #284 before this one. #282 and #284 also touch pages/[slug]/+data.ts, layouts/LayoutChrome.tsx and AGENTS.md, so expect a small conflict whichever lands second.

⚠ Sequencing is the real risk in this PR, not any one hunk. Merging the [[routes]] block without #276 moves every old address — /articles/*, /subtle-system/*, /techniques/*, /privacy, /contact, /meditations, /live, /music, /classes, /pt-br, /sitemap.xml.gz — from 200-on-Rails to 404-on-this-Worker. Repointing the in-code hrefs fixes only the links this repo authors; every inbound backlink and bookmark depends on #276.

DiscoverMeditation is rendered by nothing. It is exported from components/organisms/index.ts and appears in no route, no layout and no content block — only its own story and tests. So repointing its three hrefs ships no visitor-facing fix today; it fixes the component for whenever it is wired up, and its new test is the guard for that moment. Worth knowing before judging the change's weight.

Part 8 produced no code. Nothing on the indexing surface is verifiable before the switch and all of it corrects itself at cutover, so it is step 3 above rather than a diff.

Detail

Why external stays on the player's two links. The acceptance criterion asks for it to go, on the reading that an own-origin link is not external. In this atom external is what sets target="_blank", rel="noopener noreferrer" and the screen-reader "opens in a new tab" announcement — Link cannot read the request origin, so the prop is a new-tab prop, not an origin claim. The only route that renders the upsell is /meditations/:id/embed, which runs in an iframe on a third party's page: dropping external would navigate that iframe, drawing the whole site into a small box. The question thread asks which reading wins; the branch builds the new-tab one. The deeper fix, if the criterion's reading is the intended one, is to rename the atom's prop to newTab and keep the announcement keyed to it — one atom and a handful of call sites, including RichText's pass-through of the editor's own newTab field. Not done here: it is a change to a shared atom, outside this ticket.

localeHref, not localePath + normalizeContentPath. localeHref is that composition, and its doc names this caller — "the one entry point for a caller that cannot promise localePath's already-normalized input". Verified equivalent for every shape slugSchema admits plus index.

Why the fallback is a 302 and not a rewrite. Serving English content under an /it/ URL would break the canonical and hreflang contract lib/hreflang.ts owns, and server/AGENTS.md records the invariant it rests on: a page always renders in a locale it is published in, and its canonical is always self-referential. The 302 costs a round trip, and the second request's config read sits behind the 600s edge cache in front of SahajCloud.

The chain this permits. A part-1 301 may be followed by this 302 — /it/articles/x → /it/<slug> → /<slug>. Collapsing it into one 301 would cache a language choice that has to change the moment someone publishes the translation.

Only pages can have this fallback. meditations returns _status as a plain string and lectures omits it, so advertisedLocales answers [] for both. The same branch in their data hooks would be unreachable code, and their 404s are id-based and locale-invariant.

Verifying that the route binding reaches the deploy. wrangler.toml is not what wrangler deploys: the build writes dist/server/wrangler.json and wrangler reports "Using redirected Wrangler configuration". That generated JSON carries "routes":[{"pattern":"wemeditate.com","custom_domain":true}], so the binding does arrive. A check of wrangler.toml alone would not have shown this, and an unknown-key control test confirmed wrangler never reads the TOML during the dry run.

Measurements, all re-taken on this branch. Preview Worker: /meditations, /live, /classes, /music, /app, /privacy, /contact → 404; /meditate-now, /live-meditations, /classes-near-me, /music-for-meditation, /privacy-notice, /contact-us, /techniques → 200. Country hosts: wemeditate.it/articles/x → 301 wemeditate.com/it/articles/x, and likewise .fr→/fr/, .ru→/ru/, .cz→/cs/, ua.→/uk/; www → 302 apex. The Turnstile site key was read from GET https://cloud.sydevelopers.com/api/atlas/challenge?parent=https%3A%2F%2Fwemeditate.com.

Fixture pre-mortem. pages/[slug]/data.test.ts's live-preview fixture returned { enabled: false }. LivePreviewSession in server/live-preview.ts is { active, scope, token } — nothing reads enabled, so a preview-active case written against that fixture would have been vacuous. Corrected to the real shape before the preview test was written.

Review findings dismissed, with reasons.

  • Fold the two Vike-abort helpers in data.test.ts into one abortOf returning {url,status}|null. Rejected: redirectOf rethrows a non-redirect abort on purpose, and collapsing both into one null answer would make three existing tests pass on a silent 404 — exactly the bug they exist to catch. Its JSDoc was cut to two lines instead, which was the finding's real cost.
  • Name one derivation, localeSwitchTargets(status, offered, path), that the dropdown calls and the fallback is checked against. Rejected: a new shared layer for one caller, and the three sites it would couple do not agree on inputs — /map and /meditations/:id resolve a locale switch for unrelated reasons. The coupling is recorded in AGENTS.md's hreflang bullet instead, which is where a reader looking at locale behaviour lands.
  • Move the dead-link check into the smoke lane as "every literal site href under components/ returns 200". A good idea and a bigger one than this ticket: it needs the source scan plus a live fetch per href, and it would have to tolerate /app until that page exists. Not built here.

Closes #280


Generated by Claude Code

A reader on `/it/about` gets a 404 today whenever that page has no Italian
translation, because `getPageBySlug` answers `null` for a locale the document
is not published in. Production serves `availableLocales: ["en"]`, so nothing
reaches that branch yet; the moment the ten launch locales are set, every
untranslated page 404s and every language-dropdown entry on one leads nowhere.

The data hook now falls back to the English path instead. It needs no second
read: `getPageLocaleStatus` is already in the same `Promise.all`, and
`advertisedLocales` already owns the shape guard over its map.

302, not 301: publishing the translation has to change where the URL lands,
and a 301 is cached indefinitely.

Refs #280

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZYMDrz1EMD9d66QLj
The comment claimed the two "cannot disagree about where a locale switch
leads". That is true of the spelling and false of which locales each lists:
the cluster carries published ∩ offered, the dropdown carries every offered
locale. Record the difference and why it is right, and pin the dropdown's
side with a test, so nobody closes the gap by filtering the list and hiding
the language switch from the readers who need it most.

Refs #280

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZYMDrz1EMD9d66QLj
`/meditations`, `/live` and `/classes` are the old Rails site's slugs. This
site serves the same three pages at `/meditate-now`, `/live-meditations` and
`/classes-near-me` (all measured 200 on the preview Worker; all three old
paths measured 404). Nothing upstream corrects a hard-coded href, so these
are the only rendered literal links in the tree that lead nowhere.

Refs #280

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZYMDrz1EMD9d66QLj
Both pointed absolutely at `https://wemeditate.com/…` because that domain
belonged to the old Rails site, which localized its own slugs. This app
serves the domain now, so the `shortcut:` marker at the top of the file is
resolved: both are site paths, and `Link` spells each through `localeHref`,
so a French reader of an embed reaches `/fr/meditate-now`.

`/meditations` also moves to `/meditate-now`, which is the slug this site
publishes. `WEMEDITATE_DOMAIN` survives only as the web arm's link text.

Both links keep `external`. In this atom that is what opens a new tab, and
the only route rendering the upsell is the embed, inside an iframe on
someone else's page — a same-tab link would draw this whole site into that
frame. The ticket asked for `external` to go; see the PR's question thread.

Refs #280

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZYMDrz1EMD9d66QLj
Without a site key the widget never renders a token, and SahajCloud requires
one on every public write — so every contact and signup submission comes back
`captcha_failed`.

The key is SahajCloud's own: it holds both halves of exactly one pair and
serves this site key on `GET /api/atlas/challenge`, read live to confirm it.
Taking that pair rather than provisioning a second one is what guarantees
siteverify accepts the token.

`wemeditate.com` still has to be added to the widget's hostname allowlist in
the Cloudflare dashboard, which is an attended step.

Refs #280

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZYMDrz1EMD9d66QLj
…ot exist

The parenthetical said locale-prefixed paths are "handled by [locale]/[slug]".
There is no `pages/[locale]/` directory, and never was: `+onBeforeRoute`
strips a known locale into `urlLogical`, so this one matcher serves every
locale. Say what the guard actually refuses, and pin the single case it
uniquely refuses with a test.

Refs #280

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZYMDrz1EMD9d66QLj
Shorter comments where the first draft narrated, one helper call where it
restated the helper's body, and one test folded into the case it duplicated.

- `pages/[slug]/+data.ts` redirects through `localeHref`, which *is*
  `localePath(locale, normalizeContentPath(path))` and whose doc names this
  caller. Verified equivalent for every shape `slugSchema` admits, plus the
  routing-only `index`.
- The fallback now skips a live-preview session, for the reason
  `server/site-context.ts`'s locale gate does: `getPageLocaleStatus` reports
  published status only, and moving an editor to the English URL would end
  their session. One gate knowing the rule and one not was the gap.
- The player's `external` rationale moves from the constant 790 lines away to
  the block that renders the links, and `/app`'s unmet precondition gets the
  `shortcut:` marker the deleted one used to carry.
- `data.test.ts`'s live-preview fixture said `enabled`, a key
  `LivePreviewSession` does not carry. It is `{ active, scope, token }`.
- `.env.production` drops what `.env.example` already says.

Refs #280

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZYMDrz1EMD9d66QLj
Two claims the branch makes stale. The deployment section named only the
design Worker's custom domain, which read as if the web Worker had none. And
the hreflang bullet said a URL advertises only the locales its document is
published in, without saying what the other locales do now — which is the one
place prose can hold the coupling between the cluster, the dropdown and the
302, since no single function owns all three.

Refs #280

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZYMDrz1EMD9d66QLj
This Worker is bound to no domain, so the new site is reachable only at its
workers.dev host and `wemeditate.com` still serves the old Rails app.

⚠ Cloudflare Workers Builds deploys this Worker from `main`, and a custom
domain overwrites the zone's DNS record for that hostname. Merging this
commit moves the apex, so it is deliberately the last commit on the branch,
and the comment beside it names what has to be in `main` first.

Only the apex needs a route: `www` and all five country hosts already
redirect to it at Cloudflare, before an origin is chosen (re-measured, and
`wemeditate.cz` sends `/articles/x` to `/cs/articles/x`).

Verified reaching the deploy, which is not obvious: the build writes
`dist/server/wrangler.json` and wrangler deploys from that redirected
config, not from this file. The generated JSON carries the route.

Refs #280

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZYMDrz1EMD9d66QLj

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 question for the reviewer, one per thread.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

key="upsell"
external
href={`https://${WEMEDITATE_DOMAIN}/meditations`}
href="/meditate-now"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these two links keep external?

The acceptance criterion says they should lose it, reading external as "off-site" — and the href is now our own origin. But in this atom external is what sets target="_blank", rel and the "opens in a new tab" announcement. Link cannot read the request origin, so the prop is a new-tab prop, not an origin claim.

A — keep it. Built. Only the embed route renders this line, inside an iframe on someone else's page. A same-tab link navigates that iframe, drawing this whole site into a small box.

B — drop it, as the criterion says. The link then opens in the host's frame.

C — keep the new tab and rename the atom's prop to newTab, so neither this call site nor the next same-origin one needs a comment defending external. One atom plus a handful of call sites, including RichText's pass-through of the editor's own newTab field.

Reply with a letter, or your own answer.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
wemeditate-design 0abce32 Commit Preview URL

Branch Preview URL
Nov 24 2026, 01:30 AM

@sydevs-bot

sydevs-bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running

recent dispatches
  • 01:24Z resolve-conflicts · attempt 1 · session · done
  • 01:24Z resolve-conflicts · attempt 1 · session
  • 17:47Z resolve-conflicts · attempt 1 · session · done
  • 17:47Z resolve-conflicts · attempt 1 · session
  • 23:57Z resolve-conflicts · attempt 1 · session · done

Written by the sydevs dispatcher. Sessions never edit this comment.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
wemeditate-web 0abce32 Commit Preview URL

Branch Preview URL
Nov 24 2026, 01:30 AM

@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 19, 2026
@sydevs-bot sydevs-bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 19, 2026

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧐 Adversarial review

Six of the ticket's nine parts, built with no new layer: the fallback reuses advertisedLocales, localeHref and DEFAULT_LOCALE, the diff adds no file but a test, and each of the four non-firing cases is a test, not a claim. Two things to settle. The embed is the one route with no availableLocales gate, so its newly relative upsell links are reachable in locales the site refuses. And this says Closes #280 while parts 1 and 6 sit in #276 (Part of #160) and #284 (Closes #278) — so nothing ties #280's fifteen redirect-layer criteria to a PR, and merging this closes the ticket with them unverified. Strike them from #280, or have #276 close it.

Findings

  • should-fix MeditationPlayer.tsx:842 — the upsell links 404 permanently in a locale outside availableLocales, which only the embed reaches.
  • should-fix pages/[slug]/+data.ts:96 — the 302 drops the query string #276's 301 keeps.
  • should-fix wrangler.toml:27 — an 11-line merge checklist over a 3-line block, stale a day later.
  • consider AGENTS.md:111 — claims the Pages 302 for every route the dropdown renders on.

What was checked

Read whole: both [slug] hooks, MeditationPlayer, LayoutChrome, the Link atom, lib/hreflang.ts, server/site-context.ts, the embed +data.ts, wrangler.toml, .env.production. Ladder: no new file, hook, type or constant — every piece is an existing export. Confirmed advertisedLocales(status, offered) matches its call, anchorFor exists in tests/_helpers/markup.ts, PUBLIC__TURNSTILE_SITE_KEY matches .env.example:77, [[routes]] closes before [vars], and upsell is passed only by the embed route, so that comment holds. Read #276 and #284 for parts 1 and 6. No preview request sent. The external question thread is the reviewer's; its reading is argued and I left it.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

Comment thread pages/[slug]/+data.ts Resolved
Comment thread wrangler.toml Resolved
Comment thread AGENTS.md Resolved
@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 19, 2026
@sydevs-bot sydevs-bot moved this from Working to Pending in SYDevelopers Technical Roadmap Nov 19, 2026
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 19, 2026
@sydevs-bot sydevs-bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 19, 2026
sydevs-bot and others added 5 commits November 19, 2026 04:13
The embed route fetches no settings, so it renders under any KNOWN_LOCALES
code. `server/site-context.ts` 404s a locale outside `availableLocales`
before a page is read, so a locale-prefixed upsell href is permanently dead
there — and `availableLocales` is `["en"]` today, which makes that every
non-English embed. The absolute URL these replaced had no prefix to go wrong.

Pinning both to DEFAULT_LOCALE costs a translated embed the English page.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVZc1mzQSDzGNdz7nK
The legacy redirect layer's 301 carries the search through (#276), and that
301 may hand off to this 302, so `/it/articles/x?utm=y` kept the campaign tag
over the first hop and lost it on the second. A cutover's inbound traffic is
exactly what arrives tagged.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVZc1mzQSDzGNdz7nK
The prerequisite list was a point-in-time ordering, and a day after the
cutover it reads as history. The PR body carries it, which is where a
reviewer reads it. The deploy mechanism stays: that is the part a reader of
this file cannot derive.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVZc1mzQSDzGNdz7nK
The dropdown renders on every route, so both notes on it read as if the
`[slug]` fallback covered the routes it does not. Name the route, and say why
the id-addressed ones need no fallback of their own.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVZc1mzQSDzGNdz7nK
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Merged main in, clean. Lean gate green on the merged tree: 126 files, 1203 tests. Security review re-ran: no findings.

All four critic findings adopted, a commit each:

  • eca28cb — upsell links take locale={DEFAULT_LOCALE} (t)
  • 867ccad — the 302 carries the query string (t)
  • 024ca54 — merge checklist out of wrangler.toml (t)
  • dd3538b — the 302 named as one route's (t)

The external question thread is still yours.

One review-body point needs you, not a commit. This says Closes #280, yet #280's fifteen redirect-layer criteria are #276's work, so merging closes them unverified.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 19, 2026
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 20, 2026
@sydevs-bot sydevs-bot moved this from Awaiting to Working in SYDevelopers Technical Roadmap Nov 20, 2026
#325 trimmed the SEO inventory out of the root guide's head bullet, and this
branch had appended the `[slug]` untranslated-locale fallback to the longer
version of that bullet. Took main's trimmed prose and kept the fallback
paragraph: it is behaviour this branch adds, not inventory #325 moved to the
modules' own headers.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjXwXBeD2ne3FtN5Ais
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Merged main in. One conflicted file, AGENTS.md, in the indexable-head bullet.

#325 trimmed the SEO inventory out of that bullet. This branch had appended the [slug] untranslated-locale fallback paragraph to the longer version of it. The resolution takes #325's trimmed prose and keeps the fallback paragraph: it is behaviour this branch adds, not inventory #325 moved into the modules' own headers.

main has touched nothing but AGENTS.md since this branch last merged it, so no code hunk was in play. Lean gate green on the merge — lint, tsc --noEmit, 1663 tests.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 20, 2026
@sydevs-bot sydevs-bot moved this from Working to Awaiting in SYDevelopers Technical Roadmap Nov 20, 2026
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 20, 2026
@sydevs-bot sydevs-bot moved this from Awaiting to Working in SYDevelopers Technical Roadmap Nov 20, 2026
#283 moved the `languages` derivation out of `LayoutChrome` into
`useSiteNav`, where this branch had only corrected its comment. The code
is main's; the comment's second paragraph — which locales the dropdown
lists versus the hreflang cluster, and the `[slug]` 302 that makes an
untranslated entry work — moves to `useSiteNav.ts` with it.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjYtbM5nSLeexEEY5i8
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Merged main in. One conflict: layouts/LayoutChrome.tsx.

#283 moved the languages derivation into layouts/useSiteNav.ts, where this branch had only
corrected the comment above it. So the code is main's, and the branch's correction moved with it —
which locales the dropdown lists versus the hreflang cluster, and the [slug] 302 behind an
untranslated entry, now sit in useSiteNav.ts. The resolved LayoutChrome.tsx matches main exactly.

LayoutChrome.test.tsx merged clean and still asserts the three-locale dropdown, so a test still
holds that behaviour.

Lean gate green: lint, tsc --noEmit, 1694 tests across 161 files.

The body's file list now names useSiteNav.ts instead of LayoutChrome.tsx.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 21, 2026
@sydevs-bot sydevs-bot moved this from Working to Awaiting in SYDevelopers Technical Roadmap Nov 21, 2026
sydevs-bot pushed a commit that referenced this pull request Nov 21, 2026
#313 reformatted the repo and made any lint warning fail the gate, which
touched both of this branch's conflicted files.

- `SocialShare.tsx`: the hunk is #313's prop reordering against this
  branch's removal of `platforms.sort()`. Took main's formatting with this
  branch's `.map`, so the caller's order survives and the file clears
  `--max-warnings 0`. Those were the 7 warnings the PR body logged as
  unfixable on lines it does not write; main has now fixed them.
- `DiscoverMeditation.stories.tsx`: main's side is #313 reformatting the
  old story body, which this branch replaces — `pages` is required now, so
  `<DiscoverMeditation />` with no props would not typecheck. Took this
  branch's file.

Main carries no `DiscoverMeditation.test.tsx`, so the add/add the PR body
anticipated from #288 did not arrive.

Lean gate on the merge: lint clean under `--max-warnings 0`, prettier
clean, `tsc --noEmit` clean, 164 files / 1706 tests pass.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjYq1nwFopvLJWfb9Jv
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 22, 2026
@sydevs-bot sydevs-bot moved this from Awaiting to Working in SYDevelopers Technical Roadmap Nov 22, 2026
`main`'s module reorg renamed every path this branch imports. Three files
conflicted, each the same shape: take the new paths, keep this branch's
added lines.

- `MeditationPlayer.tsx`: `DEFAULT_LOCALE` now comes from
  `@/lib/i18n/locales`, which is where the reorg put it. Dropped `main`'s
  `shortcut:` comment on `WEMEDITATE_DOMAIN`, whose stated trigger — "once
  this app serves wemeditate.com" — is what this branch does; the two upsell
  hrefs are site paths now, and only the link text still names the domain.
- `+data.ts`: `localeHref` and `DEFAULT_LOCALE` added to `main`'s import block.
- `data.test.ts`: kept the real `LivePreviewSession` fixture shape. `main`
  still carried the `{ enabled: false }` that nothing reads, which would make
  the preview-active case vacuous.

`main` also added a `no-restricted-imports` rule requiring `@/` across folder
boundaries, which this branch's new `markup` helper import in the embed test
predates. Respelled.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjWZZJqzV3yK9HqZk1F
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Merged main in. Its module reorg renamed every path this branch imports, so all three conflicts were one shape: take the new paths, keep this branch's added lines. Two were worth a choice.

  • MeditationPlayer.tsx — kept this branch's one-line comment on WEMEDITATE_DOMAIN. main only respelled lib/urls.ts inside the shortcut: block this branch deletes, and that block's trigger — "once this app serves wemeditate.com" — is what this branch does.
  • data.test.ts — kept the real LivePreviewSession fixture. main still carried the { enabled: false } that nothing reads, so taking its side would have let the preview-active case pass vacuously.

One clean auto-merge still broke: main now requires @/ across folder boundaries, and the embed test's markup import predates the rule. Respelled.

Lean gate green — 170 files, 1717 tests. Rebuilt too, since the reorg moved all of server/routes/**: the wemeditate.com custom-domain route and the Turnstile key both still reach dist/.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 22, 2026
@sydevs-bot sydevs-bot moved this from Working to Awaiting in SYDevelopers Technical Roadmap Nov 22, 2026
@sydevs-dispatcher sydevs-dispatcher Bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 24, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Awaiting to Working in SYDevelopers Technical Roadmap Nov 24, 2026
`main` replaced DiscoverMeditation's three hard-coded hrefs with the pages an
editor configures in `wm-web-config.classPages`, resolved through
`documentHref`, and wired the organism into `pages/[slug]/+Page.tsx`. That
delivers part 4 of #280 — no literal a rename can break — so the conflicted
hunk takes `main`'s loop, and this branch's `DiscoverMeditation.test.tsx`
goes with it: it rendered the organism with no `pages`, which now returns
null, and `DiscoverMeditation.pages.test.tsx` on `main` pins the same slugs
from the configured pages.

`layouts/useSiteNav.ts` merged with both sides kept: `main`'s `documentHref`
spelling of `actionLinkHref`, and this branch's note on why the dropdown
lists every served locale while the hreflang cluster lists published ∩
offered.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjXSfMyNJuQ1p68AyVC
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Merged main in. One conflicted file, DiscoverMeditation.tsx.

It took main's side, and that is the whole resolution. #311 replaced the three hard-coded hrefs with the pages an editor sets in wm-web-config.classPages, resolved through documentHref, and wired the organism into pages/[slug]/+Page.tsx. That is part 4 of #280, done better than this branch did it, so there was nothing of this side to keep. This branch's DiscoverMeditation.test.tsx went with it: it rendered the organism with no pages, which now returns null, and main's DiscoverMeditation.pages.test.tsx already pins the same three slugs from configured pages.

layouts/useSiteNav.ts merged with both sides: main's documentHref spelling of actionLinkHref, and this branch's note on the dropdown listing every served locale.

Two claims in the body are now stale — the DiscoverMeditation hunk under "the links a visitor can click", and "rendered by nothing". Everything else in the body stands.

Lean gate green on the merge: lint, tsc --noEmit, 1773 tests.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

feat(server): switch wemeditate.com over to the new site

2 participants