Skip to content

Open a remote session from its last 300 events - #2908

Draft
nortonandreev wants to merge 3 commits into
mainfrom
kcap-2728-tail-open
Draft

nortonandreev wants to merge 3 commits into
mainfrom
kcap-2728-tail-open

Conversation

@nortonandreev

Copy link
Copy Markdown
Contributor

Closes #2728 — AI-5618

What & why

Opening a remote session read its whole event stream before showing anything: 13,505 events took about 5.7 s in the guest. The chat now opens from the last 300 events, then tails live from there. Scrolling to the top pages in older events, and the viewport stays on the row being read.

Where to look

  • The events route's from counts from the oldest event the stream still holds, not by event number, so a one-event probe finds where the window starts. That makes two /events requests on a first open.
  • A live session keeps paging back to its start after the first paint, so a run that started before the window stays visible. An ended session pages only as the reader scrolls.

Verification

Tart VM (macOS 26, 4 vCPU, 4 GB), local server, 13,505-event session, cold restart then idle, 3 rounds alternating builds (tools/app-perf/view_load.sh, #2896). Transcript on screen, upper bound of the frame range, median:

main this branch
First open 5.66 s 1.68 s
Reopen after another session 3.49 s 0.44 s
/events bytes on open full stream 44 KB

One 1.9 MB /detail read for the work-context pane remains; #2904 removes its duplicate.

The events route's from counts past the oldest event the stream still holds, so a one-event
probe finds the window's start. An older page that would turn a loaded line into a scheduled
prompt re-reads everything loaded; the rail's run monitor still reads the whole session.
A page's results, plan publishes, question answers and prompts can sit after the call that
needs them, and the stream's count moves when its oldest events age out.
)

A live session's runs can start before the window, so it keeps paging after the first paint;
an ended session pages only as the reader scrolls.
@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

5 new problems were found

Inspection name Severity Problems
Access to disposed captured variable 🔶 Warning 2
Redundant argument with default value 🔶 Warning 1
Redundant name qualifier 🔶 Warning 1
'if-return' statement can be rewritten as 'return' statement ◽️ 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 1 — Open a session from its tail

1 participant