chore(patterns): pin @livetemplate/client to v0.8.41#95
Conversation
Pinning to the exact version that ships livetemplate/client#119 (full reload when SPA navigation crosses an app boundary). The patterns app loads via the docs site's reverse proxy, so its client library was the one intercepting the cross-app link click and patching the docs body into a page whose head still pointed at the patterns app's stylesheets. Pinning (vs. @latest) is intentional here so the fix is live the moment this branch deploys, instead of waiting for jsdelivr's edge cache on @latest to rotate. Once the dust settles we can revert to @latest in a follow-up to keep getting client patches automatically. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Code ReviewOverviewThis PR pins The diff is minimal and correct — both the CSS and JS references are bumped to the same version, which keeps them in sync. What's Good
Concerns1. No in-code reminder to revert (medium)The PR description says "Once the dust settles we'll revert to Suggestion: Add a brief comment above the pinned lines so the next reader knows this is intentional and temporary: {{else}}
<!-- Pinned to 0.8.41 for cross-app nav fix (client#119); revert to @latest after deploy verification -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@livetemplate/client@0.8.41/livetemplate.css">
<script defer src="https://cdn.jsdelivr.net/npm/@livetemplate/client@0.8.41/dist/livetemplate-client.browser.js"></script>
{{end}}Note: CLAUDE.md prohibits inline 2. Unchecked post-merge test step (low)The test plan has an open item:
This is by design (can't be done pre-merge), but it means the bug fix is unverified until after deploy. Consider opening a follow-up tracking issue now so the verification step and the 3. Convention deviation not flagged (low)
Security / PerformanceNo concerns — jsDelivr is already the trusted CDN in use, and pinning to a specific version is actually more reproducible (and marginally faster on cache hits) than SummaryThe change itself is correct and safe. The main risk is the pin becoming stale if the revert PR is deprioritized. A short comment in the template and a follow-up issue would close that loop. Otherwise, this is ready to merge. |
There was a problem hiding this comment.
Pull request overview
Pins the LiveTemplate browser client dependency used by the patterns example’s production HTML layout so the deployed app consistently serves a known-fixed client build when running behind the docs site reverse proxy.
Changes:
- Update
patterns/templates/layout.tmplproduction CDN URLs from@livetemplate/client@latestto@livetemplate/client@0.8.41for both CSS and browser bundle.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -10,8 +10,8 @@ | |||
| <link rel="stylesheet" href="/livetemplate.css"> | |||
| <script defer src="/livetemplate-client.js"></script> | |||
| {{else}} | |||
Summary
Pins
@livetemplate/clientfrom@latestto@0.8.41inpatterns/templates/layout.tmpl.Why
v0.8.41 ships livetemplate/client#119 — full reload when SPA navigation crosses an app boundary. The patterns app loads via the docs site's reverse proxy at
/patterns/*, and its client library was the one intercepting cross-app link clicks (e.g. clicking the "Patterns" header link withhref=\"/\"from a pattern detail page) and silently patching the docs body into a page whose head still pointed at the patterns app's stylesheets.Pinning (vs.
@latest) gates the fix on this branch's deploy rather than waiting for jsdelivr's edge cache on@latestto rotate (typically up to 12 hours). Once the dust settles we'll revert to@latestso client patches keep flowing automatically.Test plan
patterns/templates/layout.tmpl@0.8.41, ask user to retry the original repro on iOS