fix(dashboards): prevent render loops with stable ready handlers and idempotent updates; improve filter hydration guards

fix(export): return 501 with hint when Playwright browsers missing; nicer error toast in UI

fix(site-header): export primary/secondary buttons as named for SC safety; keep static props for compat

fix(portal): add DialogDescription for a11y; tidy preview dialog

fix(csats): avoid reinit state loops with timestamp guard

chore(prisma): default dev DB to prisma/db.dev.sqlite and log path

chore(auth): add dev bypass flags wiring (server/client) for local testing

dev: seed script for Convex demo data
This commit is contained in:
Esdras Renan 2025-11-06 00:01:45 -03:00
parent ff0254df18
commit b62e14d8eb
13 changed files with 210 additions and 103 deletions

View file

@ -31,7 +31,23 @@ export async function POST(request: Request) {
let browser: Awaited<ReturnType<typeof chromium.launch>> | null = null
try {
browser = await chromium.launch()
try {
browser = await chromium.launch({ headless: true })
} catch (launchError) {
const msg = (launchError as Error)?.message || String(launchError)
// Dev-friendly response when Playwright browsers are missing
if (/Executable doesn't exist|Please run the following command to download new browsers/i.test(msg)) {
return NextResponse.json(
{
error: "Playwright browsers not installed",
hint: "Execute: npx playwright install",
details: msg,
},
{ status: 501 },
)
}
throw launchError
}
const page = await browser.newPage({ viewport: { width, height } })
await page.goto(payload.url, { waitUntil: "networkidle" })
if (waitForSelector) {