Skip to content

Dictation browser test leaves word wrap off for later browser tests #40203

Done

Description

@Alb11747

apps/web/src/speech/useEnvironmentSpeechInput.browser.test.tsx has a cross-window grant test that calls writeBrowserClientSettings({ ...DEFAULT_CLIENT_SETTINGS, wordWrap: false }) and never restores the previous settings. Browser test files share one Chromium storage, so a test file that runs later in the same session inherits wordWrap: false.

FilePreviewPanel.browser.test.tsx is one such file. Its source-scroll cases expect wrapped lines, so they fail depending on test order. Running the two files serially in one Chromium context reproduces it every time: both FilePreviewPanel assertions fail. With the settings entry restored at the end of the dictation test, all 57 tests in that order pass.

Upstream CI shows what is likely the same failure: FilePreviewPanel.browser.test.tsx > source file scroll > keeps an upward drag whose anchor unmounts… failed with expected 'markdown content\nline 276 …' to contain 'line 385 ' in https://github.com/pingdotgg/t3code/actions/runs/44722771762/job/136242527350.

Fix: save the client-settings storage entry before the test and restore it (or remove it if there was none) in the finally block.

Activity

  1. juliusmarminge commented on Dec 1, 2026

    @juliusmarminge
    Member

    Fixed by #46820, now on main: Browser setup now clears localStorage before every browser test file loads, so running the dictation file before FilePreviewPanel no longer carries wordWrap: false into its source-scroll tests.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions