Repository navigation
fix(app): omit attachments from turn preview index - #57712
kitlangton wants to merge 1 commit into
Conversation
|
CI finished with passing Linux/Windows builds and unit tests, but failing app E2E and app component jobs. This PR is not fully green. Compared the logs for the two independent session-loading branches: #57700 run and #57712 run. Both fail the same new-session color, artifact reread, pending-steer color, mobile Home navigation, busy-tab activity, cached-timeline focus/disposal, activity-chip, virtualizer reconnect and websearch component cases. The navigator branch also fails the painted-motion disappearance assertion. Session-ui component jobs pass on both platforms. The navigator branch does not contain the enrichment change, and the enrichment branch does not contain the navigator projection. The shared failures therefore are not isolated evidence against either change. A clean-base reproduction was not run, so this is not a claim that every failure is pre-existing. Targeted tests and full lint/typecheck passed as recorded above. Both PRs remain unmerged. |
|
Closing: the turn navigator was removed from beta in ee8221c, and we're not bringing it back. |
The turn navigator builds a text-only index by requesting up to 1,000 user messages. Those requests include file attachments, so image bytes pass through SQLite, message decoding, JSON serialization and client parsing without being used by the previews.
Add
includeFiles=falseto message listing and use it for navigator index requests. SQLite removes the top-levelfilesfield before JS decoding. Prompt text, metadata, durable ordering and cursor behavior are preserved. The default and explicittruestill include attachments.Measurement
Real
ServerFetchhandler and generated client, in-memory SQLite, 1,000 synthetic prompts with 22,000 base64 characters each. One warmup and seven alternating before/after pairs on M4 Pro. This is an attachment-heavy fixture, not an exact HOME replay.All seven pairs improved. The measurement includes handler execution, serialization and generated-client parsing; it excludes network latency and browser painting. No newest-message paint improvement is claimed.
Paired samples and reproduction
From
packages/server, runbun script/benchmark-message-index.ts. It uses isolated temporary global paths, an in-memory database and in-process HTTP requests. Each sample asserts message count, ID order, display metadata and attachment presence.Verification
bun run generatefrompackages/client.packages/server/test/message.test.ts: 3 tests, 32 assertions pass, including projection, attachment preservation and cursor continuation through the generated client.bun run check: all 36 tasks pass. Checks and benchmark ran through HiveMind.Scope
Optional public API query parameter plus one navigator call site; no database migration. Older servers may ignore the parameter and return the larger payload. This does not strip nested tool media; #56989 owns that separate optimization. Undo is one revert.