feat(layout): finalize p01 and p02 changes

Complete UI foundation and app layout implementation, stabilize container health checks, and archive both OpenSpec changes after verification.
This commit is contained in:
2026-02-18 16:12:11 -05:00
parent cdfb15bbfd
commit 493cb78173
47 changed files with 1400 additions and 283 deletions

View File

@@ -0,0 +1,37 @@
import { expect, test } from '@playwright/test';
async function expectTheme(page: import('@playwright/test').Page, theme: 'light' | 'dark') {
await expect
.poll(async () =>
page.evaluate(() => ({
attr: document.documentElement.getAttribute('data-theme'),
stored: localStorage.getItem('headroom_theme')
}))
)
.toEqual({ attr: theme, stored: theme });
}
test.describe('Theme persistence', () => {
test('applies dark theme from localStorage on reload', async ({ page }) => {
await page.goto('/login');
await page.evaluate(() => {
localStorage.setItem('headroom_theme', 'dark');
});
await page.reload();
await expectTheme(page, 'dark');
});
test('applies light theme from localStorage on reload', async ({ page }) => {
await page.goto('/login');
await page.evaluate(() => {
localStorage.setItem('headroom_theme', 'light');
});
await page.reload();
await expectTheme(page, 'light');
});
});