Zum Inhalt springen

Scroll Engineering

Scroll Engineering

15 Prinzipien für Streaming-Chat-Scroll.

Grundregel: Nie gegen die Absicht des Lesers scrollen.

  1. Move only when the reader asked to move. Auto-scroll ist nie der Default.
  2. Follow only while they’re following. Am Live-Edge mitfahren. Bei Scroll weg: dort bleiben.
  3. Every interaction is intent. Scroll, Textauswahl, Tastatur, Links, Suche stoppen Auto-Bewegung.
  4. Start a new turn near the top of the viewport. Neuer Turn von oben lesbar.
  5. Then stream in the answer. Antwort wächst in den verfügbaren Raum.
  6. Keep part of the previous conversation in context. Vorheriger Turn teilweise sichtbar.
  7. Let new content arrive offscreen. Streaming ändert nicht automatisch die Ansicht.
  8. Show what’s happening out of view. Hinweis bei laufendem Stream oder neuen Nachrichten.
  9. Make it easy to return to the latest reply. „Jump to latest” setzt Follow zurück.
  10. Let people jump anywhere in the conversation. Links, Suche, Unread-Marker.
  11. Reopen where the reader left off. Gespeicherte Konversation bei letztem User-Turn öffnen.
  12. Keep the reader’s place when layout changes. Bilder, Markdown, Code: Position erhalten.
  13. Handle interruptions without stealing position. Stop, Retry, Regenerate: kein Sprung.
  14. Stay responsive in long threads. Lange Historie bleibt flüssig.
  15. Be accessible without the noise. Tastatur, Fokus, Screenreader in angemessenem Tempo.
HookZweck
useFollowStreamFollow-at-bottom während Streaming
useProxyWheelScrollWheel außerhalb der Shell-Spalte → .app-content (Desktop-Ränder)
useScrollIntentUser-Intent erkennen (geplant)
useJumpToLatestZurück zum Live-Edge (über useFollowStream.jumpToLatest)

Framework-agnostic. Shell bindet Hooks an DOM.

Shell-Layout: zentrierte Spalte (.app-shell, max. 480px), Scroll in .app-content. Auf breiten Viewports scrollen Ränder links/rechts sonst nicht.

Regel: useProxyWheelScroll in der App-Shell aktivieren (z. B. AppChatShell). Standard-Selektoren: .app-shell / .app-content. Eigene Scrollbereiche (Command Palette, Chat-Listen) bleiben unberührt.

import { useProxyWheelScroll } from "@addxion/behavior/scroll";
useProxyWheelScroll(); // optional: containerSelector, shellSelector

Ursprünglich dokumentiert in süper/docs/streaming-chat-scroll-engineering.md. SSOT ab jetzt hier in addxion-docs.

  • Kein Auto-Scroll gegen User-Intent
  • Follow nur am Bottom
  • Jump-to-latest sichtbar bei Away
  • Layout-Shifts kompensieren
  • useProxyWheelScroll in App-Shell für Desktop-Ränder
IDWahrheit
T-PKG-BEHAVIORScroll-Entscheidungen in behavior, kein DOM
T-PKG-AILLM-SSOT in @addxion/ai
T-PKG-SHELLShell = UI-Schicht, nicht bash/zsh

Scope: Scroll Engineering — wann und warum gescrollt wird.

  • Framework-agnostic Hooks; Shell bindet behavior für Chat
  • Keine Scroll-Logik in Feature-Seiten oder @addxion/ai
  • Änderungen an Prinzipien: Shell-Chat-Anbindung in Architektur prüfen