Skip to content

[Test Regression] browse/test/sidebar-ux.test.ts — 73 failures on main (pickSidebarModel / ANALYSIS_WORDS missing) #1980

Closed

Description

@RagavRida

Summary

Running bun test browse/test/sidebar-ux.test.ts on the current main branch (a5833c41 — v1.57.10.0) produces 73 failures and 4 errors out of 176 tests.

Reproduction

git checkout main   # a5833c41
bun test browse/test/sidebar-ux.test.ts
# → 103 pass, 73 fail, 4 errors

Confirmed on macOS (Apple Silicon). These failures exist on upstream/main before any branch changes are applied.

Failure clusters

1. pickSidebarModel routing

error: expect(received).toBeGreaterThan(expected)
Expected: > 0   Received: -1

at sidebar-ux.test.ts:1665 — routerFn.indexOf('ANALYSIS_WORDS')

The test extracts pickSidebarModel from server.ts and checks the source contains ANALYSIS_WORDS / ACTION_PATTERNS. Both are absent from the current output — indexOf returns -1.

2. LLM-based cleanup prompts — 4 tests fail

3. Sidebar arrow hint / tool_use collapse / idle timeout / shutdown — ~15 tests fail

Suspected cause

The Codex review default-on PR (#1966, v1.57.10.0) likely refactored or inlined ANALYSIS_WORDS / ACTION_PATTERNS in browse/src/server.ts. Tests at lines 1651–1690 still expect those symbol names to appear literally in the extracted function source.

Impact

  • bun test gives a dirty run on main — blocks contributors from knowing if their PR introduced new failures
  • Makes it hard to bisect regressions

Ask

  1. Confirm if this is already tracked
  2. If the refactor was intentional — update tests to match the new structure
  3. If not — restore the constants or fix the extraction logic

Happy to send a patch once the fix direction is confirmed.

Activity

  1. RagavRida commented on Jun 11, 2026

    @RagavRida
    ContributorAuthor

    Additional finding: the report job in evals.yml also fails for all fork PRs with GraphQL: Resource not accessible by integration (addComment) — the gh pr comment call needs a pull-requests: write token that fork PRs don't receive. Easiest fix is gating the step:

    if: github.event.pull_request.head.repo.full_name == github.repository

    This is separate from the sidebar-ux test failures but also affects contributor experience.

  2. RagavRida commented on Jun 11, 2026

    @RagavRida
    ContributorAuthor

    Third finding (now that Playwright is installed): design/test/feedback-roundtrip.test.ts — 6/6 fail with:

    TypeError: session.clearLoadedHtml is not a function
      at handleWriteCommand (browse/src/write-commands.ts:150)
      at feedback-roundtrip.test.ts:140
    

    Root cause: handleWriteCommand signature is:

    // write-commands.ts:132
    export async function handleWriteCommand(
      command: string,
      args: string[],
      session: TabSession,   // ← expects TabSession
      bm: BrowserManager
    )

    But the test calls it as:

    await handleWriteCommand('goto', [baseUrl], bm);  // ← passes BrowserManager as session

    The test was written before TabSession became a distinct type (previously the two were interchangeable). The fix is to get a TabSession from bm before calling the command, or update the test to use bm.getCurrentSession() / similar.

    Confirmed pre-existing on upstream/main (a5833c4) — fails with identical output before any branch changes.

  3. time-attack commented on Jul 15, 2026

    @time-attack
    Contributor

    @RagavRida Please rewrite this issue around removing or replacing the stale 1,669-line test, since production no longer contains the chat queue and model router it exercises.

  4. capy-ai commented on Oct 3, 2026

    @capy-ai
    Contributor

    The stale model-router assertions were removed. On v1.91.16.0, bun test browse/test/sidebar-ux.test.ts passes 102/102 and design/test/feedback-roundtrip.test.ts passes 6/6, and the eval report step only runs for same-repo PRs.

    Fixed in v1.64.0.0 (#2571).
    If you still see this on the latest gstack, please reopen with details.

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