Skip to content

Pin chats and task lists to the latest content on open - #250

Draft
sambitcreate wants to merge 5 commits into
mainfrom
cursor/chat-open-scroll-bottom-eaca
Draft

sambitcreate wants to merge 5 commits into
mainfrom
cursor/chat-open-scroll-bottom-eaca

Conversation

@sambitcreate

@sambitcreate sambitcreate commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

Problem

Long chats and task lists opened at the top of their scroll surfaces. On Mac, ScrollArea is reused across chats so a follow latch leaked; on iOS there was no first-layout bottom anchor; on Android LazyListState was not keyed by chat. Task hover/sheets hid the last steps unless the user noticed they could scroll. Long transcripts also observed every DOM mutation.

Approach

Hermex (uzairansaruzi/hermex) pins transcripts with defaultScrollAnchor(.bottom, for: .initialOffset) and a size-change bottom anchor only while the reader is following. Aiden now matches that policy:

  • Mac: autoScrollResetKey={chatId} re-arms follow; a content-wrapper ResizeObserver replaces the subtree MutationObserver; follow pins in the same layout pass (not only on the next frame); the task hover list pins on first open, then follows only when already at the live edge.
  • iOS: Hermex initial + size-change anchors; no onAppear / live-token scrollTo that could steal a reading position; task sheets use the same initial bottom anchor.
  • Android: reverse-layout list state is remembered per chatId; follow is latched at the live edge; live token updates do not force scroll; task sheets pin once per epoch and keep that pin across rotation.

Commits

  1. Pin Mac chats and task lists to the latest content
  2. Open iOS chats and task sheets at the latest content
  3. Open Android chats and task sheets at the latest content
  4. Keep follow latches from yanking readers off older content
  5. Follow size changes in the same layout pass

Tests

  • renderer/lib/scroll-follow.test.ts
  • renderer/main/chat-transition.test.tsx
  • renderer/components/todo-panel.test.tsx
  • ios/AidenOnTheGoTests/AidenChatTests.swift scroll-policy assertions
  • android/.../AidenChatScrollTest.kt
  • scripts/check-ios-shipping-target.test.mjs (13/13)

This environment could not run tsx suites (ECONNRESET to the npm registry) or Android Gradle. iOS shipping allowlist passed.

Reviews

Three Grok 4.6 medium reviews (Mac / iOS / Android) requested changes on the first landing. Those P1s are addressed in commits 4–5: empty-state min-h-full, no iOS appear/token yanks, no Android live-token follow, synchronous Mac follow, rotation-safe task pin.

Open in Web Open in Cursor 

cursoragent and others added 4 commits September 25, 2026 03:33
Re-arm transcript follow when switching chats, observe one content wrapper instead of a subtree MutationObserver, and open the task hover list at its last steps.

Co-authored-by: Sambit Biswas <sambitcreate@users.noreply.github.com>
Adopt Hermex's initial and size-change bottom scroll anchors so transcripts land at the end on first layout, and pin the task-progress list to its last visible step.

Co-authored-by: Sambit Biswas <sambitcreate@users.noreply.github.com>
Reset reverse-layout transcripts to the newest message when a chat opens, keep following while the reader is at the live edge, and pin task progress to its last step.

Co-authored-by: Sambit Biswas <sambitcreate@users.noreply.github.com>
Pin Mac task lists on first open only, restore empty-state min-height, drop iOS appear resets that stole scroll position, ignore Android live-token follow, and restore the papercuts heading.

Co-authored-by: Sambit Biswas <sambitcreate@users.noreply.github.com>
@cursor cursor Bot changed the title Pin chats and task lists to the latest content Pin chats and task lists to the latest content on open Sep 25, 2026
ScrollArea now pins synchronously while latched so hydrate does not flash the top of a long chat. iOS drops per-token scrollTo in favor of Hermex size-change anchors, and Android task sheets remember the open pin across rotation.

Co-authored-by: Sambit Biswas <sambitcreate@users.noreply.github.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.

2 participants