Skip to content

Share session detail reads and reconcile interrupts from ranged reads - #2904

Draft
nortonandreev wants to merge 4 commits into
mainfrom
kcap-2729-shared-detail-read
Draft

nortonandreev wants to merge 4 commits into
mainfrom
kcap-2729-shared-detail-read

Conversation

@nortonandreev

Copy link
Copy Markdown
Contributor

Closes #2729 — AI-5619

What & why

Opening a session read /detail twice, the session's full event list both times, and /artefacts and /plan-artifacts twice each. Callers now share one in-flight detail read, and interrupt reconciliation reads /events in ranges instead of the full detail. The large-session open receives half the bytes it did.

Where to look

SessionInterruptLog: a session resumes under the same id, so an end clears only what is pending. The server's next_from counts events it withholds from the viewer, so reads follow it past empty pages. ArtefactsTabViewModel.RefreshUnlessReady re-reads when a grant arrives while a read is in flight.

Verification

Tart VM (macOS 26, 4 vCPU, 4 GB), local server, 13,505-event session, cold restart then 20 s idle, tools/app-perf/capture_open.sh (#2896), one run each:

main this branch
/detail requests 2 1
/artefacts, /plan-artifacts 2, 2 1, 1
Bytes received 3.80 MB 1.91 MB
Transcript on screen 3.87–4.00 s 3.05–3.19 s

…#2729)

A first reconcile still folds the stream from its first event: no route lists pending
interrupts, and one issued before any tail window stays pending until resolved.
…#2729)

The listing's word is not kept: a session it shows ended can be resumed, and only the
stream and summary are final.
…2729)

A session resumes under the same id, so an end only clears what was pending. The server's
next_from counts events it withholds from the viewer, so it is followed past empty pages.
@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
Access to modified captured variable 🔶 Warning 1
Duplicated sequential 'if' branches ◽️ Notice 1
Method supports cancellation ◽️ 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 2 — One detail read per session, shared

1 participant