Skip to content

Commit e2bcbac

Browse files
committed
Remove dev server detection.
1 parent a48d2b2 commit e2bcbac

File tree

1 file changed

+1
-27
lines changed

1 file changed

+1
-27
lines changed

browser-extension/tests/har-view.ts

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,6 @@ function getUrlParts(key: keyof typeof PAGES) {
2525
}
2626
}
2727

28-
// Check if WXT dev server is running
29-
async function checkDevServer(): Promise<boolean> {
30-
try {
31-
const response = await fetch('http://localhost:3000/@vite/client', {
32-
method: 'HEAD',
33-
signal: AbortSignal.timeout(2000),
34-
})
35-
return response.ok
36-
} catch {
37-
return false
38-
}
39-
}
40-
4128
// Load and cache HAR file
4229
async function loadHar(key: keyof typeof PAGES): Promise<Har> {
4330
if (harCache.has(key)) {
@@ -65,16 +52,6 @@ app.get('/', async (_req, res) => {
6552
const harDir = path.join(__dirname, 'har')
6653
const files = await fs.readdir(harDir)
6754
const harFiles = files.filter((file) => file.endsWith('.har'))
68-
const devServerRunning = await checkDevServer()
69-
70-
const devServerWarning = !devServerRunning
71-
? `
72-
<div style="background: #fff3cd; border: 1px solid #ffeaa7; border-radius: 6px; padding: 15px; margin-bottom: 20px;">
73-
<strong>⚠️ Warning:</strong> WXT dev server is not running on localhost:3000<br>
74-
<small>Gitcasso-enabled links won't work. Run <code>npm run dev</code> to start the server and <strong>then refresh this page</strong>.</small>
75-
</div>
76-
`
77-
: ''
7855

7956
const links = harFiles
8057
.map((file) => {
@@ -84,9 +61,7 @@ app.get('/', async (_req, res) => {
8461
<div style="margin-bottom: 10px; font-weight: bold; color: #555;">${basename}</div>
8562
<div style="display: flex; gap: 10px;">
8663
<a href="/har/${basename}/clean" style="flex: 1; text-align: center;">🔍 Clean</a>
87-
<a href="/har/${basename}/gitcasso" style="flex: 1; text-align: center; ${!devServerRunning ? 'opacity: 0.5; pointer-events: none;' : ''}">
88-
🚀 Gitcasso-enabled
89-
</a>
64+
<a href="/har/${basename}/gitcasso" style="flex: 1; text-align: center;">🚀 Gitcasso</a>
9065
</div>
9166
</li>
9267
`
@@ -124,7 +99,6 @@ app.get('/', async (_req, res) => {
12499
</head>
125100
<body>
126101
<h1>📄 HAR Page Viewer</h1>
127-
${devServerWarning}
128102
<p>Select a recorded page to view:</p>
129103
<ul>${links}</ul>
130104
</body>

0 commit comments

Comments
 (0)