算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
comparing-branches-visually【设计与创意】Check out two branches in separate worktrees, start both dev servers on different ports, screenshot the same pages, and produce a visual diff.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Create a visual before/after comparison of UI changes between two branches.
Use best-of-n-runner subagents or git worktrees to run both branches simultaneously:
# Create a worktree for the base branch
git worktree add /tmp/branch-compare-base main
# The current working directory has the feature branch
Start the base branch server on a different port:
# In the base worktree
cd /tmp/branch-compare-base && PORT=3001 npm run dev
# Current branch is already on the default port (3000)
Determine which pages are affected by the changes:
git diff main --name-only | grep -E '\.(tsx?|jsx?|vue|svelte|css)'
Map changed files to their routes (e.g. app/dashboard/page.tsx → /dashboard).
For each affected page:
browser_navigate to http://localhost:3001/<page> (base branch)browser_take_screenshot → save as "before"browser_navigate to http://localhost:3000/<page> (feature branch)browser_take_screenshot → save as "after"Present the comparison:
Visual Diff: feature/redesign-header vs main
/dashboard:
Before: [screenshot from main]
After: [screenshot from feature branch]
Changes: Header height reduced, nav links repositioned, new avatar dropdown
/settings:
Before: [screenshot]
After: [screenshot]
Changes: No visual differences detected
# Stop the base branch server
# Remove the worktree
git worktree remove /tmp/branch-compare-base
screenshotting-changelog for PR descriptions