Skip to content

Activity panel: live sidecar log, memory readout, log file - #45

Merged
ivan-digital merged 4 commits into
mainfrom
feat/activity-log
Aug 30, 2026
Merged

Activity panel: live sidecar log, memory readout, log file#45
ivan-digital merged 4 commits into
mainfrom
feat/activity-log

Conversation

@ivan-digital

Copy link
Copy Markdown
Member

Summary

The bundled app had no log surface: sidecar stderr was echoed to the shell's stderr (invisible outside a terminal launch), only the percent lines survived as progress events, and nothing was written to disk — so a stalled download or a failed load could only be diagnosed by relaunching from Terminal. This adds an Activity panel with the live log, a memory readout, and a rotating log file. Second half of #41.

What changed

  • Rust — one bounded ring (2000 lines) fed by every sidecar stderr line and the shell's own studio_log! (replaces eprintln!); streamed as activity_log events, appended to <app-log-dir>/speech-studio.log (rotated at 5 MB; ~/Library/Logs/audio.soniqo.studio/ on macOS), still echoed to stderr. Commands: activity_log_snapshot, activity_log_info, reveal_activity_log, clear_activity_log. [sidecar] mem … lines are parsed into sidecar_memory events.
  • Swift sidecar — the memory snapshot adds the process resident size and physical footprint (task_info; footprint is what Activity Monitor shows, RSS misses Metal buffers) and now fires after every load and after CosyVoice / Indic-Mio / Qwen3 renders too.
  • UIActivityPanel (bottom drawer: follows the tail unless scrolled up, Copy for bug reports, Log file reveal, Clear) and an ActivityToggle in the transport bar showing the latest footprint; activityStore + useActivityLog attach listeners before fetching the backlog and union the two by seq.
  • Docs — README "Activity log", AGENTS.md note (use studio_log!, snapshot line format).

Test plan

  • cargo test --lib — 35 passed (new: memory-line parsing incl. legacy lines, ring bound/order, rotation)
  • pnpm test — 75 passed (new: store ×4, panel + toggle ×7); tsc --noEmit clean
  • Swift sidecar builds; a live NDJSON session prints mem post-load-cosyvoice … rss=701M footprint=2296M and post-cosy-synth … footprint=3336M
  • pnpm tauri dev: the log file is created with the session header and the sidecar lines; the panel lists them with MLX 1.6 GB · peak 1.8 GB · process 2.0 GB in its header and the footer reads Activity 2.0 GB (screenshot-verified)
  • Not covered: the C++ sidecar emits no mem lines yet, so Windows/Linux get the log but no memory readout.

The bundled app had no log surface: sidecar stderr was echoed to the
shell's stderr (invisible outside a terminal launch), only the percent
lines survived as progress events, and nothing was written to disk, so
a stalled download or a failed load could only be diagnosed by
relaunching from Terminal. Refs #41.

Every sidecar stderr line and every shell-side note now goes through one
bounded ring: streamed to the WebView as activity_log events, appended
to <app-log-dir>/speech-studio.log (rotated at 5 MB), and still echoed
to stderr. The Activity button in the transport bar opens a panel that
follows the tail, copies the visible log for a bug report, reveals the
log file, or clears the view.

The Swift sidecar's memory snapshots gain the process resident size and
physical footprint (the figure Activity Monitor shows; RSS misses Metal
buffers) and now fire after every load and render, including CosyVoice,
Indic-Mio and Qwen3. The shell parses them into sidecar_memory events;
the footer shows the latest footprint and the panel header the MLX
active/peak figures.
The "see console" hint in the failed-clips message sent users to a
console the bundled app does not have. Failed renders and regenerates
now note themselves in the activity ring through activity_log_note,
init_model failures are logged shell-side, and the hint points at the
Activity panel instead. The memory-footprint README section mentions
that the panel shows the same figure live.
@ivan-digital
ivan-digital merged commit e23343b into main Aug 30, 2026
11 checks passed
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