Skip to content

perf: warm lazy surfaces, lighter remote snapshots and cheaper streaming - #18979

Open
maria-rcks wants to merge 74 commits into
t3/perf-wave3from
t3/perf-wave4
Open

maria-rcks wants to merge 74 commits into
t3/perf-wave3from
t3/perf-wave4

Conversation

@maria-rcks

@maria-rcks maria-rcks commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

stacked on #18220. this diff shows only this layer.

before: switching threads paints the new title over the previous conversation
after: the title and conversation switch together

terminal and diff assets warm before use and reveal without the suspense fallback delay. plain single-line streams skip markdown tokenization, and composer key handling reuses cursor bounds. shell snapshots share repeated pull request lists, reconnects resume synchronized state, and thread switches stop showing the previous conversation under a new title.

historical medians of five linux/chromium runs before trimming:

metric before after
terminal first use 504.9 ms 200.6 ms
plain-text stream, main-thread work per batch 44.6 ms 10.9 ms
typing a 50 kb draft, script per key 4.94 ms 3.33 ms

the trim recheck kept terminal first use at 198.7 → 194.9 ms. slow-link parity remains unverified: at 5 mbit/s, editable-composer medians rose 4,883 → 5,258 ms and reconnect 3,834 → 3,923 ms, with broad overlapping ranges.

model: claude-opus-5-5 coordinating gpt-6.1-sol subagents, harness: claude code in t3 code.

@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Oct 13, 2026
@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 13, 2026
@github-actions github-actions Bot added the size:XL 500-999 changed lines (additions + deletions). label Oct 13, 2026
Comment thread apps/server/src/telemetry/AnalyticsService.ts Outdated
# Conflicts:
#	apps/server/src/orchestration-v2/ProjectionStore.test.ts
#	apps/server/src/orchestration-v2/ThreadReadPayload.ts
#	apps/server/src/orchestration-v2/http.ts
#	apps/web/src/components/ChatMarkdown.tsx
#	apps/web/src/components/CommandPaletteHost.tsx
#	apps/web/src/components/ComposerPromptEditorTiptap.tsx
#	apps/web/src/components/chat/useComposerMultilinePrompt.ts
#	apps/web/src/markdown-incremental.test.tsx
#	packages/client-runtime/src/state/shell-sync.test.ts
@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). and removed size:XL 500-999 changed lines (additions + deletions). labels Oct 15, 2026

const loadShellSnapshot = Effect.fn("http.orchestration.loadShellSnapshot")(function* (
compactPullRequests: boolean,
deduplicatePullRequests: boolean,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium orchestration-v2/http.ts:80

When deduplicatePullRequests is true, shellSnapshot still returns every thread’s pull-request list in full, so clients receive none of the requested pullRequestReference savings. The parameter is accepted by loadShellSnapshot but never used; apply the reference transformation to the snapshot before returning it.

🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file @apps/server/src/orchestration-v2/http.ts around line 80:

When `deduplicatePullRequests` is `true`, `shellSnapshot` still returns every thread’s pull-request list in full, so clients receive none of the requested `pullRequestReference` savings. The parameter is accepted by `loadShellSnapshot` but never used; apply the reference transformation to the snapshot before returning it.

# Conflicts:
#	apps/server/src/orchestration-v2/ProjectionStore.ts
#	apps/server/src/telemetry/AnalyticsService.test.ts
#	apps/web/src/components/Sidebar.logic.ts
#	apps/web/src/components/Sidebar.tsx
#	apps/web/src/components/chat/V2ItemInspector.tsx
#	apps/web/src/terminal/ghostty/surface.ts
#	packages/client-runtime/src/state/shell-sync.test.ts

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

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants