Skip to content

macOS: live "Claude is working" indicator + Activity screen#66

Closed
JacquesDelaigue wants to merge 1 commit into
HermannBjorgvin:mainfrom
JacquesDelaigue:feat/activity-screen-and-working-indicator
Closed

macOS: live "Claude is working" indicator + Activity screen#66
JacquesDelaigue wants to merge 1 commit into
HermannBjorgvin:mainfrom
JacquesDelaigue:feat/activity-screen-and-working-indicator

Conversation

@JacquesDelaigue

Copy link
Copy Markdown

What

Two device features that surface real Claude Code activity (not just quota), driven by Claude Code hooks → ~/.clawdmeter/state.json → the macOS daemon → BLE → firmware.

1. "Claude is working" indicator

  • While any session is running, the splash homes to the existing work coding animation (the PWR button still cycles animations; auto-reverts after 5s), and a small work coding badge appears top-left on the Usage screen. The panel stays awake while working.
  • Daemon adds a top-level "working" flag; firmware parses it. Backward compatible (old payloads unchanged).

2. Activity screen

  • A third screen — tap now cycles Splash → Usage → Activity → Splash.
  • A vertical scrolling list of live sessions: each row = project · model · context-window % bar · a Claude-orange dot when that session is running.
  • Daemon sends a compact "sessions" array [{p,m,c,w}] (≤5, size-guarded < 480 B); context-% is computed in the hook from each session's transcript usage vs a model→window map.

How

  • daemon/clawdmeter_hook.py — hook writing per-session state (adapted from @tobby168's Activity screen: live Claude Code session state from hooks #22; adds context-% computation).
  • daemon/claude_usage_daemon.pyread_working() / read_sessions() merged into the payload on a state-file change (pushed within ~5 s); switched to write-with-response (ATT long write) for the larger payload.
  • firmware/SCREEN_ACTIVITY + scrolling list (ui.cpp), 3-way tap cycle, working-mode (splash.cpp), ActivityData/SessionData (data.h), sessions parse (main.cpp), setMTU(517) + BLE_BUF_SIZE 1024 (ble.cpp), -DLV_USE_FLEX=1.

Scope / caveats

  • macOS daemon only. The firmware + hook are platform-agnostic, but the Linux/Windows daemons would need the same working/sessions fields to drive these screens.
  • Builds on the hook from Activity screen: live Claude Code session state from hooks #22 (credit @tobby168) — overlap to reconcile if both land.
  • Context-% is a best-effort approximation (model→window map + a >200k safety rule; the transcript doesn't log the 1M-context marker).
  • Tested on the Waveshare AMOLED-2.16 (flashed + verified live); AMOLED-1.8 compiles clean.

🤖 Generated with Claude Code

Surface real Claude Code activity on the device, driven by Claude Code
hooks -> ~/.clawdmeter/state.json -> the macOS daemon -> BLE -> firmware.

Working indicator:
- Splash "homes" to the "work coding" animation while a session runs
  (manual PWR-cycle still works, auto-reverts after 5s); a small
  "work coding" badge shows top-left on the Usage screen; the panel stays
  awake while working. Daemon sends a top-level "working" flag.

Activity screen:
- New third screen (tap cycles Splash -> Usage -> Activity -> Splash): a
  vertical scrolling list of live sessions, each row = project, model,
  context-window % bar, and a Claude-orange dot when that session is running.
- Daemon sends a compact "sessions" array; context-% is computed in the hook
  from each session transcript's latest usage vs a model->window map.

Transport: daemon writes with response (ATT long write) and the firmware
requests a 517-byte MTU + 1024-byte RX buffer to carry the multi-session payload.

The Claude Code hook (daemon/clawdmeter_hook.py) is adapted from @tobby168's
PR HermannBjorgvin#22. macOS daemon only for now (the Linux/Windows daemons would need the
same working/sessions fields to drive these screens).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
JacquesDelaigue added a commit to JacquesDelaigue/Clawdmeter that referenced this pull request Jun 7, 2026
…orgvin#66)

Brings the macOS working-indicator + Activity screen work onto main as a
merge commit (no squash) to preserve history.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@JacquesDelaigue JacquesDelaigue deleted the feat/activity-screen-and-working-indicator branch June 7, 2026 12:04
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