fix(ui): reduce sessions list refresh cost#77057
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. This PR is now superseded: the Control UI refresh bound landed in a broader responsiveness fix, and the remaining session-row resolver/isCliProvider hotspot was addressed by a later scoped sessions.list resolver cache that avoids this branch's process-wide invalidation problem. So I’m closing this here and keeping the remaining discussion on the canonical linked item. Review detailsBest possible solution: Keep the merged scoped-cache and Control UI responsiveness fixes, and do not merge this superseded branch's process-wide cache. Do we have a high-confidence way to reproduce the issue? Yes for the code path, without rerunning a live large-store benchmark in this review. The current source and the merged #77187 proof show sessions.list row building repeatedly reached resolver/isCliProvider work on large stores. Is this the best way to solve the issue? No, this PR is no longer the best way to solve it. The safer solution is the merged per-sessions.list scoped resolver cache from #77187 plus the already-merged Control UI refresh bound from #80657. Security review: Security review cleared: The diff only changes local TypeScript UI/model-selection code and tests, with no dependency, workflow, permission, secret, package-script, or artifact execution changes. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 5d4a8b00721a; fix evidence: commit e4cee2eb697f, main fix timestamp 2026-05-14T04:20:40Z. |
|
Overlap triage after #80657: #80657 covers the Control UI chat-final session refresh part by bounding it to a recent scoped window ( Recommended split path: keep or recreate the CLI-provider cache change as its own focused PR, and drop the Control UI session-refresh hunk from this branch once #80657 lands. |
Summary
isCliProviderresults by normalized provider and configured CLI backend keysFixes #77056. Related to #76562.
Why
On a Control UI instance with a large session store, normal chat completion refreshes were putting avoidable pressure on
sessions.list. Local diagnostics showed repeated CLI-provider classification during row building and overly broad chat-side session refresh windows as meaningful contributors.This keeps the explicit Sessions page/search flows intact while making the routine chat-turn refresh cheaper.
Testing
git diff --checknpm test -- --runInBand src/agents/model-selection.test.ts ui/src/ui/app-gateway.sessions.node.test.tscould not run in this local worktree because dependencies are not installed (Cannot find module 'vitest/package.json').