chore: apply linting fixes and expand ruff coverage to test suite

This commit is contained in:
jack
2026-07-06 15:52:53 -07:00
parent d63332d619
commit 015642eea0
24 changed files with 144 additions and 67 deletions
@@ -603,6 +603,14 @@ class SessionController(QObject):
return average_clusters(edited, getattr(self, "_active_clusters", []))
return edited
# TODO P2.4: throttle live-frame UI updates to ~30Hz
# THINKING: every decoded serial frame triggers frameUpdated/stateChanged,
# which repaints WaferMapItem + trend chart; at high stream rates the GUI
# thread saturates on paint, not decode. Buffer the latest frame and flush
# via a 33ms QTimer (latest-wins, no queue growth). Recording must keep
# writing every frame — only the UI emit is throttled, so place the timer
# here rather than in StreamReader. Depends on nothing; verify with P4.3.
# See docs/pending/alpha-release-polish-plan.md §2.4.
def _emit_current(self) -> None:
frame = self._player.current()
if frame is None:
@@ -828,4 +836,4 @@ class SessionController(QObject):
def _flush_trend(self) -> None:
import json
self.trendData.emit(json.dumps(self._trend_buffer))
self.trendData.emit(json.dumps(self._trend_buffer))