For Agents
18 pages across Tutorials, How-To, Reference, Explanation
Documentation for reproducing screenshots and visual verification tests. Essential for regression testing after CSS changes or UI updates.
https://help.l.homestar.inkPurpose: Verify code blocks have proper contrast in dark mode
Page: Properties API Reference
https://help.l.homestar.ink/reference/properties/What to verify:
Playwright automation:
await browser_navigate({ url: "https://help.l.homestar.ink/reference/properties/"});// Toggle dark mode firstawait browser_take_screenshot({ filename: "dark-mode-code-blocks.png"});Purpose: Verify code blocks have proper contrast in light mode
Same page as dark mode test
https://help.l.homestar.ink/reference/properties/What to verify:
Location: docs/visual-tests/
Directory structure:
docs/visual-tests/├── baseline/ # Known-good reference screenshots│ ├── dark-mode/│ │ ├── code-blocks-reference.png│ │ ├── sidebar-navigation.png│ │ └── admin-dashboard.png│ └── light-mode/│ ├── code-blocks-reference.png│ └── sidebar-navigation.png├── comparison/ # Screenshots from feature branches│ └── [branch-name]/│ ├── dark-mode/│ └── light-mode/└── diffs/ # Generated diff images └── [test-name].diff.pngNaming convention: [feature]-[section].png
Purpose: Verify all pages load without errors after content reorganization
Sections (68 total pages):
For Agents
18 pages across Tutorials, How-To, Reference, Explanation
For Brokers
6 pages across Tutorials, How-To, Reference, Explanation
For Admins
10 pages across How-To, Reference, Explanation
Features
9 pages (Explanations, How-Tos, Reference)
Reference
13 pages (API docs, technical specs)
Development
11 pages (developer guides)
Automated verification pattern:
// Batch verification (3-5 pages at a time)const pages = [ "agents/tutorials/first-week", "agents/how-to/respond-to-leads", "agents/reference/dashboard", "brokers/how-to/configure-brokerage", "admins/reference/api-key-reference"];
for (const slug of pages) { await browser_navigate({ url: `https://help.l.homestar.ink/${slug}/` }); // Verify page loads without MDXError or 500 // Check browser console for errors}git checkout maindocs/visual-tests/baseline/{dark,light}-mode/git checkout feature/new-stylesdocs/visual-tests/comparison/[branch-name]/When modifying MDX content or adding new pages:
pnpm buildRecommended tools:
| Tool | Use Case | Integration |
|---|---|---|
| Percy | Visual regression SaaS | GitHub Actions |
| Playwright Visual Comparisons | Built-in screenshot diffing | CI/CD pipeline |
| Chromatic | Storybook integration | Component testing |
Example Playwright test:
import { test, expect } from '@playwright/test';
test('code blocks have dark backgrounds', async ({ page }) => { await page.goto('https://help.l.homestar.ink/reference/properties/');
// Toggle dark mode await page.locator('[data-theme-toggle]').click(); await page.waitForTimeout(300); // Theme transition
// Compare screenshot await expect(page).toHaveScreenshot('dark-code-blocks.png', { fullPage: true, animations: 'disabled' });});
test('code blocks have light backgrounds', async ({ page }) => { await page.goto('https://help.l.homestar.ink/reference/properties/');
// Ensure light mode await page.locator('[data-theme-toggle]').click(); await page.waitForTimeout(300);
await expect(page).toHaveScreenshot('light-code-blocks.png', { fullPage: true });});Cause: Font loading timing
Solution: Add await page.waitForLoadState('networkidle') before screenshot
Cause: Theme toggle not waited for
Solution: Add explicit wait: await page.waitForTimeout(300)
Cause: Lazy loading or scroll restoration
Solution: Use fullPage: true option or disable scroll restoration
Cause: Different color profiles or gamma settings Solution: Ensure consistent browser profile, disable GPU rasterization
# Start dev servercd idx-docs && pnpm dev
# Build production (validates links)pnpm build
# Run visual tests (when configured)pnpm test:visual
# Update baseline snapshotspnpm test:visual --update-snapshots
# Generate HTML reportpnpm test:visual --reporter=html| Task | Frequency | Owner |
|---|---|---|
| Review screenshots | After every CSS change | Developer |
| Update baselines | When design changes intentional | Design lead |
| Archive old screenshots | Monthly | DevOps |
| Audit broken screenshots | Weekly | QA |
When verifying visual changes, test both modes:
Dark Mode (data-theme='dark'):
Light Mode (default):