From 67b2f61fdbad111f530b3745f1ac3008ad40cd0a Mon Sep 17 00:00:00 2001 From: YasserYG8 Date: Tue, 23 Jun 2026 05:25:56 +0100 Subject: [PATCH 1/2] fix(ci): resolve playwright timeout by pushing db schema --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 296299b..feb6409 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,6 +46,9 @@ jobs: - run: pnpm install --frozen-lockfile + - name: Push database schema + run: pnpm db:push + - name: Install Playwright Chromium Browser run: pnpm exec playwright install --with-deps chromium From 2f1aa68dce33be1a5b4e473015656d45af9069de Mon Sep 17 00:00:00 2001 From: YasserYG8 Date: Tue, 23 Jun 2026 05:42:05 +0100 Subject: [PATCH 2/2] style : run Prettier to fix formatting --- e2e/smoke.spec.ts | 16 ++++++++++++---- src/components/layout/ThemeToggle.tsx | 2 +- src/lib/use-theme.ts | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/e2e/smoke.spec.ts b/e2e/smoke.spec.ts index c434d8d..3736f0a 100644 --- a/e2e/smoke.spec.ts +++ b/e2e/smoke.spec.ts @@ -1,6 +1,8 @@ import { test, expect } from "@playwright/test"; -test("should load app, click analyze on default snippet, and render call graph nodes", async ({ page }) => { +test("should load app, click analyze on default snippet, and render call graph nodes", async ({ + page, +}) => { // 1. Visit the app in English locale await page.goto("/en/app"); @@ -22,7 +24,13 @@ test("should load app, click analyze on default snippet, and render call graph n await expect(nodes).toHaveCount(6); // 6. Verify key node labels contain our function names and container file - await expect(page.locator(".react-flow__node", { hasText: "snippet.py" })).toBeVisible(); - await expect(page.locator(".react-flow__node", { hasText: "main" })).toBeVisible(); - await expect(page.locator(".react-flow__node", { hasText: "clean" })).toBeVisible(); + await expect( + page.locator(".react-flow__node", { hasText: "snippet.py" }), + ).toBeVisible(); + await expect( + page.locator(".react-flow__node", { hasText: "main" }), + ).toBeVisible(); + await expect( + page.locator(".react-flow__node", { hasText: "clean" }), + ).toBeVisible(); }); diff --git a/src/components/layout/ThemeToggle.tsx b/src/components/layout/ThemeToggle.tsx index 7ef8435..c071f15 100644 --- a/src/components/layout/ThemeToggle.tsx +++ b/src/components/layout/ThemeToggle.tsx @@ -9,7 +9,7 @@ export default function ThemeToggle() { const next = !isDark; document.documentElement.classList.toggle("dark", next); localStorage.setItem("theme", next ? "dark" : "light"); - + // let it sync with cookies directly document.cookie = `theme=${next ? "dark" : "light"}; path=/; max-age=31536000; SameSite=Lax`; }; diff --git a/src/lib/use-theme.ts b/src/lib/use-theme.ts index c2afc8d..f947cb3 100644 --- a/src/lib/use-theme.ts +++ b/src/lib/use-theme.ts @@ -20,4 +20,4 @@ export function useIsDark() { () => document.documentElement.classList.contains("dark"), () => false, ); -} \ No newline at end of file +}