Skip to content

Build the chat view before the first session opens - #2910

Draft
nortonandreev wants to merge 2 commits into
mainfrom
kcap-2735-prewarm-chat-view
Draft

nortonandreev wants to merge 2 commits into
mainfrom
kcap-2735-prewarm-chat-view

Conversation

@nortonandreev

@nortonandreev nortonandreev commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Closes #2735 — AI-5625

What & why

The first session opened after launch paid for building the chat view's styles and templates. A warm-up chat view now joins the window, transparent and keyboard-inert, for one frame after start-up, so those costs are paid before the first click. KCAP_APP_NO_PREWARM=1 turns it off for timing.

Where to look

Styles and templates apply only inside a visual tree, so the warm-up view cannot be built detached. Folded tool groups realize no call rows, so the warm-up opens its groups. Tab and find must not reach the warm-up's controls.

Verification

Tart VM (macOS 26, 4 vCPU, 4 GB), 13,505-event session, cold restart then idle, 3 rounds alternating builds. Transcript on screen, upper bound, median:

main this branch this branch, KCAP_APP_NO_PREWARM=1
First open 5.66 s 5.78 s 5.58 s

No gain measured in this guest. Here the open is dominated by reading the whole stream, which #2908 removes. The warm-up should be re-measured on top of that.

Styles and templates apply only inside a visual tree, so the warm-up chat joins the
window transparent for one frame instead of being built detached.
KCAP_APP_NO_PREWARM=1 skips it, for timing the cold path.
Tab and find reached the transparent view's controls, and its removal dropped
focus mid-typing. Folded tool groups realize no call rows, so groups are opened.
@coderabbitai

coderabbitai Bot commented Nov 18, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@github-actions

Copy link
Copy Markdown

Qodana for .NET

3 new problems were found

Inspection name Severity Problems
Conditional access qualifier expression is not null according to nullable reference types' annotations 🔶 Warning 1
Method has async overload ◽️ Notice 1
Use object or collection initializer when possible ◽️ Notice 1

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[App perf] Task 8 — Build the chat view before the first click

1 participant