Skip to content

fix: preserve adaptive tab baselines in screenshot updates - #227

Merged
rdlabo merged 3 commits into
mainfrom
fix/screenshot-artifact-directories
Sep 27, 2026
Merged

rdlabo merged 3 commits into
mainfrom
fix/screenshot-artifact-directories

Conversation

@rdlabo

@rdlabo rdlabo commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

For PRs targeting main, the screenshot updater runs both screenshot.spec.ts and adaptive-tab-bar.spec.ts, but only uploads and commits the first suite's snapshots. Adaptive tab baselines therefore remain stale after /update-screenshots.

Include both snapshot directories in the artifact and preserve their relative paths when committing. Require and manage both directories for main, and only screenshot.spec.ts-snapshots for ios26, matching each base branch's update script. Reject missing or unexpected artifacts, and restrict stale-file deletion to the directories regenerated for that base branch.

Validation: YAML parsing, formatting, and git diff --check passed. Seven mocked executions of the workflow's commit script verified successful main and ios26 updates, scoped deletions, and rejection of missing, extra, empty, or invalid artifact contents. The ios26 case reproduced the reported failure before the fix.

This PR changes only the screenshot update workflow; the vertical tab feature and its baselines are in #226.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

Comment on lines +164 to 167
const directories = fs.readdirSync(artifactDirectory).sort();
if (directories.join('\n') !== [...snapshotDirectories].sort().join('\n')) {
core.setFailed('The screenshot artifact contains missing or unexpected directories.');
return;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 iOS 26 向け PR のスクリーンショット更新が失敗する

ios26 向け PR では、対象ブランチの更新スクリプトが通常の画像だけを生成します。adaptive-tab のディレクトリも必須とするため、iOS 26 の画像をコミットできません。

Learn more

このワークフローは main と ios26 の PR を受け付け、PR の対象ブランチから更新手順を読み込みます(更新手順の選択、スクリプトの実行)。ios26 ブランチの更新手順は screenshot.spec.ts だけを実行し、同ブランチには adaptive-tab-bar.spec.ts がありません。そのため、通常の ios26 PR の成果物には通常の画像ディレクトリしか含まれません。新しい検証が成果物内に両方のディレクトリを要求するので、更新後のコミット処理が必ず失敗します。

Example: ios26 を対象とし、通常のスクリーンショットだけを持つ PR で /update-screenshots を実行すると、更新手順は成功しても成果物には screenshot.spec.ts-snapshots しかありません。コミット処理は「missing or unexpected directories」で終了します。

Recommended fix: PR の対象ブランチで実行するテストと一致するディレクトリだけを必須にしてください。削除対象も、その実行で生成したディレクトリに限定してください。

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Playwright test results

passed  346 passed
flaky  3 flaky

Details

stats  349 tests across 20 suites
duration  4 minutes, 44 seconds
commit  db6497e
info  This detailed result covers Ionic 9 only. Ionic 8 runs against the same screenshots in a separate matrix job; check the workflow run for both results. To update the screenshots, comment with /update-screenshots.

Flaky tests

chromium › range-interaction.spec.ts › dual thumbs remain within their resting width at 100 in ltr
chromium › segment.spec.ts › selection motion follows native position and deformation milestones
chromium › tab-bar-motion.spec.ts › drag speed changes lens proportions and stopping rebounds to the held size

github-actions Bot added a commit that referenced this pull request Sep 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📊 Ionic 9 Playwright Test Report

View the detailed Ionic 9 report: https://rdlabo-dev.github.io/ionic-theme-ios27/pr-227/

Ionic 8 runs against the same screenshots in a separate matrix job. View both results in the workflow run.

github-actions Bot added a commit that referenced this pull request Sep 27, 2026
@rdlabo
rdlabo merged commit d6de94b into main Sep 27, 2026
11 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

npm beta published

CI passed for the merge commit d6de94b0c337. Install the immutable version with:

npm install @rdlabo/ionic-theme-ios27@1.2.0-beta.pr227.shad6de94b0c337

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant