Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d496226
feat(lighthouse-ci): scaffold lighthouse-tests dev-package
HazAT May 12, 2026
36c3f76
feat(lighthouse-ci): add SENTRY_LIGHTHOUSE_MODE guard to default-brow…
HazAT May 12, 2026
cc37d4d
fix(lighthouse-ci): enable replay in tracing-replay mode for default-…
HazAT May 12, 2026
ae9b8b8
feat(lighthouse-ci): add nightly + label-gated lighthouse jobs to bui…
HazAT May 12, 2026
2a7c378
fix(lighthouse-ci): align workflow with actual matrix schema and ligh…
HazAT May 12, 2026
0119764
feat(lighthouse-ci): add post-comment.mjs to render Lighthouse result…
HazAT May 12, 2026
cfa2092
fix(lighthouse-ci): drop unusable local-path links from PR comment
HazAT May 12, 2026
e8cb7f8
chore(lighthouse-ci): pin treosh/lighthouse-ci-action to commit SHA
HazAT May 12, 2026
e04bc37
fix(lighthouse-ci): unblock webpack build and surface LCP/TBT/bytes i…
HazAT May 12, 2026
9e28f29
chore(lighthouse-ci): drop angular, remix, ember, solidstart from matrix
HazAT May 12, 2026
254f973
fix(lighthouse-ci): rename lighthouserc.js to .cjs and switch to modu…
HazAT May 12, 2026
b766f80
fix(lighthouse-ci): drop redundant uploadArtifacts from treosh action
HazAT May 12, 2026
db8a4bb
fix(lighthouse-ci): unblock nextjs-16 + astro-5; drop react-router-7-spa
HazAT May 12, 2026
b29aada
fix(lighthouse-ci): upload artifacts from the treosh action's results…
HazAT May 12, 2026
b96bb65
fix(lighthouse-ci): include hidden files when uploading .lighthouseci…
HazAT May 12, 2026
9809ea1
fix(lighthouse-ci): attach default-browser listeners synchronously to…
HazAT May 13, 2026
1549ea8
chore(lighthouse-ci): trim matrix to instrumented apps only (default-…
HazAT May 13, 2026
760b128
fix(lighthouse-ci): run on every PR + nightly, drop label gate
HazAT May 13, 2026
8288dcb
feat(lighthouse-ci): render report as Job Summary; sync APPS list to …
HazAT May 13, 2026
7c24cff
chore(lighthouse-ci): extract to standalone nightly workflow
HazAT May 13, 2026
06f87a5
refactor(lighthouse-ci): drop PR-commenting logic from report script
HazAT May 13, 2026
bb5ee63
feat(react-19-e2e): add SENTRY_LIGHTHOUSE_MODE instrumentation
HazAT May 13, 2026
df529c5
feat(lighthouse-ci): bundle test apps and upload to lighthouse.sentry…
HazAT May 13, 2026
d876721
ci(lighthouse): TEMP — fire workflow on push to feat/lighthouse-ci
HazAT May 13, 2026
a271b87
fix(lighthouse-ci): update root workspaces to lighthouse-bundle
HazAT May 13, 2026
1800bf0
fix(lighthouse-ci): upload build-output artifact for restore-cache
HazAT May 13, 2026
48c2db9
refactor(lighthouse-ci): fire-and-forget upload, fix SSR install, har…
HazAT May 13, 2026
cad23e0
revert(react-router-7-spa-e2e): restore original entry, drop dead lig…
HazAT May 13, 2026
9ba92f4
ci(lighthouse): drop temp push trigger on feat/lighthouse-ci
HazAT May 13, 2026
62896cc
revert(e2e-tests): restore original test apps and build.yml
HazAT May 16, 2026
ca35738
feat(e2e-tests): add lighthouse-react fixture with 3 Sentry modes
HazAT May 16, 2026
12ab6e8
feat(lighthouse-ci): bundle script targets new single-app static matrix
HazAT May 16, 2026
8113edd
ci(lighthouse): collapse to single job, drop artifact round-trip
HazAT May 16, 2026
86cfe88
fix(lighthouse-ci): restore CACHED_DEPENDENCY_PATHS for install-depen…
HazAT May 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,8 @@ jobs:
node-version-file: 'package.json'
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: '1.3.14'
- name: Restore caches
uses: ./.github/actions/restore-cache
with:
Expand Down Expand Up @@ -884,6 +886,8 @@ jobs:
node-version-file: 'package.json'
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: '1.3.14'
- name: Restore caches
uses: ./.github/actions/restore-cache
with:
Expand Down Expand Up @@ -925,9 +929,8 @@ jobs:
- name: Run integration tests
env:
NODE_VERSION: ${{ matrix.node }}
run: |
cd packages/remix
yarn test:integration:ci
working-directory: packages/remix
run: yarn test:integration

job_build_tarballs:
name: Build tarballs
Expand Down Expand Up @@ -1012,6 +1015,8 @@ jobs:
contains(fromJSON('["node-exports-test-app","nextjs-16-bun", "elysia-bun", "hono-4"]'),
matrix.test-application)
uses: oven-sh/setup-bun@v2
with:
bun-version: '1.3.14'
- name: Set up AWS SAM
if: matrix.test-application == 'aws-serverless' || matrix.test-application == 'aws-serverless-layer'
uses: aws-actions/setup-sam@v2
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: 'Nightly: Lighthouse'

# Nightly: builds the Lighthouse fixture app and uploads bundles to the
# lighthouse.sentry.gg lab. Never blocks merges.

on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:

concurrency:
group: lighthouse-${{ github.run_id }}
cancel-in-progress: false
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Concurrency group with run_id is a no-op

Low Severity

The concurrency group uses github.run_id, which is unique per workflow run, making the entire concurrency block a no-op — no run can ever conflict with another. Other workflows in this repo use the standard pattern ${{ github.workflow }}-${{ github.head_ref || github.run_id }} for meaningful concurrency control. This block gives a false impression of concurrency management when none exists.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 8113edd. Configure here.


env:
CACHED_DEPENDENCY_PATHS: |
${{ github.workspace }}/node_modules
${{ github.workspace }}/packages/*/node_modules
${{ github.workspace }}/dev-packages/*/node_modules

jobs:
build-and-upload:
name: Bundle and upload Lighthouse cells
runs-on: ubuntu-24.04
timeout-minutes: 30
env:
LIGHTHOUSE_LAB_URL: ${{ secrets.LIGHTHOUSE_LAB_URL }}
LIGHTHOUSE_UPLOAD_TOKEN: ${{ secrets.LIGHTHOUSE_UPLOAD_TOKEN }}
VITE_E2E_TEST_DSN: 'https://username@domain/123'
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5.0.0
with:
version: 9.15.9
- uses: actions/setup-node@v6
with:
node-version-file: 'package.json'
- uses: ./.github/actions/install-dependencies
- run: yarn build:ci
- run: yarn build:tarball
- run: yarn test:prepare
working-directory: dev-packages/e2e-tests
- run: node dev-packages/lighthouse-bundle/bundle-and-upload.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/logo.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Lighthouse Fixture</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "lighthouse-react-test-app",
"private": true,
"type": "module",
"sentryTest": {
"skip": true
},
"scripts": {
"build": "vite build",
"build:no-sentry": "vite build --mode no-sentry",
"build:init-only": "vite build --mode init-only",
"build:tracing-replay": "vite build --mode tracing-replay",
"preview": "vite preview",
"clean": "npx rimraf node_modules pnpm-lock.yaml dist",
"test:build": "pnpm install && pnpm build"
},
"dependencies": {
"@sentry/react": "file:../../packed/sentry-react-packed.tgz",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/react": "^18.3.0",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react-swc": "^3.7.0",
"typescript": "~5.4.0",
"vite": "^5.4.0"
},
"volta": {
"extends": "../../package.json"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import { useEffect, useState } from 'react';

const CARDS = [
{ title: 'Performance', body: 'Measure and optimize your app render times and interaction latency.' },
{ title: 'Accessibility', body: 'Ensure your interface is usable by everyone, including assistive technologies.' },
{ title: 'Best Practices', body: 'Follow modern web development patterns for secure and maintainable code.' },
{ title: 'SEO', body: 'Optimize discoverability with semantic markup and structured metadata.' },
{ title: 'PWA', body: 'Add offline support and installability via service workers and manifests.' },
{ title: 'Security', body: 'Protect users with CSP headers, HTTPS, and input validation.' },
];

export default function App() {
const [count, setCount] = useState(0);

useEffect(() => {
document.title = `Lighthouse Fixture (${count})`;
}, [count]);

return (
<main>
<header>
<nav>
<a href="/">Home</a>
<a href="/docs">Docs</a>
<a href="/about">About</a>
</nav>
</header>

<section className="hero">
<img src="/logo.svg" alt="Lighthouse logo" width={120} height={120} />
<h1>Lighthouse Fixture</h1>
<p>
This app exists to measure JavaScript bundle size and runtime cost across three Sentry instrumentation
configurations. Each build mode ships a different level of SDK integration.
</p>
</section>

<section className="cards">
{CARDS.map(card => (
<article key={card.title} className="card">
<h2>{card.title}</h2>
<p>{card.body}</p>
</article>
))}
</section>

<form
onSubmit={e => {
e.preventDefault();
setCount(c => c + 1);
}}
>
<input type="text" name="name" placeholder="Name" aria-label="Name" />
<input type="email" name="email" placeholder="Email" aria-label="Email" />
<input type="text" name="message" placeholder="Message" aria-label="Message" />
<button type="submit">Submit ({count})</button>
</form>
</main>
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { createRoot } from 'react-dom/client';
import App from './App';

async function bootstrap() {
const mode = import.meta.env.MODE;
if (mode === 'init-only') {
const { initSentry } = await import('./sentry/init-only');
initSentry();
} else if (mode === 'tracing-replay') {
const { initSentry } = await import('./sentry/tracing-replay');
initSentry();
}
// 'no-sentry' mode: do not import any sentry module — the dynamic-import
// branches above are unreachable and Vite drops them from the bundle.

const root = createRoot(document.getElementById('root')!);
root.render(<App />);
}

void bootstrap();
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import * as Sentry from '@sentry/react';

export function initSentry(): void {
// enabled: false makes the SDK a guaranteed no-op (no transport allocation,
// no DSN warning). We're measuring pure SDK-loading + tree-shaking cost.
Sentry.init({ enabled: false });
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function initSentry(): void {
// no-op: this mode intentionally excludes all Sentry imports
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unused dead code file never imported anywhere

Low Severity

The no-sentry.ts file exports initSentry but is never imported from anywhere. The no-sentry build mode works by having main.tsx skip both dynamic-import branches, so Sentry modules are simply never loaded. This file is entirely dead code that could confuse future maintainers into thinking it's wired up.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 8113edd. Configure here.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import * as Sentry from '@sentry/react';

export function initSentry(): void {
Sentry.init({
dsn: import.meta.env.VITE_E2E_TEST_DSN as string | undefined,
release: 'lighthouse-fixture',
environment: 'qa',
integrations: [Sentry.browserTracingIntegration(), Sentry.replayIntegration()],
tracesSampleRate: 1.0,
replaysSessionSampleRate: 1.0,
replaysOnErrorSampleRate: 1.0,
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"compilerOptions": {
"composite": true,
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';

export default defineConfig({
plugins: [react()],
});
Loading
Loading