Skip to content

Preserve transcript scroll position when new content arrives#26

Open
Swissola wants to merge 3 commits into
anthropics:mainfrom
Swissola:fix/scroll-preserve
Open

Preserve transcript scroll position when new content arrives#26
Swissola wants to merge 3 commits into
anthropics:mainfrom
Swissola:fix/scroll-preserve

Conversation

@Swissola
Copy link
Copy Markdown

Summary

  • Remove the unconditional msgScroll = 0 reset in drawTranscript() when new content arrives
  • Update stale comment in TamaState::lineGen

Motivation

Any change to lineGen previously reset msgScroll to 0, snapping the display back to the bottom of the transcript. If you scrolled up to re-read earlier output while Claude was still generating, new content would immediately dump you back to the latest line, making it impossible to read history during an active session.

The existing maxBack clamp (already present) handles the boundary case where msgScroll exceeds the number of available rows after new content is added, so removing the forced reset is the complete fix.

Behaviour after this change

  • Scrolling up to read history is preserved while new output arrives
  • Scroll position is still bounded by available content (existing clamp)
  • Screen still wakes on new content as before

Test plan

  • Scroll up during an active session — position is held as new lines arrive
  • Scroll past the end of available content — position is clamped correctly
  • Fresh session with no scroll history — bottom-anchored behaviour unchanged

🤖 Generated with Claude Code

Swissola and others added 3 commits May 22, 2026 17:37
sleep=Donald Duck, idle=Bongo Cat, busy=SpongeBob multitasking,
attention=Surprised Pikachu (Nouns glasses), celebrate=Peanuts party,
dizzy=Powerpuff Girls spiral eyes, heart=heart eyes ghost.

Source GIFs in characters/memes-src/, device-ready pack in characters/memes/.
Built with prep_character.py at 96x98px, 64 colours per frame.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Track the current peer BD address in onConnect (extended overload).
bleRemoveCurrentBond() removes only that peer's LTK from NVS. The
"unpair" JSON command now calls this instead of bleClearBonds(), so
each host unpairs itself independently. bleClearBonds() is reserved
for factory reset only.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previously any change to lineGen unconditionally reset msgScroll to 0,
snapping the user back to the bottom. If you scrolled up to re-read
earlier output while Claude was still generating, new content would
immediately dump you back to the latest line.

The maxBack clamp already handles the boundary case where msgScroll
exceeds available rows after new content arrives, so removing the reset
is the complete fix.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant