Skip to content

chore(patterns): pin @livetemplate/client to v0.8.41#95

Merged
adnaan merged 1 commit intomainfrom
chore/pin-client-v0.8.41
May 6, 2026
Merged

chore(patterns): pin @livetemplate/client to v0.8.41#95
adnaan merged 1 commit intomainfrom
chore/pin-client-v0.8.41

Conversation

@adnaan
Copy link
Copy Markdown
Contributor

@adnaan adnaan commented May 6, 2026

Summary

Pins @livetemplate/client from @latest to @0.8.41 in patterns/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 with href=\"/\" 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 @latest to rotate (typically up to 12 hours). Once the dust settles we'll revert to @latest so client patches keep flowing automatically.

Test plan

  • Pin verified in patterns/templates/layout.tmpl
  • Post-merge: deploy lt-patterns via flyctl, verify rendered HTML references @0.8.41, ask user to retry the original repro on iOS

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>
Copilot AI review requested due to automatic review settings May 6, 2026 18:43
@claude
Copy link
Copy Markdown

claude Bot commented May 6, 2026

Code Review

Overview

This PR pins @livetemplate/client from @latest to @0.8.41 in patterns/templates/layout.tmpl to immediately gate a cross-app SPA navigation fix (client#119) rather than waiting for jsDelivr's @latest edge cache to rotate. The change is intentionally temporary.

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

  • Consistent pinning: Both livetemplate.css and livetemplate-client.browser.js are pinned to the same version. A mismatch here would be a subtle runtime bug.
  • Well-documented PR: The description explains the root cause, the deploy mechanism, and the exit plan clearly.
  • Targeted scope: Only the affected template is changed; nothing else in the repo is touched.

Concerns

1. No in-code reminder to revert (medium)

The PR description says "Once the dust settles we'll revert to @latest", but there's no tracking signal in the code itself. If the follow-up PR is forgotten, this pin will silently fall behind as new client versions ship.

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 <style> and <script> blocks, but HTML comments in templates are fine.

2. Unchecked post-merge test step (low)

The test plan has an open item:

Post-merge: deploy lt-patterns via flyctl, verify rendered HTML references @0.8.41, ask user to retry the original repro on iOS

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 @latest revert don't get lost in the PR backlog.

3. Convention deviation not flagged (low)

CLAUDE.md specifies @latest in the HTML boilerplate. This PR intentionally deviates. That's fine for a hotfix, but noting it explicitly in the PR body (or a code comment) helps future contributors understand it's a deliberate exception, not an oversight.


Security / Performance

No 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 @latest.


Summary

The 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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.tmpl production CDN URLs from @livetemplate/client@latest to @livetemplate/client@0.8.41 for 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}}
@adnaan adnaan merged commit d1f6aa0 into main May 6, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants