fix(theme): dark theme + landing toggle now actually applies
build-and-publish / test (push) Has been cancelled
build-and-publish / image (push) Has been cancelled

Two bugs:
1. [data-theme="dark"] block was defined BEFORE :root in source CSS,
   so :root cascade overrode it. Moved to AFTER :root and bumped
   specificity to html[data-theme="dark"] to beat plain :root.
2. Theme toggle button only existed in the topbar, which is hidden
   on landing/login/sso-callback scenes. Added a ThemeToggle to
   the Landing header so users can flip theme from the home page.

Confidence: high
Scope-risk: narrow
This commit is contained in:
2026-06-14 11:52:02 +04:00
parent 6f8832d222
commit f1324b7539
7 changed files with 159 additions and 14 deletions
+17
View File
@@ -0,0 +1,17 @@
import { chromium } from "playwright";
const b = await chromium.launch({
headless: true,
args: ["--host-resolver-rules=MAP canvas.flow-master.ai 65.21.71.186", "--ignore-certificate-errors"],
});
const ctx = await b.newContext({ viewport: { width: 1440, height: 900 } });
const p = await ctx.newPage();
await p.goto("https://canvas.flow-master.ai/", { waitUntil: "networkidle" });
await p.waitForTimeout(1500);
await p.locator("input[type='email']").fill("dev@flow-master.ai");
const devBtn = p.locator("button", { hasText: /developer|dev-login/i });
if (await devBtn.count() > 0) await devBtn.click();
await p.waitForTimeout(3000);
console.log("topbar exists:", await p.locator(".topbar").count());
console.log("topbar HTML:");
console.log(await p.evaluate(() => document.querySelector(".topbar")?.outerHTML?.slice(0, 2000)));
await b.close();