Skip to content

ui-react: three rail pointer files resize the shared outer window and never give it back #3938

Open

Description

@schlessera

Context

commands.formViewport(width, height) resizes the outer browser window. That window is shared with every later file in the same Vitest project. Each layout and pointer file that calls it is expected to give the size back with formViewport(previous.width - 100, previous.height - 120); brand-placements.layout.tsx and activity-report.layout.tsx already do this. If a file never gives it back, the next file starts at that file's size, which changes the iframe's scale.

Three rail pointer files call it and never restore it:

  • packages/ui-react/tests/browser/phone-navigation.pointer.tsx:131
  • packages/ui-react/tests/browser/session-drafts.pointer.tsx:203
  • packages/ui-react/tests/browser/working-sessions.pointer.tsx:132

The test-health audit of shard e3855-ui-react-01 (#3855) fixed the same leak in desktop-navigation.pointer.tsx and destination-press.pointer.tsx. These three files were outside that audit's clusters.

Scope

In each of the three files:

  • Keep the first value formViewport returns.
  • Restore it in teardown, using the -100/-120 convention, so it runs even when the test fails.

Out of scope

  • The formViewport command itself.
  • Any other file.
  • Timeouts.

Acceptance criteria

  • Each of the three files restores the outer window in afterEach or afterAll.
  • Each file still passes in its pointer projects (node scripts/visual.mjs --filter=<file>).

Verification

Run git grep -n "formViewport(" packages/ui-react/tests/browser and pair every call with its restore. Then run the three files once each in the pinned image.

Contract impact

None.

Activity

  1. added
    type: test
    area: ui-react
    priority: p2
    agent-ready
    on Nov 10, 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-reactpriority: p2type: test

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions