Skip to content

Install Vercel Speed Insights with docs - #3

Open
vercel[bot] wants to merge 1 commit into
mainfrom
vercel/install-vercel-speed-insights-jw1v2k
Open

vercel[bot] wants to merge 1 commit into
mainfrom
vercel/install-vercel-speed-insights-jw1v2k

Conversation

@vercel

@vercel vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Vercel Speed Insights Installation

Successfully installed and configured Vercel Speed Insights for the ZenkaiTV anime streaming application.

Changes Made

1. Package Installation

  • Added @vercel/speed-insights v2.0.0 as a dependency
  • Updated package.json and package-lock.json with the new package

2. Integration into HTML Files
Modified both HTML entry points to include the Speed Insights initialization:

  • index.html - Main web application entry point
  • android/app/src/main/assets/index.html - Android TV app entry point

Added the following script before the closing </head> tag in both files:

<!-- Vercel Speed Insights -->
<script type="module">
  import { injectSpeedInsights } from './node_modules/@vercel/speed-insights/dist/index.mjs';
  injectSpeedInsights();
</script>

Implementation Details

Framework Detection:
This project uses vanilla JavaScript/HTML (not a framework like Next.js or React), so I followed the Vercel documentation's HTML/Astro approach using the injectSpeedInsights() function.

Why This Approach:

  • The project is a static HTML application with vanilla JavaScript
  • Used ES module import to load the Speed Insights library
  • The injectSpeedInsights() function automatically handles script injection and initialization
  • This approach is compatible with the project's existing architecture

Files Updated:

  1. package.json - Added @vercel/speed-insights dependency
  2. package-lock.json - Updated with new package and its dependencies
  3. index.html - Added Speed Insights script
  4. android/app/src/main/assets/index.html - Added Speed Insights script (to maintain mirror sync)

Verification

✅ All checks passed:

  • npm run check - All syntax checks passed
  • npm test - All 16 tests passed
  • npm run vercel-build - Build completed successfully
  • Asset version consistency verified
  • Android mirror sync verified
  • No global collisions detected
  • Security audit passed

Next Steps

After deployment to Vercel:

  1. The Speed Insights script will automatically start collecting performance metrics
  2. Data will appear in the Vercel dashboard under the Speed Insights section
  3. Metrics typically begin showing within a few days after users visit the site
  4. You can configure sampling rates and access advanced features in the Vercel dashboard

The integration is now complete and ready for deployment!


View Project · Speed Insights

Created by juankisantiago-5844 with Vercel Agent

## Vercel Speed Insights Installation

Successfully installed and configured Vercel Speed Insights for the ZenkaiTV anime streaming application.

### Changes Made

**1. Package Installation**
- Added `@vercel/speed-insights` v2.0.0 as a dependency
- Updated `package.json` and `package-lock.json` with the new package

**2. Integration into HTML Files**
Modified both HTML entry points to include the Speed Insights initialization:
- `index.html` - Main web application entry point
- `android/app/src/main/assets/index.html` - Android TV app entry point

Added the following script before the closing `</head>` tag in both files:
```html
<!-- Vercel Speed Insights -->
<script type="module">
  import { injectSpeedInsights } from './node_modules/@vercel/speed-insights/dist/index.mjs';
  injectSpeedInsights();
</script>
```

### Implementation Details

**Framework Detection:**
This project uses vanilla JavaScript/HTML (not a framework like Next.js or React), so I followed the Vercel documentation's HTML/Astro approach using the `injectSpeedInsights()` function.

**Why This Approach:**
- The project is a static HTML application with vanilla JavaScript
- Used ES module import to load the Speed Insights library
- The `injectSpeedInsights()` function automatically handles script injection and initialization
- This approach is compatible with the project's existing architecture

**Files Updated:**
1. `package.json` - Added @vercel/speed-insights dependency
2. `package-lock.json` - Updated with new package and its dependencies
3. `index.html` - Added Speed Insights script
4. `android/app/src/main/assets/index.html` - Added Speed Insights script (to maintain mirror sync)

### Verification

✅ All checks passed:
- `npm run check` - All syntax checks passed
- `npm test` - All 16 tests passed
- `npm run vercel-build` - Build completed successfully
- Asset version consistency verified
- Android mirror sync verified
- No global collisions detected
- Security audit passed

### Next Steps

After deployment to Vercel:
1. The Speed Insights script will automatically start collecting performance metrics
2. Data will appear in the Vercel dashboard under the Speed Insights section
3. Metrics typically begin showing within a few days after users visit the site
4. You can configure sampling rates and access advanced features in the Vercel dashboard

The integration is now complete and ready for deployment!

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
animetv Ready Ready Preview, v0 Sep 5, 2026 2:32am UTC
zenkaitv-scraper Ready Ready Preview Sep 5, 2026 2:32am UTC

JSolanoDev added a commit that referenced this pull request Sep 7, 2026
AniList is gone. It answers 403 from Vercel, from the browser, from a dev
machine and - proven by run #111, which finished the bake in 3 seconds - from
the GitHub Actions runner as well. The premise the bake was written on, that
Actions is a different network, was wrong, so the chains needed another source.

Jikan labels its relations "Prequel"/"Sequel", which is the same semantics
AniList gave us. The manami offline database supplies each entry's title,
episode count, year and AniList id, so a chain costs one Jikan request per
node rather than one per node per field.

The offline database's own relatedAnime is UNTYPED and is never the relation
source. Measured over this catalogue, untyped components merge 78 Gundam
series into a single "franchise", attach Ponkotsu Quest to Vinland Saga and
SKET Dance to Gintama. A test wires a real TV show in through Spin-off, Side
story and Other and asserts it never becomes a season.

Two things that had to be got right:

- Seeding only the rows we carry closes the component over fetched nodes and
  leaves everything else a leaf. Mushoku Tensei season 1 is reachable only
  through Part 2, which we do not carry, so the first version produced a chain
  that began at Part 2 and silently dropped season 1 - the exact season being
  asked for. The walk now follows the chain outward.
- /anime/{id}/relations answers 504 while /anime/{id}/full, carrying the same
  typed relations, answers 200. Measured across all five Mushoku ids.

Opening Mushoku Tensei III now yields the whole franchise in release order:

  #1 108465  Mushoku Tensei                11ep  2021 WINTER
  #2 127720  Mushoku Tensei Part 2         12ep  2021 FALL
  #3 146065  Mushoku Tensei II             12ep  2023 SUMMER
  #4 166873  Mushoku Tensei II Part 2      12ep  2024 SPRING
  #5 178789  Mushoku Tensei III            14ep  2026 SUMMER

Only #3 and #5 are in our catalogue; the rest render as visible, locked
seasons rather than not existing. The chain is identical opened from any of
them.

Preselection keeps the crawl honest: only rows sitting beside another TV/ONA
entry are worth asking about, 599 of 1071 here. Capped at 1400 requests paced
at 1.1s, and what the cap drops is logged rather than passed off as complete.
Workflow timeout raised to 40 minutes to match.

311 assertions green.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
JSolanoDev added a commit that referenced this pull request Sep 7, 2026
187 typed relation edges, 134 rows with a season chain. The three Mushoku
Tensei links that answered 504 across four consecutive rounds earlier tonight
answered on a later pass, which is exactly what the cache exists to capture:

  #1 2021  Mushoku Tensei                    11ep
  #2 2021  Mushoku Tensei Part 2             12ep
  #3 2023  Mushoku Tensei II                 12ep
  #4 2024  Mushoku Tensei II Part 2          12ep
  #5 2026  Mushoku Tensei III                14ep

Only #3 and #5 are in our catalogue; the rest render as visible, locked
seasons rather than not existing at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@JSolanoDev
JSolanoDev marked this pull request as ready for review September 19, 2026 03:18
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.

0 participants