Skip to content
Source
Sign inSign up
pingdotgg/t3code

perf(web): reuse Issues rows when switching selection #39401

OpenAdamulek123(GitHub profile, opens in a new tab)wants to merge 6 commits intomain fromrefs/pull/39401/headopened View on GitHub

Adamulek123(GitHub profile, opens in a new tab)commented

Problem

In a workspace with many issue scopes, opening an issue or switching the selected row rebuilds every grouped list entry. The detail pane updates the route's search state, which also changes the callback passed to every memoized row.

Change

Keep the list projection with the pagination state so the React Compiler can reuse it until the answers, filters, or continuation pages change. The existing stable callback hook keeps each row's click handler current as selection changes.

The merge preserves upstream project exclusions and keeps equivalent route filters stable when the selected issue changes.

Scope

This fixes selection lag in the existing web Issues list. The fixture below reproduces the lag and verifies the fix in the same route, so a separate issue is unnecessary.

Verification

Compared production builds 8d1f3d46dcb1 and b8bed397ed28 in the 1280 × 800 T3 Browser panel. The server read 2,400 issues from 48 synthetic Linear scopes over the normal WebSocket path. Selection timing ends when the selected row and URL agree. Refresh timing ends when the control becomes available again.

ActionRuns per revisionMain median (range)PR median (range)
Switch between loaded issues877.3 ms (67.9–91.8)44.4 ms (26.2–66.1)
Refresh5430.6 ms (393.9–445.1)455.4 ms (410.2–523.3)
Reload until all rows and the first icon are ready71,843.5 ms (1,792.5–2,035.4)1,939.5 ms (1,726.3–2,088.3)

Selection was 43% faster. Reload and refresh medians were 5% and 6% slower, respectively. Both builds mounted 45,661 list elements and retained selection across refresh. The merge preserves project exclusions, hover prefetching, and guards against continuations from an obsolete list.

Production build, web typecheck, scoped formatting and lint, and 11 focused tests passed. The captures open the same issue in both builds.

MainPR
Main opens the offscreen issueIssue selected on the PR

Main recording

https://github.com/user-attachments/assets/3735d2d3-cbd6-4b31-84db-f7d34e5bbce6

PR recording

https://github.com/user-attachments/assets/0d1a4aae-c4b0-4eea-96a5-3456571ffc98

Built by GPT-6.2 Sol in Codex.

    1. Pushedb8bed39

    2. Approvability

      Verdict: Approved at b8bed39

      Macroscope's review found this PR approvable — This refactors Issues row grouping and stabilizes selection-related references to support row reuse. Existing filtering, pagination and selection behavior remain unchanged, with no material operational or data exposure added.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).

Sign in to join this conversation.