Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

fix(chat): persist follow intent before navigation

vastsa9f703565fb83
diff --cc docs/spec/04-ux/09-interaction-patterns.md
index 8efa300a4,9bd47e602..225326c7d
--- a/docs/spec/04-ux/09-interaction-patterns.md
+++ b/docs/spec/04-ux/09-interaction-patterns.md
@@@ -774,14 -742,13 +774,19 @@@ may be retained while exactly one works
- Sending a new prompt, retrying, or regenerating always re-pins follow mode and jumps to the bottom before the turn continues, even if the user had scrolled up
- "Scroll to bottom" floating button appears as soon as manual upward scrolling
releases follow mode
- - Click "Scroll to bottom" button: resumes auto-scroll and snaps to bottom
+ - Click "Scroll to bottom" button: resumes auto-scroll and snaps to bottom.
+ Record the pinned bookmark synchronously, before any smooth-scroll event:
+ immediately switching sessions or projects must preserve this follow intent
+ even if the original pane is hidden or unmounted before scrolling finishes.
+ Returning follows the latest output rather than restoring the old reading
+ offset. Manual upward reading without that click still retains its position.
-- Stream completion: if user was auto-scrolling, keep at bottom; if manual, stay at position
+- Stream completion (D676): if the user was following a turn that completes,
+ its prompt scrolls to 16px below the titlebar band at the top of the
- viewport so the answer
- reads from its start, follow mode is released, and jump-to-latest appears.
- The view does not move when the prompt is already in view, the turn failed
- or was aborted, the pane is hidden, or a queued follow-up starts at once. If
- the user had scrolled manually, the view stays at their position
++ viewport so the answer reads from its start, follow mode is released, and
++ jump-to-latest appears. The view does not move when the prompt is already in
++ view, the turn failed or was aborted, the pane is hidden, or a queued
++ follow-up starts at once. If the user had scrolled manually, the view stays
++ at their position.
- An asynchronously completed diagram height update follows the same rule:
ResizeObserver keeps a pinned transcript at the bottom, while a user who has
scrolled upward remains at their reading position.