railwatch 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/lib/generators/railwatch/install/templates/railwatch.ts +11 -5
- data/lib/railwatch/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c905c857b9616e0eb4a38518afa97d787f0ee12eab644c950671278ec28ef0e3
|
|
4
|
+
data.tar.gz: 98e4c9103ac4231d2a676b55ceca51ff36d9c84c8570c97391c0eb4d07675b27
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1b31a6f1ae9843426a8480c3f6c9ee8551c886083d6643069cfbd35e5cc7275416fa047d06270d80ce8410619bf0b7431f5ebb0cf9204a59be50ce1f3a30fc08
|
|
7
|
+
data.tar.gz: ed4a1f14aef82b6586b8fd86cd86071b5741906de30f89e12f28327d9e9aeaac664fcbbfc6a2ae1d674ec2ee2599fbcd141fb86c30b44db58c84900f7d21b841
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,17 @@
|
|
|
6
6
|
filled in by the release commit, which is also the only commit that
|
|
7
7
|
touches lib/railwatch/version.rb and Gemfile.lock. See CONTRIBUTING.md. -->
|
|
8
8
|
|
|
9
|
+
## 1.1.1 (2026-10-24)
|
|
10
|
+
|
|
11
|
+
- The browser client names the first page load after its Inertia
|
|
12
|
+
component again on inertia_rails 3.23+, which renders the page object as
|
|
13
|
+
`<script data-page="app" type="application/json">` instead of a
|
|
14
|
+
`data-page` attribute on `<div id="app">`. The client only read the
|
|
15
|
+
attribute, so every initial load (the only visits that carry LCP, CLS,
|
|
16
|
+
INP and TTFB) arrived with no component: per-page web vitals were empty.
|
|
17
|
+
Apps that copied the client (`app/frontend/lib/railwatch.ts`) need the
|
|
18
|
+
same change in their copy.
|
|
19
|
+
|
|
9
20
|
## 1.1.0 (2026-10-22)
|
|
10
21
|
|
|
11
22
|
- A receiver that refuses the connection (nothing listening: a Railwatch
|
|
@@ -659,13 +659,19 @@ function startVitals() {
|
|
|
659
659
|
)
|
|
660
660
|
}
|
|
661
661
|
|
|
662
|
-
// The component the server rendered this page with, off the
|
|
663
|
-
//
|
|
662
|
+
// The component the server rendered this page with, off the serialized page
|
|
663
|
+
// object: inertia_rails 3.23+ renders it as <script data-page="app"
|
|
664
|
+
// type="application/json">, older ones as <div id="app" data-page="...">.
|
|
665
|
+
// Inertia's own events take over from here.
|
|
664
666
|
function pageComponent(): string | undefined {
|
|
665
667
|
try {
|
|
666
|
-
const
|
|
667
|
-
|
|
668
|
-
)
|
|
668
|
+
const script = document.querySelector(
|
|
669
|
+
'script[data-page="app"][type="application/json"]',
|
|
670
|
+
)
|
|
671
|
+
const raw = script
|
|
672
|
+
? script.textContent
|
|
673
|
+
: document.getElementById("app")?.dataset.page
|
|
674
|
+
const page = JSON.parse(raw ?? "{}") as { component?: string }
|
|
669
675
|
return page.component
|
|
670
676
|
} catch {
|
|
671
677
|
// Not an Inertia-rendered page, or the payload moved. Report it anyway.
|
data/lib/railwatch/version.rb
CHANGED