Commit Graph

19 Commits

Author SHA1 Message Date
Mark IJbema 63b5b6895e fix: use --no-verify on visual regression baseline push to skip husky hooks 2026-03-17 11:41:57 +01:00
Imanol Maiztegui 4115c1d7b0 Visual regression tests for PermissionDock dropdown states (#7146)
* test(kilo-vscode): add screenshot tests for PermissionDock dropdown states

* ci: add stale baseline cleanup for permission-dock-dropdown snapshots

* test: set explicit 420×720 viewport in permission-dock-dropdown tests

* ci: guard permission-dock-dropdown cleanup against missing spec file

* ci: add deep glob for permission-dock-dropdown snapshot path filter

* fix: use dispatchEvent for all rule toggle clicks to bypass tooltip overlay

* chore: update kilo-vscode visual regression baselines

* fix(kilo-vscode): formatting

* ci: guard git add for permission-dock-dropdown snapshots with existence check

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-17 09:21:55 +01:00
kiloconnect[bot] 407b4dfd57 chore: remove unnecessary empty directory cleanup
Git doesn't track empty directories, so no need to rmdir after deleting stale PNGs.
2026-03-12 11:56:35 +00:00
kiloconnect[bot] 38f2fe6857 fix: use storybook index to detect stale baselines instead of timestamps
The timestamp approach incorrectly deleted valid baselines that Playwright
didn't rewrite (because they already matched). Instead, read the Storybook
index.json to compute the expected set of screenshot filenames, and only
remove baselines that don't correspond to any current story.
2026-03-12 11:53:50 +00:00
kiloconnect[bot] d29a267b03 fix: use timestamp-based stale screenshot detection instead of deleting all baselines
The previous approach of removing all baselines before regeneration caused
spurious changes because Playwright produces slightly different PNGs across
runs (within tolerance but different bytes). Also, skipped stories had their
baselines permanently deleted.

Instead, create a timestamp marker before the test run and delete only
screenshots that weren't touched by Playwright (i.e., stale baselines for
removed stories). This also reverts the spurious baseline changes from the
previous auto-commit.
2026-03-12 11:49:46 +00:00
kiloconnect[bot] c3d3aa61c9 fix: remove stale screenshots for deleted stories in visual regression CI
Remove all existing baseline screenshots before regenerating them so that
screenshots for removed stories don't persist indefinitely.
2026-03-12 11:30:23 +00:00
kiloconnect[bot] ad11479ff3 fix: use commit message check instead of re-running tests for loop prevention 2026-03-12 10:38:48 +00:00
kiloconnect[bot] f810586183 fix: prevent infinite loop in visual regression CI when screenshots are non-deterministic 2026-03-12 10:31:48 +00:00
kiloconnect[bot] 91454991d5 fix: update fork PR error message to direct contributors to Kilo developers 2026-03-09 10:32:52 +00:00
kiloconnect[bot] 8dcf7407e3 fix: skip auto-commit of visual regression screenshots for fork PRs 2026-03-09 10:24:13 +00:00
Mark IJbema 5272339c36 ci: use BOT_PAT instead of GITHUB_TOKEN for visual regression tests 2026-03-05 14:10:15 +01:00
Mark IJbema 06e4cb2add fix: use Kilo-Org/paths-filter fork 2026-03-05 11:52:00 +01:00
Mark IJbema cbcce5157d fix: explicit pull_request event types 2026-03-05 11:50:57 +01:00
Mark IJbema 01b70c0f41 fix: use dorny/paths-filter@v2 2026-03-05 11:49:51 +01:00
Mark IJbema 904b5bc930 ci: make visual regression workflow always run with path-based skip 2026-03-05 11:46:49 +01:00
Mark IJbema d1c1ce7df4 feat(vscode): add composite webview visual regression tests
Add Storybook + Playwright visual regression testing for the VS Code
extension's composite webview UI. This tests the full composition of
kilo-ui components with extension-specific contexts and styles.

- .storybook/ config with kilo-vscode theme defaults
- StoryProviders mock wrapper for DataProvider, SessionContext, etc.
- 7 composite stories: tool+permission, permission dock, tool cards,
  chat idle/busy, multi-tool assistant message
- Playwright config on port 6007 with auto-discovery
- CI workflow updated with parallel kilo-vscode visual regression job
- Exported SessionContext and LanguageContext for story use
2026-03-03 18:42:30 +01:00
Mark IJbema 984e05d8a0 fix: address review comments
- Add package.json to Storybook cache key (dep version changes invalidate cache)
- Add res.ok check before parsing Storybook index JSON
- Remove duplicate maxDiffPixelRatio (already in playwright.config.ts)
- Use parseInt for PLAYWRIGHT_WORKERS to handle non-numeric values
2026-03-02 15:43:11 +01:00
Mark IJbema b382c4e3ee fix: fail CI when visual regression baselines change
The workflow now:
1. Runs --update-snapshots to write new/changed baselines
2. Commits any changes back to the branch
3. Fails the job if baselines changed, so the PR author is notified

This avoids silently accepting visual changes — the author must pull
and review the updated baselines.
2026-03-02 15:43:11 +01:00
Mark IJbema 77609c35f6 feat: add visual regression tests for kilo-ui with Playwright
- Add @playwright/test, playwright.config.ts (Chromium, 1280x720)
- Test file auto-discovers all stories from Storybook's index.json
- Screenshots cropped to #storybook-root, grouped per component
- CI workflow on Blacksmith with Storybook/Playwright/Bun caching
- Paths filter: only runs when kilo-ui or its deps change
- Auto-commits missing baselines back to the branch via CI
- Skips head-only (Font, Favicon) and non-deterministic (Typewriter) stories
- Documented in CONTRIBUTING.md
2026-03-02 15:43:11 +01:00