Skip to content

[Task] Harden session-scroll-reading perf scenario: thin coverage misses real-world stutter #633

@Astro-Han

Description

@Astro-Han

Goal

The session-scroll-reading perf scenario at packages/app/e2e/perf/perf-probe.spec.ts:470-509 actually exercises the user-visible "scroll stutter" experience and can serve as the regression gate for the core scrolling path tracked under #615. Today it does not — the seeded content is too small, the scroll distance covers only half the timeline, and the input cadence does not resemble real trackpad usage.

Scope

In scope:

  • Expand session-scroll-reading to a full-distance round trip (top → bottom → top, covering ≥95% of timeline length).
  • Add trackpad-cadence emulation: a 60Hz small-step wheel stream, distinct from the current single large-jump wheel.
  • Seed heterogeneous content (tool rows with open/closed states, code blocks, reasoning blocks, long user messages) instead of uniform text.
  • Add a long-session variant (100 / 200 / 500 messages) measured separately.
  • Add a sustained-scroll variant: 5+ seconds of continuous wheel events, sampling main-thread long-frame distribution.
  • Optional: a concurrent-load variant that scrolls while shimmer animation is running.

Out of scope:

  • Fixing the underlying perf root causes — virtualization, createMemo overuse, ScrollView throttling, content-visibility / contain-intrinsic-size sizing, scroll state-machine depth. Those are tracked in [Bug] Session UI typing lag and scroll stuttering #615.
  • Changing user-visible UI behavior.
  • Touching unrelated perf scenarios.

Relevant files or context

Likely files:

  • packages/app/e2e/perf/perf-probe.spec.ts (scenario implementation)
  • packages/app/e2e/perf/profiles.ts (profile gating / threshold registration)
  • packages/opencode/test/lib/llm-server.ts (heterogeneous fixture support if needed)

Related issues / PRs:

Background signal: hand-test feedback on PR #631 surfaced INP ~200ms on trackpad scrolling that the current session-scroll-reading scenario does not trigger.

Verification

Execution mode

Agent should investigate and propose a plan first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low priorityappApplication behavior and product flowstaskNarrow execution, audit, spike, migration, tracking, or upstream follow-up work

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions