perf: Optimize First Load of Large Conversations (#14901)

*  perf: Index the Conversation Fetch and Trim the Client Message Projection

*  perf: Memoize the Message Tree per Cache Write

*  perf: Serve Message Reads via the Trimmed Projection and an Ownership Probe

*  perf: Defer Collapsed Disclosure Bodies Until First Expansion

*  perf: Progressively Mount Long Threads from the Scroll Anchor

* 🩹 fix: Address Codex Findings on Retention, Anchoring, and Cache Bounds

* 🩹 fix: Poll the Oversized Export Precondition Through the Progressive Mount

* 🩹 fix: Keep Video Results in the Client Message Projection
This commit is contained in:
Danny Avila 2026-08-16 19:45:21 -04:00 committed by GitHub
parent df5abbb377
commit 1b7e2a4e6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 1192 additions and 138 deletions

View file

@ -177,8 +177,15 @@ test.describe('conversation export', () => {
});
const target = page.getByTestId('screenshot-target');
const area = await target.evaluate((node) => node.scrollWidth * node.scrollHeight);
expect(area).toBeGreaterThan(ABORT_CSS_AREA * 1.15);
/** Long threads mount progressively from the scroll anchor, so the full
* area lands a few frames after first paint poll until it converges.
* (The capture path itself force-completes the mount; this precondition
* samples the DOM directly and must wait on its own.) */
await expect
.poll(() => target.evaluate((node) => node.scrollWidth * node.scrollHeight), {
timeout: 60_000,
})
.toBeGreaterThan(ABORT_CSS_AREA * 1.15);
const dialog = await openExportModal(page);
await selectExportType(page, dialog, 'screenshot (.png)');