Skip to content

Attach app log files to a recording on the video clock #334

Closed

Description

@TMHSDigital

Summary

Let a recording carry the app's logs. start_recording { attachLogs: [...] } tails one or more log files (or a launched process's stdout/stderr) and writes each line to a sidecar on the video clock, the same way the input event log works. Then the index, bug_report and the review player can show "what the app said at 0:42".

Where

  • src/utils/events.ts:43: the existing pattern for a time-aligned sidecar (t = seconds from the first video frame).
  • src/utils/recordingIndex.ts: the index already merges OCR, events and transcript; logs would be a fourth source.
  • src/utils/bugReport.ts: bug reports already pull OCR'd error text from frames; real log lines are far more reliable than OCR.

Details

Today the only way to see an error message is OCR on the frames (find_text), which misses anything not on screen (stack traces, network errors, background service logs). Most desktop-app bugs need both the video and the log, and lining them up by hand is the tedious part.

Proposed sidecar <recording>.logs.jsonl:

{ "t": 42.18, "source": "app.log", "level": "error", "line": "NullReferenceException at ..." }

Impact

Suggested fix

  1. attachLogs: [{ path, label?, levelRegex? }] on start_recording; follow the file from its current end, handling rotation/truncation.
  2. Stamp lines with the same clock the event logger uses; flush on stop/pause.
  3. Add logs as a source in recordingIndex.ts and a "Log excerpt" section in bug_report (lines within ±N s of the marked failure).
  4. Run log lines through the same secret patterns as find_text before writing a bug report.
  5. Optional later: pipeline op to render a log ticker overlay.

Acceptance criteria

  • Log lines land in a sidecar with timestamps aligned to the video (within one frame interval)
  • Rotation and truncation of the source file are handled
  • search_recording and bug_report use the sidecar
  • Secret-looking tokens are masked in bug reports
  • Retention prunes the sidecar with the recording

Getting started

  • Relevant files: src/utils/events.ts, src/utils/recordingIndex.ts, src/utils/bugReport.ts, src/tools/startRecording.ts
  • Tests: npm test

Related: #272


Filed by repo-audit/feature-ideas at 19569f7. Severity: high. Effort: M. audit-key: enhancement|src/tools/startRecording.ts|attachLogs

Activity

  1. added
    enhancement
    help wanted
    effort: medium
    on Nov 15, 2026
  2. TMHSDigital commented on Nov 15, 2026

    @TMHSDigital
    OwnerAuthor

    Done in d4f83b3: start_recording logs [{path, label}] follows up to 5 files (polling, rotation- and truncation-safe) and writes .logs.jsonl on the video clock, with error and warn flagged. index_recording indexes the lines (masked), bug_report has an App logs section, and delete_recording removes the sidecar. Verified with unit tests, a real-file tailer test (rotate, truncate, partial lines), and a live recording through the tool layer: the pre-existing line was skipped, the CRLF and split lines came out right, and the error line was flagged. Launched-process stdout capture and a log overlay were not added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort: mediumenhancementhelp wantedpriority: high

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions