Skip to content

fix: cap session log replay to last 128KB#10

Open
DonaldoDes wants to merge 1 commit intomobydeck:mainfrom
DonaldoDes:fix/replay-cap
Open

fix: cap session log replay to last 128KB#10
DonaldoDes wants to merge 1 commit intomobydeck:mainfrom
DonaldoDes:fix/replay-cap

Conversation

@DonaldoDes
Copy link
Contributor

Summary

  • replay_session_log() now seeks to max(0, filesize - SCROLLBACK_SIZE) before reading
  • Prevents overwhelming scroll on reattach for sessions with large logs (>1MB)
  • Consistent with the 128KB in-memory ring buffer size

Closes #6

Test plan

  • Large log (290KB) replays only tail content (NEW_DATA present, OLD_DATA absent)
  • Output bounded to reasonable size
  • 3 regression tests added

🤖 Generated with Claude Code

Large session logs (>1MB) caused an apparent infinite scroll on reattach.
Seek to the last SCROLLBACK_SIZE bytes before replaying, consistent with
the in-memory ring buffer size.

Co-Authored-By: Claude Opus 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.

Large session logs cause apparent infinite scroll on reattach

1 participant