Skip to content

Hide app version from Argos snapshots#2441

Merged
hahn-kev merged 2 commits into
developfrom
claude/hide-version-argos-snapshots-132e5b
Jul 15, 2026
Merged

Hide app version from Argos snapshots#2441
hahn-kev merged 2 commits into
developfrom
claude/hide-version-argos-snapshots-132e5b

Conversation

@hahn-kev-bot

@hahn-kev-bot hahn-kev-bot commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Argos visual-regression snapshots (added in #1866) fail on every build because they capture the FW Lite version string in the sidebar footer — a per-build value like v2024-12-12-3073dd1c. The e2e-project-view-* snapshots are worst hit, since the E2E suite boots a real FwLiteWeb binary with a live version.

This hides the version during capture only, so both the E2E and UI suites stay stable.

What changed

  • ProjectSidebar.svelte — added data-testid="app-version" to the version <div> as a stable selector hook.
  • tests/helpers/argos-screenshot.ts — added argosCSS: '[data-testid="app-version"] { visibility: hidden; }' to defaultOptions. argosCSS is injected only during the screenshot; visibility: hidden preserves layout so surrounding elements don't shift. Placing it in defaultOptions covers both suites and any future snapshot through the shared helper.
  • tests/e2e/playwright.config.ts — changed use.screenshot from 'on' to 'only-on-failure'. Playwright's automatic end-of-test screenshot was being uploaded to Argos by the reporter under the test title (e.g. Project download: log in, download, and open the project.png), bypassing the argos-screenshot helper — so argosCSS never masked it and it still churned on the version. Those automatic captures also just duplicate the controlled e2e-* snapshots the tests already take, so they're dropped on passing runs. trace: 'on' still provides full step-by-step debugging, and failure screenshots are retained.

Test-side only — no backend or runtime-app changes.

Test plan

  • pnpm run lint — clean.
  • task test:ui-standalone -- project-view — all 4 snapshot tests pass; screenshots generated.
  • Visually inspected the generated project-view-default-light screenshot: the version line above "Made with ❤️" is blank and the footer sits at the same height (layout preserved).
  • E2E e2e-project-view-* snapshots can't run locally (need a kind cluster) — relying on CI.

Reviewer note

This produces a one-time set of expected Argos diffs to approve; after that both suites are stable.

  • UI suite — also renders this footer (with a hardcoded dev version), so its baselines change once: the version line goes blank at the same footer height (4 changed).
  • E2E suite — the explicit e2e-project-view-* snapshots go version-blank (4 changed), and the two redundant automatic screenshots (Project download… .png and the smoke test's) are removed (2 removed).

🤖 Generated with Claude Code

The version string (e.g. v2024-12-12-3073dd1c) is a per-build value
rendered in the sidebar footer, causing Argos visual-regression
snapshots to churn on every build (notably the e2e-project-view-*
snapshots, which boot a real FwLiteWeb binary with a live version).

Tag the version <div> with data-testid="app-version" and inject
argosCSS in the shared screenshot helper to hide it (visibility:hidden
so layout is preserved). Applied to defaultOptions so it covers both
the UI and E2E suites and any future snapshot. Test-side only; no
backend or runtime-app changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added the 💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related label Jul 15, 2026
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

App Version Stability

Layer / File(s) Summary
Version selector and screenshot styling
frontend/viewer/src/project/ProjectSidebar.svelte, frontend/viewer/tests/helpers/argos-screenshot.ts
The app-version footer receives a test identifier, and Argos screenshot CSS hides the element while preserving layout.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: hahn-kev

Poem

A rabbit hops through versions bright,
Then hides the footer out of sight.
Screenshots stay calm, snapshots neat,
While tiny test hooks make them sweet.
Hop, hop—stable builds complete!

🚥 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.
Title check ✅ Passed The title accurately summarizes the main change: hiding the app version in Argos snapshots.
Description check ✅ Passed The description is clearly related to the changeset and explains the snapshot-hiding behavior in detail.
✨ 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 claude/hide-version-argos-snapshots-132e5b

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@argos-ci

argos-ci Bot commented Jul 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 4 changed Jul 15, 2026, 2:11 AM
e2e (Inspect) ⚠️ Changes detected (Review) 4 changed, 2 removed Jul 15, 2026, 2:19 AM

Playwright's `screenshot: 'on'` takes an end-of-test screenshot that the
Argos reporter uploads under the test title (e.g. "Project download: log
in, download, and open the project.png"). These bypass the argos-screenshot
helper, so its argosCSS version-masking never applies and they churn on the
per-build app version. They also just duplicate the controlled e2e-* snapshots
the tests already take with masking, adding no coverage.

Switch to `screenshot: 'only-on-failure'` so passing runs no longer produce
(and upload) these redundant, version-churning captures. `trace: 'on'` still
provides full step-by-step debugging, and failure screenshots are retained.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hahn-kev
hahn-kev requested a review from myieye July 15, 2026 06:16
@hahn-kev

Copy link
Copy Markdown
Collaborator

@myieye notice we disabled some cases where we had screenshots, I think they were redundant anyway?

@myieye myieye left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good.

Yeah, I recently convinced you that only-on-failure was a tad better, but if it evades the argos fix that's an excellent reason to revert it. We should be explicitly taking screenshots of the things we want anyway.

@hahn-kev
hahn-kev merged commit 83ac31b into develop Jul 15, 2026
28 of 31 checks passed
@hahn-kev
hahn-kev deleted the claude/hide-version-argos-snapshots-132e5b branch July 15, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants