Repository navigation
perf(web): reuse a collator when sorting changed-file trees - #23776
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a small, self-contained performance improvement that reuses a lazily initialized collator for existing changed-file tree sorting. Sorting semantics and existing application paths remain unchanged, with focused tests added for ordering behavior. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
## What's Changed * fix(server): avoid full shell read on resume by @Yash-Singh1 in pingdotgg/t3code#23987 * test: delete low-value tests and dead test-only exports by @t3dotgg in pingdotgg/t3code#24058 * test(server): restore DST scheduling tests deleted in the test snap by @t3dotgg in pingdotgg/t3code#23991 * test(web): restore project settings permission tests deleted in the test snap by @t3dotgg in pingdotgg/t3code#24011 * test(mobile): restore clipboard secret-redaction test deleted in the test snap by @t3dotgg in pingdotgg/t3code#23980 * fix(web): Cmd+B toggles the sidebar unless text is selected by @t3dotgg in pingdotgg/t3code#24063 * fix(server): agent-browser and Chrome no longer outlive the agent that started them by @josephv123 in pingdotgg/t3code#21299 * test(client-runtime): restore render scheduler tests deleted in the test snap by @t3dotgg in pingdotgg/t3code#23977 * fix(web): cmd+k search hides subagents and favors recent, whole-word matches by @t3dotgg in pingdotgg/t3code#24032 * test(lint): new polling loops in tests now fail lint by @t3dotgg in pingdotgg/t3code#23983 * ci: unused dependency patches fail in check:changed, not after push by @t3dotgg in pingdotgg/t3code#23988 * fix(desktop): PDFs in the preview can be annotated by @shivamhwp in pingdotgg/t3code#24022 * fix(web): instructed compact runs without a bare compaction first by @juliusmarminge in pingdotgg/t3code#24008 * fix(desktop): reduce app crashes when a preview tab's renderer dies during agent screenshots by @shivamhwp in pingdotgg/t3code#24056 * fix(server): Stop stops a thread's subagents again by @shivamhwp in pingdotgg/t3code#23886 * fix(desktop): a stuck quit no longer leaves the app unkillable by @shivamhwp in pingdotgg/t3code#23873 * fix(web): keep blockquote text readable in every theme by @Yash-Singh1 in pingdotgg/t3code#24036 * fix(bitbucket): stop the startup sweep from flooding Bitbucket with 429s by @shivamhwp in pingdotgg/t3code#23889 * fix(web): screen readers hear when the open thread starts, needs you or finishes by @shivamhwp in pingdotgg/t3code#23752 * perf(web): reduce allocations in streaming timeline scans by @UtkarshUsername in pingdotgg/t3code#23739 * perf(web): reuse a collator when sorting changed-file trees by @UtkarshUsername in pingdotgg/t3code#23776 * perf(scripts): check:changed finishes in about 10 s by @t3dotgg in pingdotgg/t3code#23581 **Full Changelog**: pingdotgg/t3code@v0.1.3-nightly.20261023.3566...v0.1.3-nightly.20261023.3579 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.1.3-nightly.20261023.3579
Problem
Changed-file cards repeatedly configure locale comparison while sorting file and directory names. Large changed-file lists spend most of their tree-building time in these comparisons.
Change
Create a collator on the first comparison and reuse it. Preserve the default locale, numeric sorting, base sensitivity, and stable ties. Lazy initialization keeps ICU setup off module import.
Scope and approval
Small, focused performance fix for redundant collation setup in the existing tree builder. The separate diff-review sorter already uses this approach (#18420).
Verification
vp run check:changed upstream/main: passed format, lint, knip, affected-package typechecks, and adjacent tests.Implemented with GPT-6.1 Sol (high) through Codex in T3 Code.