Activity panel: live sidecar log, memory readout, log file - #45
Merged
Conversation
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.
# Conflicts: # AGENTS.md
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.
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.
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
studio_log!(replaceseprintln!); streamed asactivity_logevents, 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 intosidecar_memoryevents.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.ActivityPanel(bottom drawer: follows the tail unless scrolled up, Copy for bug reports, Log file reveal, Clear) and anActivityTogglein the transport bar showing the latest footprint;activityStore+useActivityLogattach listeners before fetching the backlog and union the two by seq.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 --noEmitcleanmem post-load-cosyvoice … rss=701M footprint=2296Mandpost-cosy-synth … footprint=3336Mpnpm tauri dev: the log file is created with the session header and the sidecar lines; the panel lists them withMLX 1.6 GB · peak 1.8 GB · process 2.0 GBin its header and the footer readsActivity 2.0 GB(screenshot-verified)memlines yet, so Windows/Linux get the log but no memory readout.