Repository navigation
Conversation
Branch 3 of the host-terminal-replaces-chat stack. The host Claude terminal is a raw PTY with no event stream to observe (unlike merge jobs, whose dot reads emit()'s clock), and it runs on the host with no container — so projectActivity's proxy.log / mitmweb signals return "off" for a host-only session. Fill the gap with transcript mtime: when the container is down but the project's -claude tmux session is live, derive working/waiting from how recently the host transcript grew (Claude Code appends to the session JSONL as a turn streams). Same 6s idle threshold as the streamed dot. Non-.jsonl files are ignored; no live session yields "" so the caller still shows "off". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Branch 3 of 4 in replacing the bespoke ChatDock host chat with a real terminal (stacks on #414, #415).
The host Claude terminal is a raw PTY with no event stream to observe — unlike merge jobs, whose Work-tab dot reads
emit()'s activity clock. It also runs on the host with no container, soprojectActivity(which counts proxy.log / mitmweb/v1/messages) returns"off"for a host-only session. Result: the host terminal had no working/idle dot.Fix
Derive the dot from transcript mtime: when the container is down but the project's
-claudetmux session is live, classify working/waiting by how recently the host transcript grew (Claude Code appends to the session JSONL as a turn streams). Same 6s idle threshold (activityIdleAfter) as the streamed dot.hostTerminalActivity(workspace)inactivity.go, consulted fromprojectActivity's!containerUpbranch..jsonlfiles ignored; no live session →""so the caller still shows"off".Test
activity_host_test.go— newest-mtime selection (ignores non-transcripts, absent/empty dirs) + the no-session path.🤖 Generated with Claude Code