Skip to content

Fix log viewer worker lifecycle - #1

Merged
trissim merged 2 commits into
mainfrom
codex/log-viewer-lifecycle
Jul 30, 2026
Merged

Fix log viewer worker lifecycle#1
trissim merged 2 commits into
mainfrom
codex/log-viewer-lifecycle

Conversation

@trissim

@trissim trissim commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • restore LogFileLoader to the thread lifecycle declared by the log-viewer architecture
  • retain interrupted workers until QThread.finished and reject stale signals by worker identity
  • join loader and tailer workers through one idempotent cleanup authority
  • remove the duplicate log-highlight parser from the legacy streamer

Root cause

LogFileLoader inherited QThread but overrode start() to launch an unparented QProcess. Switching logs called a zero-timeout wait and then replaced the loader, which destroyed the child process while it was still running. The race is especially visible during Windows process startup.

The loader now performs bounded tail loading in a real interruptible QThread. Superseded workers remain owned until completion, cannot update a newer selection, and are joined when the viewer closes.

Verification

  • full pyqt-reactive suite: 210 passed
  • deterministic 20-switch regression: correct final log and no destroyed process/thread diagnostics
  • changed tests: Ruff passed
  • changed production modules: py_compile passed
  • git diff --check passed

Copilot AI review requested due to automatic review settings July 30, 2026 00:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@augmentcode

augmentcode Bot commented Jul 30, 2026

Copy link
Copy Markdown

PR Risk Analyzer Agent🛡️

👀 Human Input Needed
A pair-review briefing is ready for you.

→ Pair Review Briefing

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deep Code Review Agent🐛

Review completed with 0 suggestions.

@trissim
trissim merged commit d443053 into main Jul 30, 2026
10 of 11 checks passed
@trissim
trissim deleted the codex/log-viewer-lifecycle branch July 30, 2026 01:07
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.

2 participants