Skip to content

test(ui-kit): rank-footer visual screenshots render at 5/3 scale on main since #3471 #3502

Closed

Description

@schlessera

Failure

The ready proof for #3491 (epic/1777-media-hygiene, which now contains main up to e6a417ba6) failed in browser (1) (run 41658433753, job 125999188587). #3491 changes no ui-kit file.

FAIL visual (chromium) tests/visual/rank-footer.visual.tsx > rank footer keeps keyboard phrases readable after reorder: dark, 320
Error: expect(element).toMatchScreenshot()
Screenshot does not match the stored reference.
Expected image dimensions to be 192×303px, but received 320×504px.
 ❯ tests/visual/rank-footer.visual.tsx:74:24

All four "after reorder" cases fail the same way:

  • dark 320 and light 320: 192×303 expected, 320×504 received;
  • dark 960 and light 960: 371×256 expected, 618×427 received.

That is a uniform ×1.667 scale. The four "arrows only" cases pass.

Suspected cause (unconfirmed)

The only recent main change to ui-kit's visual project is #3471 (#3281, StatusIndicator, b5598e253). It merged on the reduced-proof path, so its hosted browser proof never ran. It added:

  • tests/visual/status-indicator.visual.tsx, whose mount calls page.viewport(width, height) and sets document.documentElement.style.fontSize;
  • a statusCapture command;
  • a vitest.config.ts include.

One possibility is that the browser-level state these tests set (viewport, scale or root font size) leaks into later files in the same browser project. The other is that a token change in src/tokens.css changed the rank footer's geometry.

Acceptance criteria

  • Identify the actual cause, with evidence such as running rank-footer.visual.tsx alone and after status-indicator.visual.tsx, on main's tree, in the pinned image or Chromium 1243.
  • Fix the cause, not the baseline:
    • if it is leaked state, restore it in the leaking test's teardown;
    • only if the rank footer's rendering legitimately changed, update the references, with a visual review.
  • Record a mutation or failing-first receipt.
  • After the fix, rank-footer.visual.tsx and status-indicator.visual.tsx pass in either order.

Activity

  1. added
    type: fix
    area: ui-kit
    priority: p0
    agent-ready
    on Nov 3, 2026
  2. added this to the 0.45.0 milestone on Nov 3, 2026
  3. self-assigned this
    on Nov 3, 2026
  4. schlessera commented on Nov 3, 2026

    @schlessera
    OwnerAuthor

    Claiming (claim token wi-3502-ae47). Branch: fix/3502-visual-viewport-leak. Collision report: path collision with draft #3059 on packages/ui-kit/vitest.config.ts; closure-only reports otherwise.

  5. schlessera commented on Nov 3, 2026

    @schlessera
    OwnerAuthor

    Cause confirmed and fixed in draft #3508. formViewport returns the previous outer size, and #3471's teardowns passed it straight back, so the outer page grew 100×120 per test (1280×720 became 3080×2880). That removed Vitest's 0.6 iframe scale that the rank-footer references were taken at. Reproduced in the pinned image (status-indicator → rank-footer: 4 failed with the CI dimensions; rank-footer alone passes). After the fix, both orders pass 26/26. No reference changed.

  6. removed their assignment
    on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyarea: ui-kitpriority: p0type: fix

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions