fix: restore UX after performance improvements - #9799
Conversation
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR changes default user-visible behavior and shared runtime lifecycles across mobile, server, marketing, and web surfaces, including persistence recovery, streaming, caching, animation, and worker management. The breadth and interaction of these changes warrant human validation beyond the added focused tests. You can add or adjust custom eligibility rules. Learn more. |
Created with GPT-6 Astra (preview) in Codex.
Created with GPT-6 Astra (preview) in Codex.
caae26e to
d1c39f6
Compare
(cherry picked from commit b0ccd56)
One conflict in MessagesTimeline.tsx: took upstream pingdotgg#9799 shimmer restore and kept the fork streamDetached → Reconnecting branch.
The performance pass removed useful status feedback and introduced recovery, worker-lifetime, and cache problems. This restores the feedback and fixes those problems while keeping the performance safeguards.
This is one combined PR at Theo's request.
Regressions and fixes
#9777 restored the running-tool shine while this work was in progress. This PR keeps its single text element, contrast colors, 30-step sweep, and accessibility guards. It adds visibility pausing instead of a second tool-label overlay.
The outbox restriction was disclosed in its original PR. Recovery now works without relaxing data safety. The HTML issue was reproduced with preserved archive timestamps, not ordinary npm installation.
Deliberate safeguards retained
Verification
Takeover verification passed on the rebased product code. 281 focused tests passed: 71 web/marketing, 158 mobile, and 52 server. Full CI passed on
a19faa6b, including the desktop build, preload check, and mobile native analysis. Cursor and Macroscope correctness checks passed.Compaction, sync, update, highlighter failure, and media preference checks used controlled inputs in the real client. Pointer, focus, and wheel events were dispatched in the browser. Copy payloads were captured without changing the system clipboard. The narrow homepage ran in a 390px iframe of the real page. Tests used disposable state and synthetic conversations.
A physical hidden-tab check was not completed. Hidden-tab callbacks passed focused tests. Reduced-motion and forced-color CSS branches passed with controlled media signals. No OS forced-color palette, GPU benchmark, separate packaged Electron UI, or Android run is claimed.
Browser and iOS evidence
Worktree setup clip. This contains 20 real browser screenshots with their capture timestamps, about five frames per second. It is not a high-refresh performance recording.
Plain-text viewer and preserved draft.
The original fixes and Theo Browne's authorship are preserved. Takeover added a correction to the attachment cleanup comment. CI could not reach Ubuntu mirrors over HTTP, so the CI-only HTTPS fix by @shivamhwp was imported from #9806, with its Git author preserved. Package choices and test commands did not change. No V2 session changes were imported.
Original verification kit. Refs #9661.
Created with GPT-6 Astra (preview) in Codex.
Note
Medium Risk
Mobile outbox and attachment lifecycle semantics changed (partial recovery, stricter cleanup gates), and static HTML caching behavior is altered—both affect offline queue integrity and post-deploy client updates.
Overview
This PR reverses several user-visible and correctness regressions introduced by recent performance work while keeping the underlying safeguards.
Web and marketing: Restores homepage hero drift, pointer parallax, caret blink, and 8s endorsement carousel paging via new
startHomeMotion, with pauses for visibility, reduced motion, hover/focus, and manual scroll. Chat activity rows and composer loaders get shimmer/spin again throughobserveVisibleAnimation, which ties CSSanimation-play-stateto viewport intersection and tab visibility. Diff highlighting reuses a shared worker pool for 30s after the last viewer closes. Streaming code fences retry Shiki viaRenderErrorBoundaryresetKeyswithout remounting block controls.Mobile: Thread outbox
loadnow returns readable messages plus per-file errors instead of failing entirely; the manager merges recoverable records, blocks destructive cleanup until a complete load, surfaces a retryable alert, and drops post-deliveryreleaseUploadsin favor of draft/outbox-owned attachment cleanup.Server: HTML responses skip
ETag/Last-Modifiedand never 304, so same-size deploys still deliver fresh shells. Live thread streaming budgets retain projected tool payloads; shell subscriptions queue only event metadata before coalescing refetches.CI: Forces HTTPS in apt mirror sources before installing
libsecretbuild deps on Blacksmith runners.Reviewed by Cursor Bugbot for commit a19faa6. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Restore outbox load UX and add shared diff worker pool and visible animations
falsefor incomplete loads, retries later without resurrecting removed or edited records, anduseThreadOutboxDrainshows a retryable native alert on load failure.releaseUploadsfromPreparedTurnAttachments; durable owners now clean up uploads after checking shared references, anduseCreateProjectThreadschedules cleanup from prepared draft attachments.useSyncExternalStore, a reusableobserveVisibleAnimationutility, and a homepage motion controller for pointer parallax and automatic endorsement paging.handleStaticAndDevRequestno longer returns 304 or immutable cache headers for HTML;ThreadLiveEventCoalescerno longer double-projects flushed events and retains projected client payloads in the stream budget.ThreadOutboxStorage.loadnow returnsThreadOutboxLoadResult(messages + errors) instead of an array, so any out-of-tree loader callers must adapt;clearEnvironmentnow refuses candidate removal when any outbox record is unreadable.Macroscope summarized a19faa6.