Skip to content

Lazy-load older PTY replay in web UI#292

Merged
edwin-zvs merged 1 commit into
mainfrom
webui-lazy-pty-replay
May 31, 2026
Merged

Lazy-load older PTY replay in web UI#292
edwin-zvs merged 1 commit into
mainfrom
webui-lazy-pty-replay

Conversation

@edwin-zvs

Copy link
Copy Markdown
Contributor

Summary

  • add offset metadata and optional max_bytes/before_offset params to PTY replay
  • load only the newest 1 MiB of PTY history on first Web UI terminal attach
  • when the user scrolls near the top, fetch only the next older PTY log chunk, keep chunks locally, and replay them in order
  • show a terminal-history loading overlay while older PTY chunks are fetched/replayed

Tests

  • cargo test -p agentd pty_range_before_returns_offsets_and_requested_slice
  • cargo test -p agentd pty_range_before_clamps_to_file_start_and_end
  • cargo test -p agentd pty_replay_returns_full_disk_tail_not_just_old_ring
  • cargo test -p agentd pty_replay_caps_at_replay_max_for_huge_logs
  • cargo check -p agentd
  • cargo build
  • git diff --check

Binaries

Built in this worktree under /Users/moon/agentd/.claude/worktrees/webui-lazy-pty-replay/target/debug/.
Relevant binary for this PR: agentd (crates/daemon, protocol + embedded Web UI assets).

@edwin-zvs
edwin-zvs merged commit d223059 into main May 31, 2026
1 check passed
@edwin-zvs
edwin-zvs deleted the webui-lazy-pty-replay branch May 31, 2026 01:56
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