Skip to content

Replaced visual regression PR comment with hide-and-recreate behavior.#2537

Merged
AlexSkrypnyk merged 3 commits into
mainfrom
feature/vr-sticky-recreate
Jun 1, 2026
Merged

Replaced visual regression PR comment with hide-and-recreate behavior.#2537
AlexSkrypnyk merged 3 commits into
mainfrom
feature/vr-sticky-recreate

Conversation

@AlexSkrypnyk
Copy link
Copy Markdown
Member

@AlexSkrypnyk AlexSkrypnyk commented Jun 1, 2026

Summary

Added hide_and_recreate: true to the marocchino/sticky-pull-request-comment step in the vr-report job of the visual regression workflow. This ensures every new VR comparison posts a fresh PR comment rather than silently editing the existing one - making it immediately visible when a new comparison run has occurred. Hardened the .vortex/CLAUDE.md snapshot update rules to prevent wrapper-script workarounds, and refreshed the installer fixture to match the updated template.

Changes

.github/workflows/test-vr.yml - Added hide_and_recreate: true to the sticky PR comment step so each VR comparison run hides the previous comment and creates a new one, mirroring the behavior already used by the coverage comment in build-test-deploy.yml.

.vortex/CLAUDE.md - Added a HARD RULE block forbidding any indirection (wrapper scripts, heredocs, temp files, bash -c strings) around ahoy update-snapshots. The only accepted alternative when cd cannot persist is ahoy --file .vortex/.ahoy.yml update-snapshots using the ahoy pointer flag directly.

.vortex/installer/tests/Fixtures/handler_process/visual_regression_enabled/.github/workflows/test-vr.yml - Refreshed installer fixture to reflect the hide_and_recreate: true addition in the template workflow.

Before / After

BEFORE
──────
vr-report job
  └─ marocchino/sticky-pull-request-comment
       message: "..."
       (no hide_and_recreate)
       → edits the same comment in-place on every run
         (edit is invisible to reviewers watching the PR)

AFTER
─────
vr-report job
  └─ marocchino/sticky-pull-request-comment
       message: "..."
       hide_and_recreate: true
       → hides the old comment, posts a fresh one on every run
         (fresh comment triggers a notification / appears at top)

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 1, 2026

Review Change Stack

Walkthrough

This PR contains two independent updates: a GitHub Actions workflow configuration change enabling sticky comment recreation on subsequent runs, and a maintenance documentation update clarifying constraints on wrapping ahoy update-snapshots commands with explanations of acceptable alternatives.

Changes

CI Sticky Comment Lifecycle

Layer / File(s) Summary
Sticky comment action configuration
.github/workflows/test-vr.yml
The "Post sticky PR comment" step is updated to pass hide_and_recreate: true to the sticky-pull-request-comment action, changing how the action manages the comment lifecycle on subsequent runs.

Maintenance Documentation for ahoy

Layer / File(s) Summary
ahoy command indirection restrictions
.vortex/CLAUDE.md
A new "hard rule" is added clarifying that ahoy update-snapshots must never be wrapped in helper scripts, heredocs, temp files, bash -c, or other indirection mechanisms, with guidance on using ahoy --file .vortex/.ahoy.yml as the acceptable alternative when direct cd .vortex handling is constrained.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A rabbit hops through workflows with care,
Sticky comments dance in the CI air,
And in the docs, a rule now stands clear—
ahoy must run free, no wrappers here! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Replaced visual regression PR comment with hide-and-recreate behavior' directly describes the main change: adding hide_and_recreate functionality to the VR PR comment step in the workflow.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/vr-sticky-recreate

Comment @coderabbitai help to get the list of available commands and usage tips.

@AlexSkrypnyk AlexSkrypnyk changed the title Replaced visual regression PR comment instead of editing it on every run. Replaced visual regression PR comment with hide-and-recreate behavior. Jun 1, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   98.53% (201/204)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk

This comment has been minimized.

2 similar comments
@AlexSkrypnyk

This comment has been minimized.

@AlexSkrypnyk
Copy link
Copy Markdown
Member Author

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   98.53% (201/204)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.11%. Comparing base (40cdb1b) to head (74f058c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2537      +/-   ##
==========================================
- Coverage   86.56%   86.11%   -0.46%     
==========================================
  Files          94       87       -7     
  Lines        4660     4501     -159     
  Branches       47        3      -44     
==========================================
- Hits         4034     3876     -158     
+ Misses        626      625       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

Status: Released in 1.39.0

Development

Successfully merging this pull request may close these issues.

1 participant