Skip to content

Release 0.7.3 — fix Claude run logs collapsing to a single page#16

Merged
pbean merged 4 commits into
mainfrom
release/0.7.3
Jun 26, 2026
Merged

Release 0.7.3 — fix Claude run logs collapsing to a single page#16
pbean merged 4 commits into
mainfrom
release/0.7.3

Conversation

@pbean

@pbean pbean commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

Patch release 0.7.3. Fixes the TUI Log tab showing only a single page for Claude runs while codex logs displayed in full.

Root cause: Claude Code's new fullscreen TUI (an opt-in research preview) draws on the terminal's alternate screen (?1049h) and repaints in place. The Log tab emulates the tmux pane capture through pyte, which has no alternate-screen buffer, so every fullscreen repaint overwrote one screen and the view collapsed to the final frame. Line-oriented CLIs like codex scroll into history normally, so they were unaffected.

Fix:

  • The claude profile now forces the classic inline/scrollback renderer via CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1 in [env] — the documented override that beats any tui setting (user/project/local/seeded) and keeps output in native scrollback, so the capture scrolls and the whole session is reconstructable.
  • Defense-in-depth: LogView detects an alternate-screen switch (scanning the live stream and, on cold open, the tail-seek-skipped prefix) and the dashboard flags such a capture as showing only the final frame, pointing at the agent's full JSONL transcript.

Verified

  • Diagnosis confirmed empirically against a real fullscreen run log (renders to just the final frame) vs. classic-renderer logs (full history).
  • New tests: claude profile forces the classic renderer; four LogView alt-screen cases (live detection, cold-open-past-tail-seek, truncation-reset, negative).
  • Full suite green (1070 passed); trunk check clean.

Release prep

Version stamped to 0.7.3 across __init__.py/pyproject.toml/module.yaml/marketplace/uv.lock, CHANGELOG curated, and docs/images regenerated (TUI changed since v0.7.2).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved the Log tab for Claude runs by detecting alternate-screen (full-screen TUI) captures and showing a clearer “partial frame” notice instead of a misleading single-page view.
  • New Features
    • Updated the built-in Claude profile to disable alternate-screen TUI behavior to keep log rendering consistent.
    • When available, the log pane can now surface the related transcript and provide context for the displayed output.
  • Tests
    • Added coverage for alternate-screen detection, prefix scanning behavior, truncation/reset behavior, and tail/cold-open edge cases.

pbean and others added 2 commits June 26, 2026 09:47
Claude Code's fullscreen TUI (alternate-screen renderer, a research preview)
repaints in place, so the pane capture the Log tab emulates collapsed to the
final frame — while line-oriented CLIs like codex showed in full. Force
Claude's classic inline/scrollback renderer via
CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1 in the profile env, which overrides any
tui setting and keeps output in native scrollback so the capture scrolls
normally and the whole session is reconstructable.

As defense-in-depth, LogView now detects an alternate-screen switch — scanning
the live stream and, on cold open, the tail-seek-skipped prefix — and the
dashboard flags such a capture as showing only the final frame, pointing at the
agent's full JSONL transcript.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e3f1c00d-2f7d-4640-aa14-527c2df84ada

📥 Commits

Reviewing files that changed from the base of the PR and between c29fdb5 and 8200a2f.

📒 Files selected for processing (3)
  • src/automator/tui/data.py
  • tests/test_profile.py
  • tests/test_tui_data.py
🚧 Files skipped from review as they are similar to previous changes (3)
  • tests/test_profile.py
  • tests/test_tui_data.py
  • src/automator/tui/data.py

Walkthrough

The PR adds alternate-screen detection to log capture, propagates that state into the dashboard, sets the Claude profile environment override, and updates 0.7.3 version metadata.

Changes

Alt-screen log capture and release updates

Layer / File(s) Summary
Alternate-screen detection
src/automator/tui/data.py, tests/test_tui_data.py
LogView tracks alternate-screen markers, scans skipped prefix bytes on cold open, updates the flag during incremental reads, and tests cover append, tail-seek, prefix-scan bounds, and truncation cases.
Dashboard fullscreen note
src/automator/tui/screens/dashboard.py
The dashboard snapshot stores alternate-screen state and transcript paths, the poll worker fills those fields, and the log pane renders a fullscreen note with the transcript path when present.
Claude profile environment
src/automator/data/profiles/claude.toml, tests/test_profile.py
The Claude profile adds CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1, and the built-in profile test checks that only Claude defines it.
0.7.3 release metadata
.claude-plugin/marketplace.json, CHANGELOG.md, module.yaml, pyproject.toml, src/automator/__init__.py, src/automator/data/skills/bmad-auto-setup/assets/module.yaml
Release metadata and version fields are bumped to 0.7.3, and the changelog adds the release note and tag reference.

Sequence Diagram(s)

sequenceDiagram
  participant LogView
  participant dashboard_poll_worker as dashboard poll worker
  participant RichLogPane as RichLog pane
  LogView->>dashboard_poll_worker: altscreen_seen in snapshot
  dashboard_poll_worker->>RichLogPane: render fullscreen note
  dashboard_poll_worker->>RichLogPane: include transcript path when present
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

A bunny peeked at scrollback bright,
And hopped through logs by lantern light.
With alt-screen stubs now set aside,
The dashboard shows the fuller ride.
🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the main change: 0.7.3 fixes Claude run logs collapsing to a single page.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch release/0.7.3

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/test_profile.py`:
- Around line 63-64: The negative assertion in the profile test only covers
codex and gemini, leaving the built-in copilot profile unchecked. Update the
assertion loop in the test that iterates over profiles[name].env to include
copilot in the set so the “Claude only” contract is enforced across all built-in
profiles.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 47cb1101-b07c-4c0a-949b-42d2a1d19dc4

📥 Commits

Reviewing files that changed from the base of the PR and between 722cc73 and c29fdb5.

⛔ Files ignored due to path filters (11)
  • docs/images/dashboard.png is excluded by !**/*.png
  • docs/images/dashboard.svg is excluded by !**/*.svg
  • docs/images/demo.gif is excluded by !**/*.gif
  • docs/images/settings-scm.png is excluded by !**/*.png
  • docs/images/settings-scm.svg is excluded by !**/*.svg
  • docs/images/settings.svg is excluded by !**/*.svg
  • docs/images/start-run-modal.png is excluded by !**/*.png
  • docs/images/start-run-modal.svg is excluded by !**/*.svg
  • docs/images/sweep-decision.png is excluded by !**/*.png
  • docs/images/sweep-decision.svg is excluded by !**/*.svg
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (11)
  • .claude-plugin/marketplace.json
  • CHANGELOG.md
  • module.yaml
  • pyproject.toml
  • src/automator/__init__.py
  • src/automator/data/profiles/claude.toml
  • src/automator/data/skills/bmad-auto-setup/assets/module.yaml
  • src/automator/tui/data.py
  • src/automator/tui/screens/dashboard.py
  • tests/test_profile.py
  • tests/test_tui_data.py

Comment thread tests/test_profile.py Outdated
@augmentcode

augmentcode Bot commented Jun 26, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Patch release 0.7.3 to prevent Claude Code’s fullscreen/alternate-screen rendering from collapsing captured run logs to a single screen in the TUI.

Changes:

  • Bump version strings across pyproject.toml, __init__.py, marketplace metadata, and module manifests.
  • Update the built-in claude profile to force classic scrollback output via CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1.
  • Add alternate-screen (DECSET/DECRST 47/1047/1049) marker detection to LogView, including a capped prefix scan for cold-opened tail views.
  • Expose an altscreen_seen flag and surface a dashboard warning when a log capture was produced in alternate-screen mode, optionally pointing at the agent JSONL transcript.
  • Add tests covering live detection, cold-open prefix detection, capped scanning behavior, and truncation resets.
  • Update changelog and regenerate documentation images to reflect the UI behavior.

Technical Notes: Detection is best-effort and aims to warn when a pane capture is likely only the final frame due to fullscreen repaint semantics.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread src/automator/tui/data.py Outdated
# cold-opened fullscreen log is still flagged; the tail is covered by
# the per-chunk scan below.
if self._offset > 0 and not self.altscreen_seen:
self._scan_prefix_for_altscreen(self._offset)

@augmentcode augmentcode Bot Jun 26, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LogView.read_new() can end up scanning the entire skipped prefix up to self._offset, which could be very large and effectively defeats the max_bytes cap (and may stall the poll worker on huge logs). Since the enter marker is typically at session start, consider bounding this prefix scan to a smaller region to reduce worst-case I/O.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 6e3ce94, with a deviation worth flagging.

The core concern is valid: the cold-open prefix scan read [0, self._offset) — up to nearly the whole file on a large finished log (worst case ~28 MB on the biggest captures here), defeating the max_bytes cap.

I did not bound it to the session start, though. In the one real fullscreen pane log we have, the alternate-screen enter marker sits at ~3.9 MB mid-stream (3.9 MB of classic output precedes it), so a start-only window would miss exactly what the scan exists to catch. Instead the scan is now capped at _ALTSCREEN_PREFIX_SCAN_CAP = 8 MiB: bounded worst-case I/O, while still covering a realistic multi-MB preamble. A marker past the cap on an oversized log is missed only on cold open — live-watching reads from offset 0 and still catches it. Added test_log_view_altscreen_prefix_scan_is_capped to pin the boundary.

Address PR #16 review feedback:

- The cold-open altscreen prefix scan read [0, offset) — up to nearly the whole
  file on a large finished log — defeating the max_bytes cap (worst case ~28 MB
  on the biggest captures). Bound it to _ALTSCREEN_PREFIX_SCAN_CAP (8 MiB), which
  still covers a realistic multi-MB classic preamble before a TUI enters the
  alternate screen (the one real sample switches at ~3.9 MB). A marker past the
  cap in an oversized log is missed only on cold open; live-watching reads from
  offset 0 and still catches it. (The reviewer's suggested start-only bound would
  have missed that mid-stream marker.)

- Include the fourth built-in profile, copilot, in the negative env assertion so
  the "Claude only" CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN contract is fully covered.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pbean

pbean commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator Author

augment review

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread src/automator/tui/data.py Outdated
# huge finished log doesn't trigger a near-whole-file read that would defeat
# max_bytes. 8 MiB comfortably covers a multi-MB classic preamble before a TUI
# switches to the alternate screen (observed ~3.9 MB); a marker past the cap in an
# oversized log is missed only on cold open — live-watching reads from offset 0 and

@augmentcode augmentcode Bot Jun 26, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/automator/tui/data.py:347: The comment says “live-watching reads from offset 0”, but LogView.read_new() tail-seeks to max(0, size - max_bytes) on first open, so a viewer attaching after the log grows past max_bytes won’t necessarily read from 0. Consider clarifying this since it affects when an altscreen marker could still be missed due to the prefix scan cap.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, the comment overstated it — corrected in 8200a2f. read_new() tail-seeks to max(0, size - max_bytes) on first open, so attaching to an already-large log does not read from 0. Reworded: a beyond-cap marker is missed only when the log already exceeds max_bytes at first open; a view attached while the log was still small reads the whole stream from offset 0 and catches it regardless.

Comment thread src/automator/tui/data.py Outdated
pos = 0
while pos < end:
f.seek(pos)
buf = f.read(min(window, end - pos) + overlap)

@augmentcode augmentcode Bot Jun 26, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/automator/tui/data.py:488: _scan_prefix_for_altscreen() reads min(window, end - pos) + overlap, which can pull up to overlap bytes past end, so _ALTSCREEN_PREFIX_SCAN_CAP isn’t a strict ceiling and markers just beyond the cap may still be detected. If the cap is intended to be strict, consider limiting the read to end (or documenting that a small over-read is intentional for boundary detection).

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — fixed in 8200a2f. The over-read was up to overlap (7) bytes; the read is now min(window + overlap, end - pos), so the scan stops strictly at end while each non-final window still reads window + overlap to catch a marker straddling an internal boundary (the final window's leading boundary is already covered by the previous window's overlap).

Address PR #16 round-2 review feedback (both low severity):

- _scan_prefix_for_altscreen read min(window, end-pos) + overlap, over-reading up
  to `overlap` bytes past `end`, so _ALTSCREEN_PREFIX_SCAN_CAP wasn't a strict
  ceiling. Read min(window + overlap, end - pos) instead — strict at `end` while
  the previous window's overlap still covers the internal boundary.

- The cap comment claimed "live-watching reads from offset 0"; read_new tail-seeks
  to max(0, size - max_bytes) on first open, so attaching to an already-large log
  doesn't read from 0. Reworded: a beyond-cap marker is missed only when the log
  already exceeds max_bytes at first open; a view attached while it was still small
  reads the whole stream from 0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pbean

pbean commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator Author

augment review

@pbean

pbean commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator Author

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@pbean pbean merged commit 64b8dc2 into main Jun 26, 2026
7 checks passed
@pbean pbean deleted the release/0.7.3 branch June 26, 2026 18:10
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