Skip to content

docs(deps): write the live-preview pin rule into the root guide - #253

Merged
sydevs-bot merged 1 commit into
mainfrom
claude/fix-223-live-preview-pin
Nov 18, 2026
Merged

sydevs-bot merged 1 commit into
mainfrom
claude/fix-223-live-preview-pin

Conversation

@sydevs-bot

Copy link
Copy Markdown
Contributor

Summary

Change outline

The doc is the contract here, so the one view that matters is what the rule now obliges. Paraphrased one rule per line, under ## Repo-wide conventions.

Contract — the pin rule, new in AGENTS.md

 Repo-wide conventions
   The backend is called SahajCloud, not "the CMS"
+  @payloadcms/live-preview-react is pinned exact
+    the version it is pinned to IS SahajCloud's own `payload` version
+      not the newest published one
+    why: it merges a postMessage SahajCloud mints        # producer's semantics, not a standard's
+      lib/live-preview/document.tsx hands it the whole transport
+    a caret lets a fresh resolve carry it ahead of the CMS
+      #222 did; #248 restored the pin
+    move it when SahajCloud moves, in the same bump as
+      @payloadcms/live-preview, richtext-lexical, sdk
+    live-preview-react@<v> depends on exactly live-preview@<v>
+      so both take one version, or pnpm-lock.yaml carries two copies
+    SahajAtlasWeb's docs/rules/data-layer.md states the same rule
   `public/` is shipped by both builds, so nothing site-wide goes in it

Preview

The diff changes no rendered surface — one Markdown rule, no route, component or build input — so there is nothing a preview would show.

Test results

  • Lean gate: ✓ lint, tsc --noEmit, vitest run — 956 tests in 96 files
  • Targeted specs: 21 passed — lib/live-preview/document.test.tsx, server/live-preview.test.ts
  • Build: ✓ pnpm build

Security review skipped: the diff matches no path in securityReview.triggerPattern.

Manual verification

  1. Read the new rule against SahajAtlasWeb's docs/rules/data-layer.md:16-20. The ticket asked for a mirror, not a paraphrase, and the opening sentence is near-verbatim — confirm that is the register you want in the root guide.
  2. Decide whether the SahajAtlasWeb drift below earns a ticket. This session has no GitHub API access to that repo and could not file one.

Notes for reviewer

Scope shifted, so the title names the diff rather than the ticket. #248 restored all four exact pins at 3.93.0 on 2026-11-16, which is the dependency half of #223. I verified that rather than trusting it, so only the docs criterion was left to build. The ticket's version table is stale as a result: it was read on 2026-11-15, when the producer sat at 3.90.2.

SahajAtlasWeb has drifted the other way, and now breaks the rule it owns. Its main carries @payloadcms/live-preview and live-preview-react at 3.92.1 while the producer is at 3.93.0, and @payloadcms/sdk at ^3.92.1 — a caret on a package its own rule says moves in the same bump. The ticket predicted the follow-up; this is the measurement. Journalled rather than filed, since the credential is missing.

The review pass returned no findings and no evidence, which finalize-pr says to treat as not yet reviewed. I verified each factual claim in the rule myself instead — sources in Detail.

Detail

Every claim in the rule, checked against a primary source

Claim Source read
Pin is exact, at SahajCloud's payload version package.json:31 = 3.93.0; SahajCloud origin/main:package.json:68 payload = 3.93.0
It merges a postMessage SahajCloud mints lib/live-preview/document.tsx docblock — useLivePreview owns the listener, the payload-live-preview tag, the origin check and the handshake
#222 added the caret, #248 restored the pin git log -p -- package.json: 12e6c37 3.91.0 → ^3.92.1; 3b1f4a6 ^3.92.1 → 3.93.0
live-preview-react@<v> needs exactly live-preview@<v> node_modules/@payloadcms/live-preview-react/package.json → "@payloadcms/live-preview": "3.93.0", an exact range
The rule exists upstream sydevs/SahajAtlasWeb docs/rules/data-layer.md:16-20, read from a clone

Acceptance criteria, as verified on this branch

  • Exact pin: the ticket's node -e check exits 0 — live-preview-react = 3.93.0.
  • Family aligned: live-preview, live-preview-react, richtext-lexical, sdk all 3.93.0.
  • Single copy: grep -c "'@payloadcms/live-preview@" pnpm-lock.yaml = 2, both 3.93.0, matching live-preview-react. A clean pnpm install left the lockfile untouched, which is the stronger check.
  • No .claude/ file added or edited. The branch diff is AGENTS.md alone.

Why the root guide and not docs/rules/

A rule under docs/rules/ loads only through a .claude/rules/ symlink, and .claude/ is a Claude Code protected path. An unattended run cannot create one — it stalls on a prompt nobody is there to answer. The root guide is freely writable and loads in every session, including the dependency run that would otherwise widen the pin again. This is the ticket's own reasoning, and it holds.

Docs sweep

Nothing else in the repo describes the pin. The other pinned hits in docs/cloudflare-previews-ci.md and docs/rules/design-system.md are unrelated senses of the word. lib/live-preview/document.tsx already explains the transport coupling in its docblock; a pointer there would duplicate a rule that already loads in every session, and the failure mode was a package.json edit, not a document.tsx one.

Closes #223


Generated by Claude Code

The exact pin on @payloadcms/live-preview-react tracks SahajCloud's own
payload version, because the package merges a postMessage SahajCloud
mints. That rule was written down only in sydevs/SahajAtlasWeb, so #222
read the pin here as unexplained and replaced it with a caret — the one
shape the rule forbids. The sibling PR sydevs/SahajAtlasWeb#361 made the
same change and the review there caught it, because that repo carries
the rule.

It goes in the root guide rather than docs/rules/, which loads only
through a .claude/rules/ symlink. .claude/ is a Claude Code protected
path, so an unattended run cannot create one and stalls waiting for a
prompt it has nobody to answer.

The dependency half of #223 is already on main: #248 restored all four
exact pins at 3.93.0, the version SahajCloud main's payload now carries,
and pnpm-lock.yaml holds one @payloadcms/live-preview copy.

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

Copy link
Copy Markdown
Contributor Author

Adversarial review skipped: 1 file(s), 9 changed line(s), under review.skipWhen. Say @sydevs-bot review to force one.

🤖 sydevs dispatcher

@sydevs-bot sydevs-bot moved this from Pending to Awaiting in SYDevelopers Technical Roadmap Nov 17, 2026
@cloudflare-workers-and-pages

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 b34c685 Commit Preview URL

Branch Preview URL
Nov 17 2026, 11:35 PM

@sydevs-bot
sydevs-bot added this pull request to the merge queue Nov 18, 2026
@sydevs-bot

sydevs-bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running

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

@sydevs-bot sydevs-bot moved this from Awaiting to Pending in SYDevelopers Technical Roadmap Nov 18, 2026
Merged via the queue into main with commit 4a0feae Nov 18, 2026
23 checks passed
@sydevs-bot
sydevs-bot deleted the claude/fix-223-live-preview-pin branch November 18, 2026 19:21
@sydevs-bot sydevs-bot moved this from Pending to Done in SYDevelopers Technical Roadmap Nov 18, 2026
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.

fix(deps): the live-preview pin is load-bearing, and #222 widened it to a caret

3 participants